How to properly configure xstartup file for TightVNC with Ubuntu VPS GNOME environment

前端 未结 3 2040
隐瞒了意图╮
隐瞒了意图╮ 2021-02-07 15:50

I\'d like to access my Ubuntu 16.10 VPS (Contabo) with using a GNOME environment with VNC, however I am still facing some issues that I couldn\'t solve so far. To install and co

相关标签:
3条回答
  • 2021-02-07 16:27

    Your vnc log file tells you about problem. You need to install few packages:
    sudo apt-get install metacity gnome-panel

    UPDATE 1:

    You need only x-window-manager or metacity. Both provides window manager and you need only one. From screenshot I see only two problems - grey screen and missing indicators.

    To fix missing indicators install one more package:
    sudo apt-get install indicator-applet-complete

    To fix grey screen you need --force-desktop commandline option. And if you don't want default nautilus window you can add --no-default-window:
    nautilus --force-desktop & or nautilus --force-desktop --no-default-window

    Also GNOME Flashback (Metacity) session in Ubuntu 16.10 use unity-settings-daemon not gnome-settings-daemon. Don't forget to install it if you decide to change that.

    To get better working desktop you also need to exports:

    export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
    export XDG_MENU_PREFIX="gnome-flashback-"
    

    If you decided to use unity-settings-daemon then XDG_CURRENT_DESKTOP should be GNOME-Flashback:Unity.

    In both cases you also need gnome-flashback. Install it and make sure it also started. Depending on settings daemon you might need to adjust / change GSettings. Defaults are configurated for unity-settings-daemon.

    UPDATE 2:

    I would probably let gnome-session to start session:

    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    
    export XKL_XMODMAP_DISABLE=1
    export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
    export XDG_MENU_PREFIX="gnome-flashback-"
    
    gnome-session --session=gnome-flashback-metacity --disable-acceleration-check &
    

    And to install required packages just do sudo apt-get install gnome-session-flashback

    UPDATE 3:

    Looks like nautilus does not show desktop icons and background, because desktop icons are disabled.

    You can enable it with gsettings set org.gnome.desktop.background show-desktop-icons true or by installing ubuntu-settings.

    0 讨论(0)
  • 2021-02-07 16:27

    I had the same problem. I followed all these instructions... except debug and the VNC started working. I use my Ubuntu system as a headless system and 99% of the time use VNC.

    I performed a BIOS update and reboot today and experienced the same problem again. I know I already installed everything but the one thing that got this to work was running these commands again:

    sudo locale-gen
    sudo localectl set-locale LANG="en_US.UTF-8"
    vncserver -kill :1
    vncserver

    Opened VNC Viewer and connected without a problem.

    0 讨论(0)
  • 2021-02-07 16:52

    For security reasons, X11 has disabled indirect GLX rendering by default. This change has finally made it into the mainstream Linux flavors. To enable IGLX, edit the Xorg file and add the “+iglx” flag. Then reboot the machine.

    sudo vi /usr/bin/Xorg
    
    basedir=/usr/lib/xorg
    if [ -x "$basedir"/Xorg.wrap ]; then
       exec "$basedir"/Xorg.wrap "$@"
    else
       exec "$basedir"/Xorg "$@" +iglx
    fi
    
    0 讨论(0)
提交回复
热议问题