gnome - Start vino-server (VNC) before login on Linux CentOS

07
2014-07
  • Dr. Gianluigi Zane Zanettini

    I'm using the default vino-server package to access my CentOS 6 workstation via VNC.

    It works ok, but only AFTER I locally login on the workstation. I need to have vino-server start BEFORE the login, right at the Gnome login screen where I choose username and password.

    Due to personal reasons, I need to use Vino and not vnc-server or any other packages.

    I already tried to insert /usr/libexec/vino-server & in /etc/gdm/Init/Default but this didn't solve the issue.

  • Answers
  • Cristian Ciupitu

    Create the desktop file that's going to start vino:

    # cat > /usr/share/gdm/autostart/LoginWindow/vino-server.desktop << 'EOF'
    [Desktop Entry]
    Name=Remote Desktop
    Comment=GNOME Remote Desktop Server
    Exec=/usr/libexec/vino-server
    Icon=preferences-desktop-remote-desktop
    Terminal=false
    Type=Application
    EOF
    

    Change some of the vino's settings1 for the gdm user (vino runs under it):

    # su -s /bin/sh -l gdm -c               \
         'gconftool-2 --set --type=bool     \
                      /desktop/gnome/remote_access/enabled true'
    # su -s /bin/sh -l gdm -c               \
         'gconftool-2 --set --type=bool     \
                      /desktop/gnome/remote_access/prompt_enabled false'
    

    Note that all you can do is login. After the user logins, the VNC sesssion ends. At the end of the session, you'll be able to reconnect to GDM.

    You'll also need to disable SELinux2 or preferable write the required rules to let user gdm run vino-server.


    1 I got the details from an answer to "Enable remote VNC from the commandline?" from the Ask Ubuntu SE.

    2 Modify /etc/selinux/config so that SELINUX=permissive or use setenforce.


  • Related Question

    installation - How to install GNOME desktop on linux (CENTOS)
  • Questioner

    How to install GNOME desktop on linux (CENTOS).I would appreciate detailed steps as I am a linux newbie.


  • Related Answers
  • Chris

    Login as superuser and type:

     yum groupinstall "X Window System" "GNOME Desktop Environment"
    
  • Dejan

    Use yum as indicated here and here.