Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 59

Thread: HOWTO: Control the gnome VNC vino-server from the command line

  1. #31
    Join Date
    Jan 2006
    Location
    Canada
    Beans
    44
    Distro
    Ubuntu 6.06

    Lightbulb Re: HOWTO: Turn on Ubuntu's gnome VNC vino-server from the command line

    It looks like I solved my own problem.

    While trying to troubleshoot this issue, I decided to try running the vino-server executable directly (from an SSH connection):
    Code:
    $ /usr/lib/vino/vino-server --display=:0.0
    Failed to open connection to bus: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.
    The error message suggested that the problem may in fact have more to do with D-Bus than GConf or vino. So, after reading the man pages of dbus-launch and dbus-daemon, I decided to try running gconftool through dbus-launch:
    Code:
    dbus-launch gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
    This worked perfectly.

    Alternatively, you can also set the environment variables from the file ~/.dbus/session-bus/*-0 (where * is some unique identifier for your computer) manually, or import it into a shell script.

    I've attached a Bash script called toggle_vino_server.sh that you can use to enable and disable remote desktop remotely using SSH. There is no need to forward X over SSH to do this either.

    Before I go any further, though, I must state that the script comes with no warranty whatsoever, and I'm not responsible for anything that happens to you, your computer, or your pet rat, for that matter, by using this script.

    Simply save the script to ~/bin, give the file executable permissions, and run it from the command-line. It takes no parameters -- it will enable the server if it is disabled, and disable the server if it is enabled.
    Attached Files Attached Files

  2. #32
    Join Date
    Aug 2008
    Beans
    10

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Again, setting the gconf preference for enabling or disabling remote desktop
    does not address the problem of vino-server not running.

    At some point if the vino-server crashes, you need to start it up to have a process listening on port 5900 or whatever port the server is configured to listen to. dbus-launch fails to start vino-server if the X11 authentication
    is not done.

  3. #33
    Join Date
    Feb 2006
    Location
    North Dakota
    Beans
    224
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Quote Originally Posted by sixerjman View Post
    Again,
    Again? Have you addressed this somewhere else? Please link for context.

    Quote Originally Posted by sixerjman View Post
    setting the gconf preference for enabling or disabling remote desktop does not address the problem of vino-server not running.
    The gconf preference is polled. If you set it and vino is not running, vino will be launched. If you clear it and vino is running, vino will be killed. If you are not experiencing this behavior, you may have found a bug. Please test from a LiveCD or a fresh install and if the problem persists in that environment, file a bug report.

    Quote Originally Posted by sixerjman View Post
    At some point if the vino-server crashes,
    Crashes are caused by bugs. If you can reproduce the crash consistently, please file a report.

    Quote Originally Posted by sixerjman View Post
    dbus-launch fails to start vino-server if the X11 authentication is not done.
    This is by design. Vino only works on locally logged in X11 sessions. If you need a system for remote sessions only, try tightvncserver, vncserver, or one of the other vnc servers. Alternatively, I highly recommend freenx, as it provides persistent sessions and is much faster.
    Search first, ask questions later!
    From Thread Tools, "Mark this thread as solved" if your problem's been solved.

  4. #34
    Join Date
    Nov 2008
    Location
    Silicon Valley
    Beans
    19
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Is there a way to get vino (at the command line OR the GUI) to only accept connections via localhost? or to specify a port number (5901, 5902, etc.)?


    I ask, because this documentation:

    https://help.ubuntu.com/community/VNC/Servers

    says vino has an "advanced" tab for restricting access to localhost ... but the GUI control for vino under 9.04 doesn't show an advanced tab. I started to look at the command line options, to see if it was just missing from the GUI control (but that the underlying functionality might still be there). But I haven't found those options anywhere.

    Is there another widget for controlling vino? Is the stuff in the "Advanced tab" still there, but only accessible via the command line?

    But, really, what I want is:

    1) make vino accessible only via localhost (ie. must use SSH)
    2) make vino use a port of my choosing (or fail; don't choose a different port)

  5. #35
    Join Date
    Feb 2006
    Location
    North Dakota
    Beans
    224
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Quote Originally Posted by johnkzin View Post
    Is there a way to get vino (at the command line OR the GUI) to only accept connections via localhost? or to specify a port number (5901, 5902, etc.)?
    1. Install gconf-editor. It will show up as Applications->System Tools-> Configuration Editor.

    2. Browse to /desktop/gnome/remote_access

    3. Set "network_interface" to "lo" for local access only.

    4. Modify "alternative_port" to change the port used. Additionally, check the box next to "use_alternative_port".

    Settings apply immediately. Simply close "Configuration Editor" when you're done.

    Quote Originally Posted by johnkzin View Post
    I ask, because this documentation:

    https://help.ubuntu.com/community/VNC/Servers
    That documentation is out of date. The advanced tab was removed a number of releases ago. I'm not sure why.
    Last edited by bobpaul; July 12th, 2009 at 07:55 PM. Reason: fixed typo
    Search first, ask questions later!
    From Thread Tools, "Mark this thread as solved" if your problem's been solved.

  6. #36
    Join Date
    Nov 2008
    Location
    Silicon Valley
    Beans
    19
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Thanks very much! exactly what I needed.

  7. #37
    Join Date
    Jul 2008
    Beans
    87

    Lightbulb Re: HOWTO: Control the gnome VNC vino-server from the command line

    For those that stumble upon this thread trying to start vino from the cli via a remote ssh connection look here: http://ubuntuforums.org/showthread.php?t=1017746
    at post #7
    Code:
    1. ssh to that machine and authenticate as x
    2. sudo -s to become root
    3. export DISPLAY=:0.0
    4. xhost +
    5. exit from root shell using exit
    6. export DISPLAY=:0.0
    7. start vino-server using /usr/lib/vino/vino-server
    There may be another way but this saved my bacon after the Karmic upgrade when I needed to get my desktop and vino wasn't started.

  8. #38
    Join Date
    Jul 2009
    Beans
    1

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Thanks a lot. The first tip that works!

  9. #39
    Join Date
    Mar 2008
    Beans
    3

    Re: HOWTO: Turn on Ubuntu's gnome VNC vino-server from the command line

    Code:
    dbus-launch gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
    Thanks mlalkaka.

    You solved my problem as well. I have previously been using gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true and false to enable and disable remote desktop capabilities. However, I could not make this work in Ubuntu 9.10. But once I prefixed the command with dbus-launch, as suggested by your code above, it works perfectly.

    Thank you very much.

  10. #40
    Join Date
    Jul 2007
    Beans
    15

    Re: HOWTO: Control the gnome VNC vino-server from the command line

    Does anybody know how to start full gnome session from Putty X11 forwarding?

Page 4 of 6 FirstFirst ... 23456 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •