Bug 2494 - Xwindow display can not be exported to another Linux machine
: Xwindow display can not be exported to another Linux machine
Status: RESOLVED INVALID
Product: Core
X Server
: 4.1 (4.2008.23-14)
: All Linux
: Medium normal with 7 votes (vote)
: ---
Assigned To: unassigned
: x-server-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2007-12-05 20:17 UTC by Craig Miller
Modified: 2008-12-06 16:04 UTC (History)
3 users (show)

See Also:


Attachments
Xauth Debian package for Diablo devices (29.14 KB, application/x-debian-package)
2008-08-06 17:56 UTC, Eero Tamminen
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Craig Miller (reporter) 2007-12-05 20:17:34 UTC
STEPS TO REPRODUCE THE PROBLEM:
1) Log into n800 from another Linux machine
2) set DISPLAY variable to Linux machine eg. export DISPLAY=linuxhost:0
3) start osso-xterm, or any other application from the command line

EXPECTED OUTCOME:
osso-xterm display should appear on Linux machine.

ACTUAL OUTCOME:
After a few seconds an error message appears saying application could not
connect to display.

REPRODUCIBILITY:
(always/sometimes/once)
Always.

EXTRA SOFTWARE INSTALLED:
anything that will permit remote login, such as sshd.

OTHER COMMENTS:
I understand that this problem is also present in the OS2008 beta, but haven't
tried it myself.
Comment 1 Adam.P 2007-12-14 00:59:10 UTC
yes I have noticed this exact same issue. EG.

'ssh -X n800ipaddy' does not setup the SSH forwarding correctly, currently it
is one way only, I can forward X from my Linux box to the N800 but not the
other way around. 

