Enabling VNC and disabling desktop effects from the command line 1 comment
Don’t you just hate those day when you really need to access the desktop of a machine, but forgot or just never activated remote desktop?
Fear not, the following lines will let you activate it from a SSH-shell:
# display number, assuming 0 display=0 # get the machine-id read -r machineid < /var/lib/dbus/machine-id # source the right file under .dbus to set the needed variables . "$HOME/.dbus/session-bus/$machineid-$display" # export the variables sourced from that file export DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_WINDOWID # Run gconftool-2: # enable desktop sharing gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true # disable "You must confirm each access to this machine" gconftool-2 -s -t bool /desktop/gnome/remote_access/prompt_enabled false # enable "Allow other users to control your desktop" gconftool-2 -s -t bool /desktop/gnome/remote_access/view_only false
Remeber to set a password after you log in (afaik you can’t set this from cli)
I use the propiatary ATI drivers, and because of a bug i have to disable desktop effects, else the VNC windows will only show me a static desktop and no updates:
# disable desktop effects (if your desktop gconftool -s -t string /desktop/gnome/applications/window_manager/current /usr/bin/metacity gconftool -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity sudo reboot
Sources
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/353126
http://ubuntuforums.org/showthread.php?t=1518231
One Response to 'Enabling VNC and disabling desktop effects from the command line'
Subscribe to comments with RSS or TrackBack to 'Enabling VNC and disabling desktop effects from the command line'.
[...] You can find it here. [...]
Enabling VNC and disabling desktop effects from the command line at Moshwire.com
6 Feb 11 at 11:54