Results 1 to 8 of 8

Thread: Where to define user's desktop environment for VNC connections

  1. #1
    Join Date
    Feb 2014
    Beans
    11

    Where to define user's desktop environment for VNC connections

    I'm having trouble figuring out where the desktop environment a user wants is defined. I have a headless workstation setup at home that is running x11vnc for the server and I connect to with TightVNC. I can log in with different users and get a unique desktop for each. However, I can't figure out where to define what environment the VNC connection uses. It always defaults to Unity. I have gnome-fallback installed and I would like to use that.

    My original install was 12.04 LTS Desktop. I have made the following changes:
    /etc/default/grub
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="text"
    I have set the following in ~/.dmrc:
    Code:
    [Desktop]
    Session=gnome-fallback
    I have set the following in /etc/lightdm/lightdm.conf:
    Code:
    [SeatDefaults]
    greeter-session=unity-greeter
    user-session=gnome-fallback
    ~/.xsession
    gnome-session --session=gnome-fallback
    Last edited by ccReynolds; March 31st, 2014 at 07:03 AM.

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Where to define user's desktop environment for VNC connections


  3. #3
    Join Date
    Feb 2014
    Beans
    11

    Re: Where to define user's desktop environment for VNC connections

    I tried the instructions and it did not help.

    I created a ~/.vnc/xstartup file as executable & added the following:

    Code:
    #!/bin/sh
    
    #Uncommment this line if using Gnome and your keyboard mappings are incorrect.
    #export XKL_XMODMAP_DISABLE=1
    
    # Load X resources (if any)
    if [ -r "$HOME/.Xresources" ]
    then
            xrdb "$HOME/.Xresources"
    fi
    
    gnome-session --session=gnome-fallback &

  4. #4
    Join Date
    Apr 2012
    Beans
    7,257

    Re: Where to define user's desktop environment for VNC connections

    AFAIK the ~/.vnc/xstartup file is only used by independent VNC servers (vnc4server / tightvncserver) - x11vnc is intended as a 'desktop sharing' VNC server i.e. it doesn't start a session of its own, it just relays whatever desktop the user's 'real' X server is running on. That will be set when the user logs in via lightdm (and defaults to the user's previous session - saved via /var/lib/AccountsService/users/ I think rather than ~/.dmrc).

  5. #5
    Join Date
    Feb 2014
    Beans
    11

    Re: Where to define user's desktop environment for VNC connections

    Thanks for the info. That was a detail I had not picked up on. The VNC connection is not using what is set in /var/lib/AccountsService/users. That file has a different desktop and wallpaper in its config file.

    I am using xvfb with x11vnc. Could that be forcing it to look somewhere else?

  6. #6
    Join Date
    Feb 2014
    Beans
    11

    Re: Where to define user's desktop environment for VNC connections

    I'm still baffled by where the system is looking to come up with the unity desktop. It was still trying to pull up Unity after I completely uninstalled unity-desktop. I was finally able to get the result I wanted by performing the following:

    Original startup line from putty:
    Code:
    x11vnc -nofbpm -noxdamage -create -usepw -geometry 1280x1024 -auth ~/.Xauthority &
    Started x11vnc with the previous command plus the following to clean out the previous session:
    Code:
    -gone 'killall Xvfb'
    Closed the vnc connection. Then removed the -gone 'killall Xvfb' bit and added the following:
    Code:
    -env FD_PROG=/usr/bin/gnome-session-fallback
    Even after this is done, if I try to restart using the original string unity tries to come up.

    Got the idea for the mods to the x11vnc command here:
    http://www.richud.com/wiki/Ubuntu_Fl...11vnc_and_Xvfb
    Last edited by ccReynolds; April 7th, 2014 at 07:50 AM. Reason: correction

  7. #7
    Join Date
    Apr 2012
    Beans
    7,257

    Re: Where to define user's desktop environment for VNC connections

    What's the advantage of using x11vnc+Xvfb? if you install a standalone VNC server (like tightvncserver or vnc4server) you would be able to specify whatever session you want via ~/.vnc/xstartup

  8. #8
    Join Date
    Feb 2014
    Beans
    11

    Re: Where to define user's desktop environment for VNC connections

    I liked the fact that you had more than just one option for frame buffers e.g. Xdummy, and I liked the that it had the option to automatically close after you end your session. However, it was probably based more on the fact that I found better examples for it than any sound technical reason.

    Quote Originally Posted by steeldriver View Post
    What's the advantage of using x11vnc+Xvfb? if you install a standalone VNC server (like tightvncserver or vnc4server) you would be able to specify whatever session you want via ~/.vnc/xstartup

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
  •