Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Raspbian wheezy desktop GUI through ssh [closed]

I have a Raspberry pi that I have been accessing through SSH, but now I need to run a python program on it that has a GUI. I'm not sure how to do this through SSH. Usually I get to my raspi's desktop gui by typing startx. Is there anything I can do like this over ssh?

Thanks!

like image 302
Dale Markowitz Avatar asked Mar 29 '13 22:03

Dale Markowitz


People also ask

How to get SSH access to Raspberry Pi?

An IP address is required to get access to Raspberry Pi over Secure Socket Shell ( SSH ). (SSH is a network protocol that provides the administrator with a secure way to access a remote computer. SSH service is not enabled by default in Raspberry Pi. To enable SSH, access command line using sudo raspi-config command).

How do I login to Raspbian Wheezy/Jessie?

After establishing the connection by clicking “Open” a new window appears. Here you should insert your username and password. The Raspbian Wheezy/Jessie default login is user “ pi ” with password “ raspberry “.

What is the SSH server in Raspbian?

It is a remote login protocol that used Port 22 by default. In the older version of Raspbian, the ssh was enabled by default but after the November 2016 release of Raspbian, the ssh server was disabled by default and it needs to be enabled manually.

How to run GUI application via SSH?

How to run GUI application via SSH SSH is normally used for remote access and administration where tasks are done from the CLI (Command Line Interface), using command line tools. SSH can forward the display or GUI from the SSH server to the client, enabling running X11/X or graphical apps from within an SSH session.


1 Answers

The approach mentioned by kjprice just displays the applications you started on the remote host. If you want to see a complete dektop, you could either create a new Xserver or use Xephyr to nest a Xserver in the one you are currently using.

Well first create a new nested Xserver:

user@host $ Xephyr :1 -screen 800x600 &

A window called "Xephyr on :1" should spawn. Ssh into the remote host an forward the display to the created display:

user@host $ DISPLAY=:1 ssh -Y username@remotehost

Now start a session on the remotehost, in my case LXDE:

user@remotehost $ lxsession

You should now see the desktop in Xephyr. hf

like image 87
ManuelSchneid3r Avatar answered Sep 22 '22 19:09

ManuelSchneid3r