折腾笔记
这是一个瞎扯淡的博客

Install-VNC-Desktop-on-Ubuntu

Step 1: Install components

We need to install the following components for a proper desktop with VNC.

xOrg
A desktop (LXDE)
An Ubuntu VNC server (TightVNC)
Run the following command to install them.

sudo apt-get install xorg lxde-core tightvncserver

Step 2: Setup VNC

We have to set up a VNC password for our VNC connection. This password is limited to 8 characters in length. Longer passwords will be truncated.

tightvncserver :1
Next, we need to config the xstartup because VNC doesn't know how to launch LXDE.

nano ~/.vnc/xstartup
In this file…

Remove the # before #x-window-manager &
Add the line lxterminal &
Add the line /usr/bin/lxsession -s LXDE &
Your config should now resemble the following:

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
lxterminal &
/usr/bin/lxsession -s LXDE &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

Save the file with Ctrl + O, then exit nano with Ctrl + X.

Step 3: Restart VNC

To restart VNC we have to shut it down with:

tightvncserver -kill :1

… and start it again:

vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565

Step 4: Connect to the VNC server

Start your favorite VNC Client and connect to your server's IP with the ending :1. For example: 123.123.123.123:1.

Enjoy your new VNC server!

赞(8)
未经允许不得转载:折腾笔记版权所属折腾笔记 » Install-VNC-Desktop-on-Ubuntu
分享到: 更多 (0)

评论 2

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #0

    Hi to all, it’s genuinely a fastidious for me to visit this web page, it contains valuable Information.

    cbd oil7个月前 (04-24)回复
  2. #0

    This is very interesting, You’re a very skilled blogger.
    I’ve joined your feed and look forward to seeking more of your
    wonderful post. Also, I’ve shared your website in my social networks!

    Сialis2年前 (2018-08-28)回复