![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#41 | |
|
A Carafe of Ubuntu
![]() Join Date: Apr 2007
Beans: 140
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
Quote:
6. export DISPLAY=:0.0 7. start vino-server using /usr/lib/vino/vino-server I would a & actually, so /usr/lib/vino-server & If this happens often you could create a script like I did sudo vi /usr/local/bin/restart_vnc insert these two lines export DISPLAY=:0.0 /usr/lib/vino/vino-server & save (:wq) sudo chmod +x /usr/local/bin/restart_vnc Also the gconf tips here dont work. I'm sure that toggles the config options but doesnt restart a crashed server. Also I've experienced that SSH -X or -Y and issuing vino-preferences doesnt work. What is actually does it spawn a vino server on the client machine (if linux i guess) so when you vnc through your ssh tunnel it just loops back to your clients desktop.
__________________
I've tried nothing and I'm all out of ideas! Last edited by doobiest; March 3rd, 2010 at 04:06 PM.. |
|
|
|
|
|
|
#42 | |
|
Gee! These Aren't Roasted!
![]() Join Date: Feb 2006
Location: North Dakota
Beans: 209
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
Quote:
You stated "so when you vnc through your ssh tunnel"... How did you have your port tunnel (-L) setup? My guess is you connected to the local vnc server on localhost directly instead of connecting to the ssh client's port tunnel. It didn't loop back... it never even left your machine.
__________________
Search first, ask questions later! From Thread Tools, "Mark this thread as solved" if your problem's been solved. |
|
|
|
|
|
|
#43 |
|
A Carafe of Ubuntu
![]() Join Date: Apr 2007
Beans: 140
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
#ssh -X destination
#vino-preferences *close vino-preferences #ps aux|grep vino (shows the server running now) #vncviewer -via destination localhost (executed locally, not in the ssh session) This redirected me to my local vncsession, not the remote one. And No I have verified that the vino-server is not running locally on my client It's completely reproducable I jsut did it right now again. It does run vino-server on the remote computer but it's attached to my local X display, not the remote one. If I close the ssh connection, then of course it stops vncing to my local session and doesnt vnc to the remote session either. The processing for the service might be occuring remotely but the routing is still going local.
__________________
I've tried nothing and I'm all out of ideas! Last edited by doobiest; March 3rd, 2010 at 04:28 PM.. |
|
|
|
|
|
#44 |
|
A Carafe of Ubuntu
![]() Join Date: Apr 2007
Beans: 140
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
There's no level of technical accuracy here but this should describe what is happening.
[vncviewer]-->[ssh tunnel]-->[remote vnc server] [local X ]<--[ssh tunnel]<--[remote vnc server] [local X ]-->[ssh tunnel]-->[remote vnc server] [vncviewer]<--[ssh tunnel]<--[remote vnc server] (Following the arrows, read some lines left to right and some lines right to left) ps aux|grep vino-server on Local box = NO ps aux|grep vino-server on Remote box = YES Are we certain that X11 Forwarding ISNT bi-directional? It sure seems that way to me.
__________________
I've tried nothing and I'm all out of ideas! Last edited by doobiest; March 3rd, 2010 at 04:46 PM.. |
|
|
|
|
|
#45 |
|
Ubuntu Extra Shot
![]() Join Date: Feb 2005
Beans: 354
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
Yes, doobiest is right, just running vino-preferences over an X11-forwarding ssh session might start a vino-server controlling the local (to you) display. This was also mentioned here http://ubuntuforums.org/showpost.php...67&postcount=4
You can verify which X server (display) the vino-server is controlling with: Code:
cat /proc/`pgrep vino-server`/environ | tr '\0' '\n'|grep DISPLAY The use of dbus-launch lets vino-server be started by the dbus server running in the remote session, so that it connects to the display of that session.
__________________
Please use launchpad to search for/report bugs and problems: https://help.ubuntu.com/community/ReportingBugs |
|
|
|
|
|
#46 |
|
Ubuntu Extra Shot
![]() Join Date: Feb 2005
Beans: 354
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
So here is how to make this work (tested on Ubuntu 9.10):
Connect with ssh -X to your remote machine. Find the dbus address of the processes in the desktop session running "locally" on the remote machine, for instance the nautilus process: Code:
cat /proc/`pgrep nautilus`/environ | tr '\0' '\n' | grep DBUS Code:
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-blahblah... vino-preferences On the other hand, the use of dbus-launch with gconftool-2 makes vinagre start on the right display, however the changes made in the vino-preferences GUI are not applied to the started server. At least that was what happened here, where I ended up with a bunch of dbus and gconf servers running. Even if I turned off the "You must confirm each access to this machine" in the GUI, this option stayed on for the started vino-server, so I could not connect to the unattended machine.
__________________
Please use launchpad to search for/report bugs and problems: https://help.ubuntu.com/community/ReportingBugs |
|
|
|
|
|
#47 |
|
A Carafe of Ubuntu
![]() Join Date: Apr 2007
Beans: 140
|
Re: HOWTO: Control the gnome VNC vino-server from the command line
Thanks thats actually very helpful. I need to take a deeper look at that.
I'll post this again, because I think what you posted may be too complicated for some users who don't have the background knowledge in this area. Making a script like is worked great for me. I usually find vino crashes (inconsistently) when I'm using the clipboard. I can run vnc_restart from ssh easily to gain access again. doobiest@LinuxBox:/usr/local/bin$ cat vnc_restart export DISPLAY=:0.0 /usr/lib/vino/vino-server &
__________________
I've tried nothing and I'm all out of ideas! |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|