So I got my RPi 3 today and I spent a good 5 hours trying to run it headlessly because I usually use my laptop, plus I only have a DVI monitor and have to use an HDMI to DVI adapter (getting no sound either). When I connect it the orthodox way (HDMI cable to monitor, keyboard and mouse plugged in) I see the normal Raspbian DE, and it's functioning perfectly.

Then I followed a few tutorials on how to use it headlessly, and what I basically did was add ip= in the cmdline.txt file on the SD card. Then I ran ssh -Y [email protected], entered the name and password, and I got to the raspberry terminal (such a success after hours of sweat and tears). However, when I run lxsession the screen starts flashing and in a little bit I get some taskbar on the bottom of the screen, which is nothing like the Raspbian environment (e.g. it has the Debian logo instead of the red raspberry).

My question is, is it possible to connect to the RPi over SSH using my laptop, while also getting the exact same experience as going the whole nine yards and using an external monitor and peripherals? I want to be able to develop and text on my laptop anywhere, obviously impossible the other way...

  • this is what VNC is for. Remote X through ssh only displays individual remote programs and their windows on your local machine using your local window manager's frames.
    – scruss
    Dec 16, 2016 at 0:02

2 Answers 2


No. You cannot run visual environment within an SSH session.

To have (almost) "the exact same experience as going the whole nine yards and using an external monitor and peripherals" you should set up VNC.

RealVNC server comes pre-installed on Raspbian, but you need to enable it. Refer to the official documentation for detailed instructions.

You might however need to install VNC client like VNCviewer on your Debian machine.

  • RealVNC displays the current desktop, which a headless system usually won't have. The available instructions for starting it at boot are sketchy, and probably too complex for a beginner to follow.
    – Milliways
    Dec 16, 2016 at 2:40
  • @Milliways So OP goes "the whole nine yards" to a headless system? And when OP writes he connects "HDMI cable to monitor, keyboard and mouse plugged in" he is lying? And when he requests "the exact same experience" he actually means something different? What is your comment about?
    – techraf
    Dec 16, 2016 at 2:48
  • Have you actually tried running RealVNC on a headless system? It works if you have a physical screen, but if it is really headless you can either ssh and manually start vncserver each time, or build a systemd service to start.
    – Milliways
    Dec 16, 2016 at 4:49
  • OP is not running headless! Have you actually read the question you posted an answer to? I have no clue why you are commenting under my answer. Explain your intentions, please, instead of asking about my experience.
    – techraf
    Dec 16, 2016 at 4:50
  • If you are unhappy with the raspberrypi.org page I linked to, you can submit a PR on GitHub. I did not take part in its creation, so don't comment to me it's sketchy and too complex in your personal opinion.
    – techraf
    Dec 16, 2016 at 4:58

There are so many things wrong with this question.

  1. is a Link-local address and not routable. See How do I set up networking/WiFi/Static IP

  2. ssh is a protocol which is normally used to access the console and used to enter commands on a terminal.

  3. If you want to see the GUI you need to use a suitable protocol. VNC is probably the most common. There are 2 popular flavours RealVNC is included in latest Raspbian. TightVNC is another. I will leave you to research this if you want to go this way.

  • OK, I downloaded VNC Viewer and it worked. However, I set a static IP to eth0 in etc/network/interfaces (it was set to "manual" previously), but now when I run ifconfig the IP address is set to Dec 16, 2016 at 14:25
  • @BobbyBrown rather than repeating the info in Link-local address I suggest you read this. These addresses are used BEFORE a normal address is assigned. You would be better connecting the Pi to your router (using Ethernet or WiFi), but is you MUST use static pick something in the range your network is using, often 192.168.1.nnn
    – Milliways
    Dec 16, 2016 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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