Active Topics

 


Reply
Thread Tools
Posts: 35 | Thanked: 9 times | Joined on Sep 2006
#1
I installed dropbear on my OS2006 IT.

I can't seem to get X forwarding working.

Dropbear seems to be used by many folks on various platforms. There are so many (unchallenged) references to dropbear supporting X forwarding, that I think I must be doing something wrong.

I am using PuTTY on an XP Pro laptop to ssh into my 770. "Plain vanilla" ssh access works great.

I installed the Xming X server on the laptop. Seemed to install just fine.

I want to use the laptop PuTTY and Xserver to interact with some GUI apps on the Nokia 770. I configured PuTTY for X forwarding (checked the box and entered the display value [localhost:0.0]), and then logged into the Nokia (as root). But, I could not get any X apps to display on the laptop. On the 770, it looks like X forwarding is enabled. By that I mean that the ssh daemon (dropbear) has properly redefined the DISPLAY environment variable (on the 770) to "localhost:10.0", and, as verified by netstat, has properly set up an X forwarding listener on port 6010.

So, it looks like dropbear is doing what it should for X forwarding. Nevertheless, it doesn't work. When I try to invoke an X app remotely (from my laptop) I get an error message that the server could not connect to the display.

I think the most likely thing is that I am not doing something correctly. Or could it be that dropbear, in spite of the many websites that assert that dropbear does X forwarding, is defective? Or is it just the Maemo dropbear that has problems? Or is it something else that I am not considering?

Thank you for any comments.

DG

[Edit]
P.S. I also tried editing /etc/default/dropbear to include the additional line "X11Forwarding yes", and also to include the string "-X" in the "DROPBEAR_EXTRA_ARGS" line.

Last edited by dgpretzel2; 2006-09-25 at 01:06.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#2
Originally Posted by dgpretzel2
I installed the Xming X server on the laptop. Seemed to install just fine.

I want to use the laptop PuTTY and Xserver to interact with some GUI apps on the Nokia 770. I configured PuTTY for X forwarding (checked the box and entered the display value [localhost:0.0]), and then logged into the Nokia (as root). But, I could not get any X apps to display on the laptop.
You may also try without forwarding. Just set DISPLAY on n770 directly to ip.of.your.laptop:0. If this doesn't work too than dropbear may not be the problem. But in this case check if your laptop firewall does not block incoming X traffic and n770 is authorized to use the xserver (xhost +)

Originally Posted by dgpretzel2

So, it looks like dropbear is doing what it should for X forwarding. Nevertheless, it doesn't work. When I try to invoke an X app remotely (from my laptop) I get an error message that the server could not connect to the display.
So now you did it the other way? laptop application on n770 screen? dropbear x forwarding has nothing to do with this when you ssh from laptop to n770. Or did you ssh from n770 to your laptop (via dbclient command)?
Also I think xserver on n770 is not built (or started?) with TCP/IP support so you can't display anything remote on n770 screen. I'm not 100% sure about this, please correct me if I am wrong.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#3
Just tried it with dropbear X forwarding, doesn't work for me too with openssh on PC.

$ ssh -v -X root@n770-bt
..
..
..
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
sh: /usr/X11R6/bin/xauth: not found


BusyBox v1.01 (Debian 3:1.01-4.osso10-ipv6.etc1) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia770-26:~# echo $DISPLAY
localhost:10.0
Nokia770-26:~# leafpad
debug1: client_input_channel_open: ctype x11 rchan 1 win 8000 max 8000
debug1: client_request_x11: request from 127.0.0.1 8965
debug1: channel 1: new [x11]
debug1: confirm x11
X11 connection rejected because of wrong authentication.
debug1: channel 1: free: x11, nchannels 2
The application 'leafpad' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
Nokia770-26:~#


Looks like I would need 'xauth' on n770 for this to work.
 
Posts: 35 | Thanked: 9 times | Joined on Sep 2006
#4
check if your laptop firewall does not block incoming X traffic and n770 is authorized to use the xserver (xhost +)
Thank you for the tip. I know how to open a port through the firewall, but I don't know how to do the "xhost" command on my XP Pro laptop. If you have time, would you please clarify a little further?



So now you did it the other way? laptop application on n770 screen? dropbear x forwarding has nothing to do with this when you ssh from laptop to n770. Or did you ssh from n770 to your laptop (via dbclient command)?
Also I think xserver on n770 is not built (or started?) with TCP/IP support so you can't display anything remote on n770 screen. I'm not 100% sure about this, please correct me if I am wrong
Perhaps my initial question was confused or posed poorly. I have no desire to forward anything to my N770. I want to access the N770 from a remote machine. I want to run an X Server on my XP Pro laptop and see X apps, which are running on the N770, displayed on the XP Pro laptop.



Looks like I would need 'xauth' on n770 for this to work.
Do you think this is just an oversight in the N770 port of dropbear? Perhaps xauth is included in other ports of dropbear?? I wonder if dropbear implements X forwarding properly on other platforms.


DG
 

The Following User Says Thank You to dgpretzel2 For This Useful Post:
Posts: 39 | Thanked: 1 time | Joined on Aug 2006
#5
If you can't get to work X-forwarding you can install the available VNC server (look in application catalog, there is a repository for it) on the 770 and access it that way. Worked well the last time I tried.

