You are not logged in.

#1 2010-12-03 23:29:11

mapster
Member
Registered: 2009-06-03
Posts: 31

Starting graphical applications through ssh

After a fresh installation of arch on my media computer in the livingroom I can no longer start graphical applications through ssh. Meaning I can't start vlc on the lcd-screen connected to the pc. My .bashrc has "export DISPLAY=:0".

I can't even run glxinfo.


stdout from vlc:

VLC media player 1.1.5 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x947ad3c] inhibit interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.

[0x947ad3c] main interface error: no suitable interface module
No protocol specified
[0x9479e6c] main interface error: no suitable interface module
[0x927f914] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x927f914] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
No protocol specified
[0x9478e9c] qt4 interface error: Could not connect to X server
No protocol specified
[0x9478e9c] skins2 interface error: Cannot open display
[0x9478e9c] skins2 interface error: cannot initialize OSFactory

stdout from glxinfo:

No protocol specified
Error: unable to open display :0

I hope some kind soul can help me tongue

Last edited by mapster (2010-12-03 23:32:53)

Offline

#2 2010-12-03 23:39:01

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Starting graphical applications through ssh

Did you pass -X on the command line when connecting?

ssh -X user@host

Last edited by skunktrader (2010-12-03 23:39:12)

Offline

#3 2010-12-03 23:49:19

mapster
Member
Registered: 2009-06-03
Posts: 31

Re: Starting graphical applications through ssh

I think I was a bit unclear about my goal.
My goal is to sit on the couch with my laptop, ssh to the media computer (which is connected to my lcd tv)  and start vlc so that it displays on the lcd tv.

(btw ssh -X media, forwards X programs correctly to the clients).

Last edited by mapster (2010-12-03 23:50:38)

Offline

#4 2010-12-04 01:18:05

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Starting graphical applications through ssh

You need to set the DISPLAY variable on the media computer before starting vlc:

DISPLAY=:0.0
vlc /path-to file

Offline

#5 2010-12-04 01:30:04

jimbok
Member
Registered: 2009-09-17
Posts: 51

Re: Starting graphical applications through ssh

If you have ssh configured to forward properly, you will not need to manually set the DISPLAY variable.  Search the wiki for more info.  I use ssh -XYC on my laptop because of the lower wireless bandwidth.


Registered Linux User #402088

Offline

#6 2010-12-04 04:26:51

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Starting graphical applications through ssh

jimbok wrote:

If you have ssh configured to forward properly, you will not need to manually set the DISPLAY variable.  Search the wiki for more info.  I use ssh -XYC on my laptop because of the lower wireless bandwidth.

I don't think that's what mapster is trying to do.

Mapster, you want to use SSH to login to another computer, start a GUI application, and have that application appear on the screen that you are logged in to, correct?

In other words, you are using a laptop as a fancy remote control. wink

I have no idea how to do that. O_o

EDIT: ...setting the DISPLAY variable and NOT using the -X command didn't work for me...

Last edited by drcouzelis (2010-12-04 04:29:47)

Offline

#7 2010-12-04 09:33:22

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: Starting graphical applications through ssh

maybe you should first run
$ xhost +localhost
ON your living room computer, and then connect to it via ssh?

Offline

#8 2010-12-04 10:55:21

mapster
Member
Registered: 2009-06-03
Posts: 31

Re: Starting graphical applications through ssh

drcouzelis wrote:
jimbok wrote:

If you have ssh configured to forward properly, you will not need to manually set the DISPLAY variable.  Search the wiki for more info.  I use ssh -XYC on my laptop because of the lower wireless bandwidth.

I don't think that's what mapster is trying to do.

Mapster, you want to use SSH to login to another computer, start a GUI application, and have that application appear on the screen that you are logged in to, correct?

In other words, you are using a laptop as a fancy remote control. wink

I have no idea how to do that. O_o

EDIT: ...setting the DISPLAY variable and NOT using the -X command didn't work for me...

Correct.

I have done this in the past without having to do any settings, except defining the DISPLAY variable either by exporting it or defining it at the start of every command to be run. (it works with no extra settings from the livingroom computer ssh'd in to my laptop and running GUI application on the laptop screen).

It now works on the living room computer with the command below, anybody know why that has to be run now, and not in the past? Are the default settings shipped with arch changed?

$ xhost +

Last edited by mapster (2010-12-04 10:57:59)

Offline

#9 2010-12-04 17:27:37

xxxspuddy
Member
Registered: 2007-05-15
Posts: 57

Re: Starting graphical applications through ssh

Are you logging in as the same user that is running the session on display 0? if it only works with xhost+ that sounds like an .Xauthority (permissions) problem, like the error from vlc.


A temporary file is just a pipe with an attitude and a will to live.

Offline

#10 2010-12-05 13:48:40

mapster
Member
Registered: 2009-06-03
Posts: 31

Re: Starting graphical applications through ssh

Yes I am logging in as the same user, and I've even tried running glxinfo as root.
I haven't tried xhost +localhost because I read in the man pages that "xhost +" would remove access restrictions on the host, and that is no problem for this computer as it has no direct access to the internet.

Offline

Board footer

Powered by FluxBB