Before you go neck-deep into this post, please check if this post is applicable for you:

What you want to do:

  1. Access Raspberry Pi’s desktop on Laptop/PC screen

What you have:

  1. Raspberry Pi running the latest Raspbian Wheezy
  2. Laptop (Windows 7 or XP with Internet connection, required to download one setup file)
  3. A working SSH connection with Raspberry Pi (direct access, explained below)

What you don’t have (and not required):

  1. Display Device for the Raspberry Pi (HDMI enabled display unit / Old TV)
  2. Internet connection for the Raspberry Pi (LAN or WiFi)

Extra Stuff you need:

  1. Standard Network Cable (Cat 5, Standard or Crossover)
  2. PutTTY Software (will be used to SSH into the Pi)
  3. SD Card Writer

There are hundreds of tutorials sprawling across the web that show you how to remote access your Raspberry Pi’s desktop from your laptop/PC. This will come handy if you don’t have (or don’t want) a display unit to see your Pi or want to use your Laptop/PC’s screen and keyboard/mouse itself. This mode of accessing the terminal and/or desktop of the Raspberry Pi without connecting it to any display unit (and not connecting any keyboard/mouse to the Pi) is usually termed as Headless mode.

In most of the remote desktop tutorials, you’d need to initially install TightVNC Server (software that streams the Desktop’s GUI to any VNC Client) on the Raspberry Pi and then install any VNC viewer on the Laptop/PC. Now, installing TightVNC server on the Raspberry Pi requires it to be connected to the internet. And here’s my problem: I don’t have a Router or Internet cable in my home. I essentially use a 3G dongle for all my internet needs.

We even tried installing XRDP onto Raspberry Pi (by copying the tar and running it on the Pi) but this failed as it tried downloading the missing dependencies.

We tried couple of methods to share our Laptop’s internet connection with the Raspberry Pi but they failed. Desperate still to access my Raspberry Pi’s desktop, we stumbled upon this setup which finally worked.

Before we proceed with remotely accessing the Raspberry Pi’s desktop, we first need to be able to SSH into it (access it’s shell, akin to command prompt in windows OS). The procedure for SSHing into the Raspberry Pi without the need of any Display Device for Raspberry Pi is explained below.

Direct SSH into Raspberry Pi in Headless Mode

In this tutorial, we’ll quickly setup our Raspberry Pi connected locally to our PC/Laptop using a standard Cat 5 Ethernet cable (crossover not required).

Edit: 1st Dec, 2015:

I compiled a quick video illustrating the following steps so that you can configure it more easily.

Please follow the below steps to have a working SSH connection:

  1. Install and burn the latest Raspbian Wheezy OS onto the SD card for the Raspberry Pi
  2. While the Raspberry Pi is switched off, connect one side of the Ethernet cable to Raspberry Pi and other side to the RJ45 jack of the PC/Laptop
  3. Open LAN properties and make sure that IPV4 properties are set to Obtain IP address automatically as shown below:ImageImageImage
  1. We now need to determine the IP of our PC/Laptop when it’s connected to the Raspberry Pi
  2. Now power on the Raspberry Pi while making sure that the network cable is connected on both ends
  3. Wait for a min or two. You’ll notice that the PC/Laptop will scan and then show a small warning indicating the presence of an unidentified networkImage
  1. Now, open command prompt and type ipconfig. Note the IP of the Ethernet Adapter Local Area Connection as shown below:Image

In our example, its

  1. Now, power off the Raspberry Pi and take out the SD Card. Plug in the SD card into a card reader and open it. You should see a couple of filesImage
  1. Open the cmdline.txt file and append this to the end of it:


Please change the IP accordingly and assign a unique value (while making sure you don’t go beyond the subnet mask). Preferably, change only the last parameter

For example, if your LAN’s ip is, we recommend using as the IP for Raspberry Pi in cmdline.txt

  1. Save the cmdline.txt file without making any other changes
  2. Plug this back into the Raspberry Pi and with the Ethernet cables connected, power on the Raspberry Pi
  3. Wait a couple of minutes while the Raspberry Pi tries to establish a local network connection with our PC/Laptop
  4. Once you see the network warning message as shown above, ping the Raspberry Pi to see if it’s live on the network as follows
    1. Open CMD prompt
    2. Type ping ipaddress_of_raspberry-pi

Ex: ping

