You are not logged in.

#1 2009-07-06 20:08:26

zakora
Member
Registered: 2008-05-12
Posts: 22

[SOLVED] Trouble with X forwarding

Hi everyone,

I just installed Archlinux on an old laptop (not my first Arch install).
I'm trying to use X forwarding (my old laptop Water acting the server, and archlaptop the client).

I installed xorg, xfce4 and wmii.
Here's the output of startx ran via ssh on the client :

vincent@Water> startx
xauth:  creating new authority file /home/vincent/.serverauth.3967             


This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.                                         
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.     
Select the "xorg" product for bugs you find in this release.           
Before reporting bugs in pre-release versions please check the         
latest version in the X.Org Foundation git repository.                 
See http://wiki.x.org/wiki/GitPage for git access instructions.         

X.Org X Server 1.6.1.901 (1.6.2 RC 1)
Release Date: 2009-5-8               
X Protocol Version 11, Revision 0   
Build Operating System: Linux 2.6.30-ARCH i686
Current Operating System: Linux Water 2.6.30-ARCH #1 SMP PREEMPT Fri Jun 19 21:25:17 UTC 2009 i686                                                             
Build Date: 28 June 2009  11:20:52AM

        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul  6 23:59:17 2009
(==) Using default built-in configuration (30 lines)
(EE) Failed to load module "ati" (module does not exist, 0)
(EE) Failed to load module "fbdev" (module does not exist, 0)

waiting for X server to shut down .error setting MTRR (base = 0xf4000000, size = 0x00800000, type = 1) Invalid argument (22)

Nothing appears when i run it on the client. But when i run it in the server i works  (it launches a very basic desktop environment).

When I try to run startxfce4 on the client or the server :

vincent@Water> startxfce4                                               
/usr/bin/startxfce4: X server already running on display localhost:10.0       
X Error of failed request:  BadAccess (attempt to access private resource denied)                                                                               
  Major opcode of failed request:  18 (X_ChangeProperty)
  Serial number of failed request:  8
  Current serial number in output stream:  10
Agent pid 14036
which: no dbus-launch in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core)
The program 'xfce4-session' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 458 error_code 10 request_code 4 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Agent pid 14036 killed

Here's the daemons list in my rc.conf (server) :

/etc/rc.conf (server) wrote:

DAEMONS=(syslog-ng network netfs hald sshd crond samba)

X forwarding is enabled in both server and client:

/etc/ssh/sshd_config (server) wrote:

X11Forwarding yes

/etc/ssh/ssh_config (client) wrote:

ForwardX11 yes

Why can i do in order to get X11 Forwarding working?

Tell me if you need more information.

Thanks,
Vincent

Last edited by zakora (2009-07-13 13:01:03)

Offline

#2 2009-07-06 23:05:19

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Trouble with X forwarding

I have never done startx with X forwarding, usually I do this:

connect with ssh -CY

then I just launch the app I want, if it is just to test everything work usually I launch xterm.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2009-07-07 06:31:03

zakora
Member
Registered: 2008-05-12
Posts: 22

Re: [SOLVED] Trouble with X forwarding

I can run application like xeyes, xterm (maybe more).
Can I run a desktop environment with X Forwarding?
XFCE still got a problem right?

Thanks

Offline

#4 2009-07-07 07:54:13

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Trouble with X forwarding

I'm not sure but I think X forwarding wasn't meant to forward the whole desktop environment .... or the other way around .... desktop environments are not made to be completely forwarded through X.

If you want such a thing consider using x11vnc or something similar.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2009-07-07 12:59:35

makimaki
Member
From: Ireland
Registered: 2009-04-02
Posts: 109

Re: [SOLVED] Trouble with X forwarding

R00KIE wrote:

I'm not sure but I think X forwarding wasn't meant to forward the whole desktop environment .... or the other way around .... desktop environments are not made to be completely forwarded through X.

If you want such a thing consider using x11vnc or something similar.

It might not have been intended, or particularly useful but you certainly can do it, I've ssh'd to the maths dept computers at college and started kde from the terminal. I only did it for fun a few times, but thankfully their servers can handle the load, and the intranet is quite fast so I had no problems. I generally only get mathematica, konqueror, or firefox forwarded to my laptop.

As Rookie said, vnc might be a better option for you. Personally I have vnc on all my experimental* pcs so I can check/control them from home, and if you want to you can still use ssh forwarding to have a more secure connection than just using vnc on its own. It also means you can view/run your apps from any non *nix OS. We have it running on one of our old amigas that still controls one setup, always amusing to vnc to!

For reference, here is the command I call when I login to my maths account:

sudo ssh -Y -L 5901:server.dns:5901 username@server.dns

This forwards the local port (-L) 5901 to 5901 on the server (useful for tunneling through the proxy).

I already have a vnc server running on the server, so once I have ssh'd in, in my local terminal I call

vnc localhost:1

This will then tunnel throught the ssh connection and will connect to the vnc server on my maths account. You might have noticed the -Y switch, that is for secure X11 forwarding, there is another one -X which is unsecure, you can check it in the ssh man pages. With the -Y switch I can call apps such as mathematica from the maths dept and have it forwarded to my local X11.

One other thing that you might find useful is SSHFS: http://wiki.archlinux.org/index.php/Sshfs
I use this to mount remote folders such as my data folders in experimental pcs, my main lab pc, and my maths accounts. I find it much more convenient to use than samba.

* As in pcs controlling experimental setups and measurements, not pcs that are tests/prototypes


====* -- Joke
    O
    \|/ --- Me
    / \             Whooooosh

Offline

#6 2009-07-09 11:23:31

zakora
Member
Registered: 2008-05-12
Posts: 22

Re: [SOLVED] Trouble with X forwarding

Thank you for your replies.

I don't have plenty of time so I just tested few things.
So X Forwarding seems to work after all (in fact it has always worked), still I can't start XFCE (from the server nor the client) but that is just another point.
I can run X applications (like xterm) even if I don't put '-Y' or '-X' in the ssh connect command, is this normal?

I'll try VNC.


Vincent


UPDATE: For XFCE, I installed dbus and it worked...

Last edited by zakora (2009-07-13 13:00:36)

Offline

#7 2009-08-28 06:19:56

stickyboy
Member
From: София
Registered: 2009-08-18
Posts: 7
Website

Re: [SOLVED] Trouble with X forwarding

Hmm, I was getting a "attempt to access private resource denied" while running an application over X forwarding to an older Linux server.  I used `ssh -X` from my Arch box to an older Linux server.  X forwarding was working, but only for some apps (like xcalc).  It seems this fixed it, from the ssh manpage:

-Y     Enables trusted X11 forwarding.  Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

Thanks.

Last edited by stickyboy (2009-08-28 06:22:28)

Offline

Board footer

Powered by FluxBB