I've got a Raspberry Pi 3 Model B with Raspbian Jessie Lite. So far I've been happy running it with command line only, but I came up with a use case for a graphical browser, so I installed the X environment and started it:

sudo apt-get install xserver-xorg xinit xserver-xorg-video-fbdev lxde lxde-common

sudo startx

Now that works fine and when I connect with a suitable client (MobaXterm, if that makes any difference) I can run and use Iceweasel browser just fine (sudo apt-get install iceweasel, then iceweasel &).

However, the issue is now: how do I leave the Iceweasel running when I quit the SSH session? If it was a command line application I'd do nohup iceweasel &, but it doesn't work in this case... Also, I'd naturally like to be able to reattach the Iceweasel window to my session when I reconnect with SSH.


No SSH needed, I ended up using VNC. Quick instructions:

sudo apt-get update

sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer

sudo raspi-config > Interfacing Options > VNC > "Yes"

And now, since it's a headless system, you need to start a virtual desktop:


It then prints the IP and the display number to the terminal, something like "". You can then use that piece of information to connect to the Raspberry using, say, the RealVNC Viewer.

| improve this answer | |

The program "screen" is what you are looking for.

A simple tutorial:


| improve this answer | |
  • Thanks, but no, it doesn't seem to do well with graphical apps. The app stays running even when you detach the screen or try to disconnect your SSH session. – ZeroOne Aug 7 '17 at 11:07
  • Then you could use xpra. – MatsK Aug 7 '17 at 11:17
  • Unfortunately, xpra install fails: sudo apt-get install xpra: "The following packages have unmet dependencies: xpra : Depends: xserver-xorg-video-dummy but it is not going to be installed". Trying to install that gives "The following packages have unmet dependencies: xserver-xorg-video-dummy : Depends: xorg-video-abi-18" and that one "Package xorg-video-abi-18 is a virtual package provided by: xserver-xorg-core 2:1.16.4-1+deb8u1 [Not candidate version] E: Package 'xorg-video-abi-18' has no installation candidate". Finally, xserver-xorg-core is already the newest version.??? – ZeroOne Aug 7 '17 at 12:27
  • Is this the solution ? raspberrypi.stackexchange.com/questions/50000/… – MatsK Aug 7 '17 at 12:28
  • Getting there... I was able to install xpra now, but trying to start an application inside it results in this error: MobaXterm X11 proxy: Authorisation not recognised Error: cannot open display: localhost:10.0 I have now read about MIT-MAGIC-COOKIE-1, but I don't see how that applies, as everything I've read about it concerns getting X11 forwarding to work after you've su'd yourself to some other user, which isn't the case here... :/ – ZeroOne Aug 7 '17 at 21:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.