If all went good, you should see the Pi responding back to the ping requests as shown below:


  1. Now its time to SSH into the R Pi. Open PuTTY client and type in the IP address of the Raspberry Pi ( and hit OpenImage

You should get a certificate trust warning message (if SSHing for the first time) which you should accept. Once done, you’ll see the login terminal:Image

Enter pi

The password should be raspberry

Once done, hit enter. You should now see bash prompt as shown below:Image

Voila, you’re now SSHed into the Ras Pi. It’s all yours now 🙂

Now, moving on to access the Raspberry Pi’s desktop, we first need to install Xming X Server for windows from this link:

Make sure you install the SSH components also when prompted to do so.

Once that gets successfully installed, simply click the Xming icon and make sure it’s running in the background


Now, open PuTTY terminal and first enable X11 forwarding as shown below:Image

Now, direct SSH into the Raspberry Pi as explained previouslyImage


Once inside, simply type in midori and this should bring the Midori browser as a window


We’ll now hit in lxsession or startlxde and that should pop up the desktop of the Raspberry Pi:


Have fun 🙂

In order to close this, go back to the PuTTY terminal and kill this process using Ctrl + C

Note: This for some reason is still not showing the lower part of the Desktop including Start menu and taskbar.

Update: The above bug issue been fixed and a solution is available here (



kiran · August 20, 2013 at 10:11 PM

Thanks a lot anwaarullah it worked for me & your expiation is too clear that even novice users can work it out ….:-)

    anwaarullah · August 20, 2013 at 11:10 PM

    Glad it worked 🙂

Rick · September 17, 2013 at 6:34 AM

Hello Anwaarulla………..I have been searching for days to find a way to do exactly this, and then I saw your post at
I have just finished following your beautiful directions and everything has worked perfectly until I typed , and I get…., so I tried and and then your workaround when I got

Can you give me any Idea where I should look to correct this………………Rick

Rick · September 17, 2013 at 6:45 AM

Hello again Anwaarulla…..My last comment hasn’t rendered properly so here it is again.

……everything worked perfectly until I typed “midori” and I get “Midori Cannot open display, so I tried “startlxde” and “lxsession” and then your workaround “lxpanel”, when I got…. (lxpanel:2286) : Gtk-WARNING ** : cannot open display:

Can you give me any idea where I should look to correct this……Rick

    anwaarullah · September 17, 2013 at 6:55 AM

    Hi Rick,

    Do you have the Xming server running on your machine? The display will run only if you’ve xming or a similar server app running on your PC. If you’ve already installed xming, please start it from the desktop icon or from the start menu. Let me know if that works.

Rick · September 17, 2013 at 7:07 AM

Yes……..everything from start to finish, just as you instructed. I have reloaded Xming in case there was a problem with the download, with the same result.

    anwaarullah · September 17, 2013 at 7:13 AM

    Rick, when you type in “midori” or “leaflad”, do you get the midori browser as a separate window? Or leafpad as well? If yes, maybe you can verify Xming settings by opening Xlaunch and selecting the multiple windows options there.

Rick · September 17, 2013 at 8:02 AM

I’ve just repeated the following, again!!…… Start-all programs-Xming-Xlaunch-start session (startlxde (using PuTTY[plink.exe])) connect to IP # for Pi, with log in “pi” and password, saved configuration to desktop, Finish……….

and it opened straight to the Pi full screen desktop. I then opened the Midori browser from the desktop icon.

All is now working as it should.

It has taken me a few days to get this far because I don’t know anything about cmdline control, but I can very happily tell you that your clear and unambiguous instructions are the best that I have found, and they’ve been the springboard to the solution for what appears to be a very difficult problem for soooo many people…..if the vast number of blog posts is anything to go by.

Thank you, and people like you, for all the amazing work that you do……Rick

    anwaarullah · September 17, 2013 at 11:20 AM

    Glad it worked! Thanks Rick for those nice words 🙂

Rick · September 17, 2013 at 11:36 PM

Saed…….my difficulty getting your instructions above to work properly may have something to do with your step 14. which has missed out the rather crucial selection from the root tree, before you hit ‘Open’.


    anwaarullah · September 17, 2013 at 11:39 PM

    Rick, selection of what?

Rick · September 17, 2013 at 11:40 PM

Saed…….my difficulty getting your instructions above to work properly may have something to do with your step 14. which has missed out the rather crucial SSH/ Allow X11 forwardind, selected from PuTTY window root tree, before you hit ‘Open’.


    anwaarullah · September 17, 2013 at 11:45 PM

    Rick, if you scroll a little down, we did mention to first enable X11 forwarding before repeating the process 🙂

Rick · September 18, 2013 at 12:11 AM

Just ignore me……………

    anwaarullah · September 18, 2013 at 12:12 AM

    Nope, thanks for.pointing that out. I’m considering adding that info about X11 in point 14 itself.

Paul · October 16, 2013 at 4:38 PM

Hi, excellent tutorial thanks’. I have the system running so i can login etc. Is there any way that when logging onto the system i can log onto the actual current session that is running rather than create a new one, so i can take over the control of the system ?

khaja · December 12, 2014 at 8:33 PM

I have followed above steps but I stuck at login time in putty. It says unable to connect, connection timeout. I don’t know why. Could you help me in this?


    anwaarullah · December 13, 2014 at 12:19 AM

    Have you been able to fix the I.P of the RasPi properly?

khaja · December 13, 2014 at 3:10 PM

I did exactly as shown by you, and it could be correct because it first showed with error message asking to check host , which it did not recognize. When I changed it, it worked didn’t and straight away opened putty terminal.

khaja · December 13, 2014 at 3:41 PM

I did exactly as shown by you, and it could be correct because it first showed with an error message asking to check host , which it did not recognize. When I changed it, it worked and straight away opened putty terminal but the status of the terminal is inactive.

khaja · December 22, 2014 at 4:02 PM

Finally I got it working. Rasp pi did not initialize properly.


    anwaarullah · December 25, 2014 at 12:41 AM

    Great! Glad it worked 🙂

shamim9999Shamim Ahamed · December 31, 2015 at 3:20 PM

Thanks a lot. It worked!

    anwaarullah · December 31, 2015 at 4:11 PM

    Cool. Glad it helped 🙂

Fixing the missing LxPanel bug when direct accessing Raspberry Pi shell | Syed Anwaarullah · September 1, 2013 at 10:29 PM

[…] you followed our previous post (Direct SSH into Raspberry Pi in Headless Mode), you must have noticed that we were not able to get the lxpanel (the Start menu bar) of the […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *