连接到tightvncserver显示棕色屏幕和光标,而不是Ubuntu 16.04

时间:2017-05-19 10:46:21

标签: ubuntu ubuntu-16.04 vnc-server vnc-viewer tightvnc

我正在尝试连接到服务器并按照以下步骤在其上安装了tightvnc服务器:

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

因此我的xstartup文件如下所示:

cat .vnc/xstartup 
#!/bin/sh

# Change "GNOME" to "KDE" for a KDE desktop, or "" for a generic desktop
MODE="GNOME"

#Uncommment this line if using Gnome and your keyboard mappings are incorrect.
#export XKL_XMODMAP_DISABLE=1

# Load X resources (if any)
if [ -e "$HOME/.Xresources" ]
then
        xrdb "$HOME/.Xresources"
fi

# Try a GNOME session, or fall back to KDE
if [ "GNOME" = "$MODE" ]
then
        if which gnome-session >/dev/null
        then
                gnome-session --session=ubuntu-2d &
        else
                MODE="KDE"
        fi
fi

# Try a KDE session, or fall back to generic
if [ "KDE" = "$MODE" ]
then
        if which startkde >/dev/null
        then
                startkde &
        else
                MODE=""
        fi
fi

# Run a generic session
if [ -z "$MODE" ]
then
        xsetroot -solid "#DAB082"
        x-terminal-emulator -geometry "80x24+10+10" -ls -title "$VNCDESKTOP Desktop" &
        x-window-manager &
fi

当我尝试连接到服务器时,它显示如下的棕色屏幕: Dev server Connection using remmina client

xstartup的权限是:

-rwxr-xr-x  1 user user  943 May 19 06:35 xstartup*

我在两个系统上都使用Ubuntu 16.04。你能帮帮我吗

1 个答案:

答案 0 :(得分:-2)

在Ubuntu中安装桌面。

sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

存在不同的桌面。

团结:

sudo apt install ubuntu-desktop

KDE:

sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get install kubuntu-desktop

伴侣

sudo apt-get install mate-desktop

侏儒

sudo apt-get install ubuntu-gnome-desktop

XFCE(XUBUNTU)

sudo apt-get install xubuntu-desktop

重新启动该系统,然后重试。