0

I want some kind of desktop DE when connecting to my linux box over ssh. Something like winscp works but I'll be running on linux instead of windows. The box doesn't have much ram and is not running a DE. I'd want to execute programs/scripts but it's ok if it disappears and I need to use the command line to see/connect to it

  • 2
    FYI: DE = "desktop environment" IDE = "integrated development environment" (substantially different things). – goldilocks Sep 2 '13 at 13:58
  • That's a bad idea, as ssh works too slow for X. Use vnc or something like that. – rush Sep 2 '13 at 13:59
  • @rush: I edited for clarification. Does it still sound like a bad idea and slow? – user4069 Sep 2 '13 at 14:01
  • Yes. VNC is exactly what you need. SSH is great for CLI, but for GUI it sucks. You can run VNC in background and connect to it via client on demand. If you need to secure you connection, you can tunnel your vnc in ssl or ssh. But it still will be vnc, not ssh. – rush Sep 2 '13 at 14:03
  • Does vnc require a desktop environment to be running on the box? If not then whats a good client and server? I'm trying to fake a DE because I dont want to run one on the box – user4069 Sep 2 '13 at 14:07
2

To laucnh any app ( set of app ) in VNC session on your box without DE you can configure it in following way:

  • Install vnc4server xfonts-base
  • Create password for vnc with vncpasswd
  • create a script ~/.vnc/xstartup

#!/bin/sh

if [ -z "$VNCAPP" ]
then
  # Uncomment the following two lines for normal desktop:
  # unset SESSION_MANAGER
  # exec /etc/X11/xinit/xinitrc

  [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
  [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  xsetroot -solid grey
  vncconfig -iconic &
  x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  x-window-manager &
else
  xsetroot -solid black
  vncconfig -iconic &
  x-window-manager &
  $VNCAPP
  sleep 10
  vncserver -kill $DISPLAY
fi
  • Start your app in such session with VNCAPP=xcalc vncserver -depth 24

Now you can connect from client with command xvnc4viewer server.address:1.

ps. Original source is here.
pps. Also you can check xpra project.

  • vnc is NOTHING like i wanted. All I get is a window with one terminal which after I close I can't open. It doesn't let me browse files or click on things to execute scripts and commands. Its completely not what i wanted. – user4069 Sep 2 '13 at 17:02
  • 2
    Terminal is default application in case you didn't specify VNCAPP variable. Also you can use there some lightweight wm, like openbox or similar which will allow you to execute additional commands like in usual environment – rush Sep 2 '13 at 17:19
1

FreeNX

Another option that I've used in the past that works reasonably well over a slow connection is FreeNX.

VNC + Desktop

Given your comments left to the other answer regarding the use of VNCAPP (a single application displayed over VNC) you're probably going to want to either use VNC in some form for the entire desktop or FreeNX.

RDP

What's RDP? RDP is Remote Desktop Protocol, it's how Windows system connect to other Windows systems. Yes you can also use it for connecting to Linux systems from either a Windows RDP client or you can use one of the numerous rdp clients available for Linux to connect as well. The key technology that makes this an options is the application xrdp.

This app is a bit of a misnomer. It's actually a layer that sits in between a RDP client such as xfreerdp on one side, and on the back side it's talking to the Linux box it's running on using traditional VNC. The advantage with this approach is that the slowness of VNC is localized to the localhost of the Linux box.

  • I'm having trouble with sessions on freenx/neatx. I tried googling but every suggestion I tried didn't help. I haven't created a session AFAIK. I'm not sure how to go about it – user4069 Sep 3 '13 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy