I used to use a Windows server with a verification license as a stepping stone. Even if it expires and is updated, I have to recreate the Windows server somewhere, so I made VNC Server on Ubuntu to eliminate that trouble.
This software is used when remotely controlling a personal computer. Normally, if you are using Linux etc., you can log in with SSH, but Since there are rare cases where it is necessary to operate with the GUI, it may be used at such times. Example: When you want to open the ESXi UI screen, etc.
In this environment, when installing Ubuntu, it is installed with the minimum current package.
Install GNOME CORE, one of the free and open source GNOME desktop environments.
# apt install gnome-core
Start the display manager.
# systemctl start gdm
Install ubuntu-desktop to use Ubuntu environment with Desktop.
# apt install ubuntu-desktop
Install the required packages for TigerVNC.
# apt install -y tigervnc-common tigervnc-standalone-server tigervnc-xorg-extension
Start VNC once, output the configuration file, and then disconnect.
# vncserver :1
# vncserver -kill :1
Edit the .vnc/xstartup file as follows:
# cat .vnc/xstartup
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &
Set the password required when connecting to VNC.
# tigervncpasswd
Password:password input
Verify:Enter password again
Would you like to enter a view-only password (y/n)? n
Launch a VNC session and make sure there is a list that you can connect to.
# vncserver -localhost no -geometry 1152x864 -depth 24
# vncserver -list
TigerVNC server sessions:
X DISPLAY # RFB PORT # PROCESS ID
:1 5901 50790
After that, if you can install VNC Client in the environment you want to connect to and connect, it is completed successfully.
Since this content is an article that is everywhere, I was wondering whether to post it, but I posted it with the hope that it will be of some help to those who are aiming to become engineers. I will continue to post what I have done in the future without hesitation, so please follow me if you like.
Recommended Posts