maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Newbie (https://talk.maemo.org/forumdisplay.php?f=26)
-   -   forwarding X apps from N800 to desktop (https://talk.maemo.org/showthread.php?t=6015)

gsagers 2007-04-26 16:19

forwarding X apps from N800 to desktop
 
Let me preface this post by saying that I know about vncserver on the n800, vncserver on the desktop and RDP. All work fine to and from n800 and desktop, but I'd like a single app to be remotely displayed

I'd like to forward an X11 app on the n800 to my local X server on my desktop. I've set up OpenSSH, made sure that X forwarding is on in /etc/ssh/sshd_config, and that an XDisplayOffset of 10 is set, and restarted the ssh server. I then ssh -X user@n800, but my $DISPLAY variable on the n800 is still 0.0, rather than 10.0, as it should be. Manually doing an export DISPLAY=':10.0' doesn't work either, nothing displays on my local X server.

The other way around (ssh -X from n800 to desktop) and then running an app works fine. The DISPLAY variable (on desktop at that point) is properly set to 10.0, and I've compared the sshd_config files from n800 and desktop line-by-line, and they're identical for everything that should affect TCP and X forwarding.

Is this a limitation with Matchbox and Hildon, or am I doing something stupid here? As I say, I know how to forward X connections over SSH normally, but this isn't working.

benny1967 2007-04-27 17:04

Re: forwarding X apps from N800 to desktop
 
I can't even do "normal" (=non-SSH'ed) forwarding from the 770 to my desktop. It seems the applications on the 770 just ignore $DISPLAY

gsagers 2007-04-27 21:28

Re: forwarding X apps from N800 to desktop
 
Yeah, that's my take on it, too. Even if $DISPLAY is set, nothing happens - the app never loads, and I never get a prompt back w/o Ctrl+C

benny1967 2007-04-28 11:39

Re: forwarding X apps from N800 to desktop
 
mhm.... here the application does load/run, only it shows up on the 770 and not on the PC specified via DISPLAY. strange thing is I dont even get errors about not being able to connect to the display etc. ...

gsagers 2007-04-28 13:24

Re: forwarding X apps from N800 to desktop
 
Little more testing.... It seems to depend which app it is. If I run vncviewer, gpe-calendar, pwsafe, fmradio, and most others, they launch and display on the n800 (this is with ssh -X, and DISPLAY still as 0.0).

browser and mediaplayer-ui, on the other hand, don't launch, and just drop back to a shell.

Now, after manually setting $DISPLAY to 10.0 (export DISPLAY=':10.0') during the same SSH session, fmradio fails with Gtk - cannot open display:, as do pwsafe and gpe-calendar.

Vncviewer just returns to a prompt, no error. The browser and mediaplayer-ui just return to a prompt also, no error.

So, it appears that $DISPLAY is honored, at least by most apps, but something else is going on to prevent them from using it.

Edit: This is all as user, no "sudo su" or ssh -X root@n800 that could be confounding.

benny1967 2007-04-29 15:44

Re: forwarding X apps from N800 to desktop
 
I'm not sure... Try the following:

On your GNU/Linux desktop PC, type
DISPLAY=10.0.0.126:0; xterm; echo $DISPLAY
(with 10.0.0.126 being a non-existent IP-address)

The output will be something like:
xterm Xt error: Can't open display: 10.0.0.126:0
10.0.0.126:0

Which tells me that xterm tries to open the display.

Now, on a N800 or 770, do the same (do it on the device itself, dont ssh into the tablet):
DISPLAY=10.0.0.126:0; /usr/bin/osso-xterm; echo $DISPLAY

Again, 10.0.0.126 doesn't exist. What happens is that the application starts, without any error. After you close it again, you'll find that "echo" still prints the expected line
10.0.0.126:0
so we know $DISPLAY contains what we said it should and didn't magically return to :0.0

I don't have the applications installed you tried, but I used xchat, the calculator etc., and they all never throw an error. they just start up as if nothing had happened - as if they wouldn't read $DISPLAY at all.

gsagers 2007-04-29 19:32

Re: forwarding X apps from N800 to desktop
 
OK, testing as you said above:

xterm launches, echoes DISPLAY
browser (opera) launches, echoes the DISPLAY I set
fmradio - doesn't launch, w/GTK+ can't open display <IPADDR>
vncviewer - doesn't launch, no GTK error, echoes DISPLAY
gpe-calendar - doesn't launch w/GTK+ can't open display <IPADDR>
pwsafe - doesn't launch w/GTK+ can't open display <IPADDR>

So, some apps do honor $DISPLAY and some don't? Am I interpreting that right? But, even if they honor it, they won't export over SSH.

benny1967 2007-04-30 09:14

Re: forwarding X apps from N800 to desktop
 
This is getting too technical for me now; I always thought that this X feature is handled be the X framework itself and not by each single application.

Maybe Xomap simply doesn't support this feature at all? I tried to search google for further information about Xomap and remote X displays, but didn't find anything useful except:

Quote:

> Not everything runs smooth, it looks like the maemo's X-server lacks
> some features/extensions of other X-server.

These include the direct TCP connection support AFAIK, which is why
just exporting the display doesn't work.
on the mailing list here. (The thread is about the reverse situation, forwarding from the desktop to the 770, but nonetheless it's about X and TCP-connections.)

Maybe one of the developers could tell us more.

gsagers 2007-04-30 13:35

Re: forwarding X apps from N800 to desktop
 
Thanks for the thread pointer. I'll put this on the back burner for now I guess!

gammer 2007-07-03 12:23

Re: forwarding X apps from N800 to desktop
 
I just installed winaxep (http://www.labf.com/winaxeplus/index.html) on a MS Windows XP machine, then used their "telnet_ssh" to ssh to my N800 (with openssh installed). After "export DISPLAY=192.168.xxx.yyy:0" (the windows machine's IP address) and then "leafpad", the leafpad main window opened up on the XP desktop! Same for mirage (picture viewer from garage) and claws-mail. I was really surprised after all those failed trials to forward X-apps from the n800 to my linux desktop!! However, there where no window borders and menus were accessible via alt-f4 only. Nevertheless it's a starting point...


All times are GMT. The time now is 14:30.

vBulletin® Version 3.8.8