This is a fairly nooby question.
If I SSH into the RasPi (connected to the TV) from my laptop, can I launch a process so that it's visible on the TV?
For example, can I launch the excellent omxplayer to play a video on the TV, by issuing a command from the laptop via SSH?
BTW - I've been using Ubuntu on my laptop for ages, but am a complete novice at using Linux over a network.
Launching apps remotely
17 posts
Yes you can. Actually everything you start that is not designed to run in the console will start on the real screen.
- Posts: 150
- Joined: Fri May 18, 2012 9:40 am
- Location: Timisoara, RO
I have found that the easiest way to have a remote desktop is to install tight vnc server on the Pi.
So ....
You would sit at your laptop
ssh into your Pi
Run tightvncserver on your pi.
Then run VNC client on your laptop and attach to the Pi.
I'm actually sat here having just done that with the new Debian install.
- Code: Select all
sudo apt-get install tightvncserver
So ....
You would sit at your laptop
ssh into your Pi
Run tightvncserver on your pi.
Then run VNC client on your laptop and attach to the Pi.
I'm actually sat here having just done that with the new Debian install.
If you are just running SSH, ie a terminal session, then any graphical programs you run will be displayed on the TV. If you run an X server on your laptop, like Ximg, then starting graphical programs will make them come up on the laptop. You can change that by passing the --display flag to the command.
- Code: Select all
$ xeyes --display :0
Thanks, as soon as I get the wireless working I'll try it out 
It is actually "xeyes -display :0", or "DISPLAY=:0 xeyes". X predates the GNU double-minus option style.rurwin wrote:$ xeyes --display :0
I can VNC into my Raspberry Pi from my laptop. However the screen connected to the Raspberry Pi is not the same as on my laptop.My laptop is not controlling the screen connected to the Raspberry Pi but another instance of a desktop. Any ideas what I am doing wrong?
- Posts: 24
- Joined: Wed May 30, 2012 7:26 pm
TrevorAppleton wrote:I can VNC into my Raspberry Pi from my laptop. However the screen connected to the Raspberry Pi is not the same as on my laptop.My laptop is not controlling the screen connected to the Raspberry Pi but another instance of a desktop. Any ideas what I am doing wrong?
I could be wrong, but I think that if you launch the VNC session from the CLI, it creates a virtual session of X that is different from the one running locally.
Again, I could be wrong, but I'd try launching VNC from the X session itself to share that screen.
I haven't quite got the wireless network running yet, so I can't test it.
Thanks for the reply.
I currently start VNCserver from the terminal as I SSH into the raspberry PI. When you say I should start it from X session do you mean from the session running on the raspberry pi rather than from the terminal I ssh into? So to do this I would need to hook a keyboard up to the raspberry pi I guess? I cannot SSH in to sort this out? Would I then need to start the VNCserver from the raspberry pi each time, or can this be set up to start automatically?
I currently start VNCserver from the terminal as I SSH into the raspberry PI. When you say I should start it from X session do you mean from the session running on the raspberry pi rather than from the terminal I ssh into? So to do this I would need to hook a keyboard up to the raspberry pi I guess? I cannot SSH in to sort this out? Would I then need to start the VNCserver from the raspberry pi each time, or can this be set up to start automatically?
- Posts: 24
- Joined: Wed May 30, 2012 7:26 pm
I had a quick google, and it seems that http://www.karlrunge.com/x11vnc/ might be what you're looking for 
AndrewS wrote:I had a quick google, and it seems that http://www.karlrunge.com/x11vnc/ might be what you're looking for
That explains the behaviour of the 'regular' VNC nicely, thanks. ie VNC creates a 'virtual' instance of the GUI that is separate from what is seen locally.
I've only used VNC on Windows machines previously so the behaviour is subtly different.
It would be better (for some meanings of "better") to run an X server on the other PC.
If you use VNC then the RaspPi has to run not only the X server but also the VNC server. Both of those are very hungry.
If you run an X server on your PC, then the RaspPi does not run either of them, just the application.
If you use VNC then the RaspPi has to run not only the X server but also the VNC server. Both of those are very hungry.
If you run an X server on your PC, then the RaspPi does not run either of them, just the application.
@rurwin - I'm not really sure what you mean by running an X Server on the PC.
Google will be my friend on this one...
BTW - Have you seen today's Google Doodle? Simply brilliant.
Google will be my friend on this one...
BTW - Have you seen today's Google Doodle? Simply brilliant.
I used the instructions here:
http://www.caslab.queensu.ca/LabHelp/XServer/
and downloaded the referenced Xserver and Putty onto Vista (32bit).
VMware Player on Slackware host with Win Vista guest running an X server showing R-Pi running ARMedSlack forwarding X11 of xfce session:

Cheers,
Peter
http://www.caslab.queensu.ca/LabHelp/XServer/
and downloaded the referenced Xserver and Putty onto Vista (32bit).
VMware Player on Slackware host with Win Vista guest running an X server showing R-Pi running ARMedSlack forwarding X11 of xfce session:
Cheers,
Peter
geep999 wrote:VMware Player on Slackware host with Win Vista guest running an X server showing R-Pi running ARMedSlack forwarding X11 of xfce session:
Unless you're being deliberately obtuse, of course
Newt_Othis wrote:@rurwin - I'm not really sure what you mean by running an X Server on the PC.
X is a windowing system that runs in user-space. It is not tied to Linux. The server receives commands on a network connection. Most of the time we use it, the client program is on the same machine as the X server, but it doesn't have to be.
So if you run an X server on your windows PC, then the client program can be on the RaspPi. X does not have to run on the RaspPi and you do not need VNC, nor a Linux VM. Just an X server ported to Windows. Then any of the programs that run on the RaspPi will work perfectly with their display on the Windows PC.
All you need to do is to have an SSH terminal session and set up the DISPLAY environment variable to point to your Windows PC, but Xming linked to above has tools that do that automatically. You can have the RaspPi desktop in a Windows window, or have each RaspPi window open independently on the Windows desktop.
Just one Windows application to install; easy as Pi
geep999 has it right; Windows Vista acting as an X display for the RaspPi. It's just that Windows Vista happens to be a VM on a Linux box; those of us running Linux tend not have real Windows PCs handy. I've got an old Windows 2000 laptop around here, I'll see if I can set it up tomorrow and write a howto.
@AndrewS, geep999 is showing how it works with a Windows PC. Yes he could do it directly on Slackware, but that's not the point we are trying to demonstrate.
I was just playing around to see what's possible, and thought it made a nice screenshot.AndrewS wrote:Unless you're being deliberately obtuse, of course
Cheers,
Peter