I am trying to connect my Pi to my laptop, I have finished installing the OS and through PuTTY and Xming, I am trying to setup the connection but now startlxde command doesn't work.

Can someone help me with this? Please see the image, that's the error I am getting. I am able to perform operations on the Pi using sudo rasbpi-config though.

Screenshot of startlxde:command not found

  • Have you actually installed it, is it in your path? – Greenonline Jun 15 '17 at 5:07
  • You did install full raspbian image? – Jaromanda X Aug 3 '18 at 13:22
  • 1
    Note that this question was asked over a year ago (from Jun 15, 2017 to Aug 5, 2018), and that the OP has not responded to a comment or an answer since posting the question. That may suggest that this question has been "orphaned", and that no additional feedback is forthcoming. – Seamus Aug 5 '18 at 3:36

Run below command in terminal session:

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


sudo systemctl start vncserver-virtuald.service

to setting up your vncserver run:

vncserver    :1

in pc/mobile you can install and run vncviewer (client) with port ie.


then the login to your raspberry pi.

External references:



In theory, as long as you have Xming running, it is possible to display GUI over ssh. I have tried that on other linux systems before, although not specifically on pi.

In my experience it can be difficult to configure things exactly right, but I am not a pro at this by any means. You should read this for ideas: https://elinux.org/RPi_Remote_Access

I find that using MobaXterm works better for me. It has a X server built in. And startlxde works fine. You can also launch individual GUIs. (Like type lxterminal in your ssh connection)

  • it might be hard to configure things exactly right - install xming, make sure X11 forwarding is enabled in your putty session, start putty, execute commands ... easy as (I happened to have just done this for the first time on a raspberry pi about 2 hours ago) – Jaromanda X Aug 3 '18 at 13:19
  • @hzlin: I've been asked to review your answer. After reading the question, and your answer, it seems you have some good ideas, but you are also suggesting the OP change from Xming to MobaXterm. That might be a good idea, but perhaps we should try to answer the original question first? The link you referenced looks to be informative; do you see anything that the OP may not have done? If so, perhaps suggest he try that first, before installing another software package? – Seamus Aug 4 '18 at 23:33

Use manually commands like in lx terminal type "pcmanfm" this is a alternate to start gui in pi. Then file explorer will pop up in that simply go to application tab where you find severals application associated to pi.


Putty is an SSH client, it is impossible to display a graphical environment through an SSH session, or TELNET etc ...

To display the graphical environment of Raspbian, you have to connect the Pi to a screen (HDMI)

  • Perhaps you don't know what xming is in the question title – Jaromanda X Aug 3 '18 at 13:19

As already said, Putty is an SSH (Secure Shell) client and cannot display the GUI.

Moreover, the command for starting the GUI is "startx" now.

You can get the GUI for Raspberry Pi by using VNC (just like ssh).

You just have to go to raspi-config and set VNC SERVER to ON. (Just like SSH)

And then you should download VNC VIEWER APP on your phone or desktop. ( Analogous to PUTTY)

Put in your Pi's IP address and enter tour password- default is raspberry.

There are two possibilities now-

1) You'll be inside the command line of Pi. Just type 'startx' (without quotes . And you'll have the GUI (Desktop interface) loaded.

2) You may be directly taken to the GUI.

  • Do let me know if you have any other doubts:) – Manav Jun 15 '17 at 18:39
  • did you notice "xming" in the question title? – Jaromanda X Aug 3 '18 at 13:20
  • Yes what about it? – Manav Aug 3 '18 at 13:28
  • well, putty + xming is exactly how you run X on windows - you are correct, putty doesn't "do" GUI - but the question states the OP has putty AND xming - and doing exactly what OP said, I get a LXDE desktop on my windows 10 PC from the Pi – Jaromanda X Aug 3 '18 at 13:30

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