Subject: Re: [vserver] compiling vmplayer modules in a debian 2.6.18-amd64 vserver
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Tue, 6 Jan 2009 01:56:55 +0100

On Mon, Jan 05, 2009 at 11:51:27PM +0100, Ekkard Gerlach wrote:
> "cannot connect to X server arthur2:10.0" - any help?
> 
> 
> * Herbert Poetzl schrieb:
> [...]
> > try loading the module on the host, and do not forget to
> > provide the device nodes (interface to userspace) to the
> > guest .. also note that this is a potential backdoor to
> > the kernel (not worse than vmware on a non Linux-VServer
> > machine though), and you might want to consider using
> > kvm instead of the vmware player
> I'll try kvm later, my customer runs a completely configured WinXP 
> under vmplayer, I don't want to re-install all.
> 
> Okay, vmplayer seems to run, modules are loaded by the host. 
> Next problem: Start vmplayer with ssh -X to a Linux client fails
> withs lots of error messages. 
> 
> A more simple testing: 
> 
>    pc16@arthur:~> ssh -X pc19@10.0.0.49 /opt/kde3/bin/kwrite
>    kwrite: cannot connect to X server arthur2:10.0
> 
> on the vserver's log: 
>   Jan  5 22:50:01 arthur /usr/sbin/cron[19932]: pam_loginuid(crond:session): set_loginuid
failed opening loginuid

getting a recent kernel should fix that too

> I searched with google and found your (  Herbert Poetzl's) thread: comment out
> pam_loginuid.so  in /etc/pam.d/*. I commented out: 
> 
> arthur2:/etc/pam.d # grep pam_loginuid.so *
> atd:#session            required        pam_loginuid.so
> crond:#session  required       pam_loginuid.so
> login:#session  required        pam_loginuid.so
> sshd:#session    required       pam_loginuid.so
> xdm:#session  required       pam_loginuid.so
> 
> then rcsshd restart (suse 10.2). 
> 
> Now on client the same error message: 
>   pc16@arthur:~> ssh -X pc19@10.0.0.49 /opt/kde3/bin/kwrite
>   kwrite: cannot connect to X server arthur2:10.0
> 
> but any error message on vservers log (/var/log/messages), each connect: 
> 
>   Jan  5 23:00:23 arthur sshd[20226]: Accepted publickey for pc19 from 10.0.0.9 port
52410 ssh2
> 
> and nothing else! Where could be the fault? 

most likely in your x11 forwarding .. check with
something simple like xclock, make sure that your
sshd has X11 forwarding enabled and that you have
xauth installed to get the required authorization

> Starting vmplayer: 
> pc16@arthur:~> ssh -X pc19@10.0.0.49 vmplayer '/home/vmware/WinXPprof/WinXPprof.vmx'
> /usr/lib/vmware/bin/vmplayer: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no

> version information available (required by /usr/lib/libcairo.so.2)
> 
> (vmplayer:21209): Gtk-WARNING **: cannot open display:  
> 
> (vmplayer:21219): Gtk-WARNING **: cannot open display:  
> 
> BTW: a  ssh -X .... kwrite  or .... vmplayer to Suse 10.2 machine natively 
> installed works fine!

well, then copy that installation (which has
the proper configuration) into a guest, and it
will magically start to work :)

best,
Herbert

> thx
> Ekkard