Bye, tira.
 
Posts: 35 | Thanked: 9 times | Joined on Sep 2006
#6
tirabosco,

Thank you for the suggestion. I will try that eventually. But, I'm still interested in understanding what is happening (or not :-) ) with N770 dropbear.



fanoush,

I was looking over the thread again, and I think I see why you thought I was trying to go "the other way". Probably because of my edits to /etc/default/dropbear. I was just trying stuff, even if it didn't make any sense. But, my intent is to understand how to get N770 to do X forwarding in response to a request from ssh on a remote machine which is also running an X Server.

Opening port 6000 on my XP Pro laptop and just setting DISPLAY env var on N770 to <IP-address-of-remote-machine>:0.0 (not attempting to use SSH X Forwarding, but just unencrypted, plain vanilla setting of DISPLAY) still didn't work.

I see from your remarks that you were also unable to get X Forwarding to work, and that you tried ssh directly (as opposed to PuTTY). If I understand you correctly, you identify the missing 'xauth' as a possible cause of the problem.


DG
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#7
Originally Posted by dgpretzel2
I see from your remarks that you were also unable to get X Forwarding to work, and that you tried ssh directly (as opposed to PuTTY). If I understand you correctly, you identify the missing 'xauth' as a possible cause of the problem.
Yes, I supopose xauth is the problem (or part of the problem) when forwarding via ssh. But there is also something other fishy here. In direct mode (export DISPLAY=mypc:0) I tried leafpad and it crashed with some strange X error BadWindow. When googled for it it suggested to use ssh -Y instead of -X with gtk based apps (I didn't use any of them in direct mode). I suppose the problem can be in gtk 2.6 on n770 or something deeper or in Xming on PC (unlikely). Unfortunately I don't have any pure X client on N770 (like xcalc,xterm). Maybe scummvm based on SDL is pure X but it doesn't work either (just hangs, looks like working, but no window displayed on PC or N770).

As for xhost, it is executable command in cygwin and linux, in Xming there is some checkbox 'No acces control' which is same as 'xhost +'. But with xhost you can specify list of servers alowed.
 
Posts: 35 | Thanked: 9 times | Joined on Sep 2006
#8
Unfortunately I don't have any pure X client on N770 (like xcalc,xterm)
I was a little confused on X apps on N770. For instance, I looked for the xterm binary, but didn't find it. Not even an "xterm" sym link to a bin. I did a 'find / -name "*xterm*"' and discovered the "osso-xterm" files. Didn't know quite what to make of them. They don't seem to be executable by themselves. By that, I mean I can't get a new xterm by executing any them from the existing xterm. I guess I have to do some reading (at maemo.org maybe?) about how the N770 really works. It seems somewhat different from the Unix flavor I usually work with.

On other platforms, when I need to test whether I have good X functionality, I always just try to execute "xclock" as a test. But, no xclock on the N770. In fact (as you indicate) there aren't really any "normal" X apps that I can see.

I wonder if the folks that use openssh (instead of dropbear) are able to do X forwarding.



As for xhost, it is executable command in cygwin and linux, in Xming there is some checkbox 'No acces control' which is same as 'xhost +'. But with xhost you can specify list of servers alowed
Previously, I just didn't fully understand what you were suggesting I do because xhost is not an XP Pro command utility. I now understand you were making an analogy.


I appreciate the comments. Very instructive.


Regards,

DG
 
Posts: 191 | Thanked: 29 times | Joined on Sep 2007 @ Ottawa
#9
I too am interested in getting X forwarding working.
I just got this N800 (Yesterday) but have been using Linux for years. I know there is a "tcp forward" option on desktop linux GDM which will prevent X forwarding. I wonder if there isn't something like this on the Nokia that is preventing us from us X the way it was intended.
__________________
N800, Think Outside Kbd, 8GB SDHC Card (OCZ, ext2), and 8GB SD Card (Patriot formatted as VFAT)
Zaurus SL-6000, IR Keyboard, 1GB SD Card
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#10
I too haven't managed yet, because of the X security on the IT.

What I managed to do is launch an app and display it on my PC but _NOT_ tunneled (so all passing unencrypted..)
Using kdm and debian
First the local Xserver has to listen for incoming connections. By default in Debian this is hardcoded so that it does not listen, for security reasons.
vi /etc/kde3/kdm/kdmrc
Change
ServerArgsLocal=-nolisten tcp
to
ServerArgsLocal=
Restart X windows (ctrlAltBackSpace)
then login and allow people to connect to your DISPLAY:
xhost +

then log in to your IT:
ssh me@192.168.1.5

set DISPLAY variable
export DISPLAY=linux_ip:0.0

and start an application that is linked to xlib (which uses the DISPLAY variable)
xchat

Pops!

Now the real X11 forwarding would be xchat would connect to localhost:10.0 (IT:10.0) tunneled to PC:0.0
But no xauth so connection to localhost:10.0 doesn't work (due to missing xauth yes)
Maybe as user "user" it does work.
I'll try again later and post here
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:01.