Remote Control Remote Desktop

Remotely Accessing Ubuntu 16.04 with vncserver

Shou Arisaka
2 min read
Nov 11, 2025

Normally I use BOW and Docker, and when I need a raw ubuntu machine, I operate it via SSH, but GUI apps and such require touching the actual machine. So it's time for remote desktop.

vnc4server

sudo apt-get install vnc4server
vncpasswd # password 
vncserver :1
cp ~/.vnc/xstartup ~/.vnc/xstartup.bak
cat > ~/.vnc/xstartup
#!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey 
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
  • Starting/stopping the server

vncserver :1 vncserver -kill :1

vnc viewer

From the host PC, connect to <IP>:1 with "vnc viewer". Enter the password you set, and the screen appears. (If you want to know ubuntu's IP, use ifconfig)

download: [https://www.realvnc.com/en/download/viewer/](https://www.realvnc.com/en/download/viewer/)

issue

  • Gray screen problem

Information seems confused, and indeed words like "gray" and "gray" stood out. The cause of why it turns gray remains unknown, but since remote desktop itself worked, I'll call it good.

  • Concerning point

One concerning point is that you can't directly operate the PC's main screen. Should I say it's running as a different process? I was imagining something like Chrome remote desktop, but it was a bit different. I thought it might be a Workspaces issue, but even with ctrl+alt+โ†“โ†‘โ†โ†’ it didn't change.

However, the command line can be opened, and from there you can open and operate a GUI with gedit, so there seems to be no problem in terms of usability. I'd like to try Chrome remote desktop too if I have time.

Reference: [http://chie8842.hatenablog.com/entry/2017/03/26/152619](http://chie8842.hatenablog.com/entry/2017/03/26/152619)

Share this article

Shou Arisaka Nov 11, 2025

๐Ÿ”— Copy Links