A small discussion on ITT
(http://www.internettablettalk.com/forums/showthread.php?t=12761)

Cheers
Comment 2 David Hagood 2008-01-30 18:17:41 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 Andre Klapper maemo.org 2008-07-28 12:08:40 UTC
So this is still an issue on Diablo I guess?
Comment 4 Craig Miller (reporter) 2008-07-28 14:37:22 UTC
This is correct. The problem still exists in Diablo, and can be reproduced
using the same steps.
Comment 5 Eero Tamminen nokia 2008-08-06 17:56:17 UTC
Created an attachment (id=864) [details]
Xauth Debian package for Diablo devices

If you want to run X applications from the device to your desktop host
or the other way around, you have to forward the X server connection
from your desktop to the device with SSH:
  user@host$ ssh -X root@<device IP> maemo-summoner /usr/bin/osso-xterm.launch

The reason why you need to use SSH X forwarding is that X servers
in about all Linux distributions (including maemo and most likely
your desktop) disable TCP connections for security reasons (as they
should).  You may also have a firewall that blocks connections to
X server TCP port even if X would provide it.

As to other reasons why X forwarding may fail, you may not:
- have enabled X11 forwarding from the remote machine sshd configuration
- Have xauth installed to your remote machine, ssh needs it for forwarding

(ssh -v option tells you why things fail)

Xauth is not on the device by default, but it builds fine from Debian Lenny
xauth source package.  Attached.


I'm not sure whether it would be better for maemo ssh to depend from
xauth or device to have it by default.  It's a bit annoying that SSH
requires -v option to give warning about missing xauth.  Higher level
things like maemo SDK+ could also have xauth in their dependencies.
Anyway, these would be other bugs.
Comment 6 Eero Tamminen nokia 2008-08-06 18:01:42 UTC
Setting as invalid, either (original) reporter didn't use X forwarding
or if issue was about forwarding host X to device (to run apps from
device to host), that requires xauth package which is not installed
on the reporter's device (but attached to this bug).
Comment 7 luca 2008-08-11 01:04:59 UTC
Apart from the attachment to this bug, in what repository is the xauth package
available?
Comment 8 Eero Tamminen nokia 2008-08-11 10:33:51 UTC
(In reply to comment #7)
> Apart from the attachment to this bug, in what repository
> is the xauth package available?

The source package is unmodified Debian Lenny xauth package.  If you
want it to e.g. extras, you could raise this issue e.g. on maemo-devel.
I already added note about xauth to Wiki:
  http://wiki.maemo.org/Root_access#OpenSSH


The maemo binary package was provided just to verify that the issue is not
in the device software or in the packages.  If you look at your ssh package
('dpkg -s ssh' or 'dpkg -s openssh-server openssh-client' depending on
which ssh version you've installed), you'll see that it suggests
installation of xbase-clients:
  http://packages.debian.org/etch/openssh-server

If you'll look at the xbase-clients package description:
  http://packages.debian.org/etch/xbase-clients

You'll see that xauth is one of the included binaries.  However, package
manager doesn't install package suggestions (in any distro), you need to
install them yourself.

As Etch xbase-clients contains a lot of things and in Debian Lenny xauth
was split into separate package[1], the attached xauth binary package was
build from the Lenny source package:
  http://packages.debian.org/lenny/xauth

It builds just fine in Sbox.


[1] Lenny ssh package "recommends" xauth instead of having a "suggests"
    for xbase-clients like Etch version has.  Most package management
    front-ends in Debian install "recommends" packages automatically,
    but I don't think maemo application installer does that because
    unlike desktops, these devices don't have gigs of free disk space.
Comment 9 luca 2008-08-11 12:15:31 UTC
Nokia-N800-23-14:/media/mmc2# LANG=en dpkg -i Xauth.deb.htm
(Reading database ... 20406 files and directories currently installed.)
Preparing to replace xauth 1:1.0.3-2 (using Xauth.deb.htm) ...
Unpacking replacement xauth ...
dpkg: dependency problems prevent configuration of xauth:
 xauth depends on libxmuu1; however:
  Package libxmuu1 is not installed.
dpkg: error processing xauth (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 xauth
Nokia-N800-23-14:/media/mmc2# LANG=en apt-get install libxmuu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libxmuu1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libxmuu1 has no installation candidate
Comment 10 Eero Tamminen nokia 2008-08-11 12:51:21 UTC
(In reply to comment #9)
> Nokia-N800-23-14:/media/mmc2# LANG=en apt-get install libxmuu1
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package libxmuu1 is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> E: Package libxmuu1 has no installation candidate

Sorry, you need to enable Diablo tools repository:
  http://maemo.org/development/tools/

(Xauth might go into tools repository also in Fremantle if somebody
does a bug about that for the tools component.)
Comment 11 luca 2008-08-11 20:36:40 UTC
I already had that repository enabled:

~ $ cat /etc/apt/sources.list.d/hildon-application-manager.list | grep tools
deb http://repository.maemo.org/ diablo tools/free tools/non-free

In fact if I search a package from the tools repository I can find it, e.g:

~ $ apt-cache search tcpdump
libpcap0.8 - System interface for user-level packet capture
libpcap0.8-dev - Development library and header files for libpcap 0.8
tcpdump - A powerful tool for network monitoring and data acquisition
Comment 12 Eero Tamminen nokia 2008-08-12 12:26:32 UTC
(In reply to comment #11)
> I already had that repository enabled:
> 
> ~ $ cat /etc/apt/sources.list.d/hildon-application-manager.list | grep tools
> deb http://repository.maemo.org/ diablo tools/free tools/non-free

Sorry again, it was from the SDK repo after all:
http://repository.maemo.org/dists/diablo/sdk/free/binary-armel/Packages

You can get the package directly from the pool too:
  http://repository.maemo.org/pool/maemo4.1/free/libx/libxmu/
Comment 13 luca 2008-08-12 13:19:11 UTC
Ok, I managed to install xauth and effectively X forwarding works (the only
problem seems to be that the main menu of the applications doesn't show).
However, while I do understand that space on the device is limited, I also
think this is the expected default behaviour, so probably xauth should be
installed by default.
I opened bug #3556 for it.
Comment 14 Eero Tamminen nokia 2008-08-14 19:23:20 UTC
(In reply to comment #13)
> Ok, I managed to install xauth and effectively X forwarding works (the only
> problem seems to be that the main menu of the applications doesn't show).

It's not a menu(bar), it's a titlebar.  Our window manager tells the
application
when its titlebar is clicked (with an X message) so that it knows to show its
menu.

I think F4 equals to the device menu key which you can also use to open the
menus.