Login is done with SSH, and the config of OS function on the container sets from the command line.
However, it might want to be "All Settings" (gnome-control-center) from GUI.
Of course, the setting is possible from the command line. However, I might not remember how to use configuration file and a set command.
It explains two execution methods of the program behavior of X-Window in the container here. Various GUI of each container can be executed.
When login is done to the container putting "-Y" from HOST with ssh, the command of X-Window that started in the container is displayed on HOST.
For instance, "All Settings" is executed in the container in the following example.
1) The container named analysis0001 is made.
# lxcf sysgen analysis00012) Optional "-Y" is put with ssh and log in in the container.
# ssh -Y analysis00013) "All Settings" (gnome-control-center) is executed in the container.
[root@analysis0001 ~]# gnome-control-center
The "All Settings" screen is displayed on the HOST screen.
Please click the item to be set with the mouse.
Moreover, it is possible to execute it from the terminal of HOST without login.
1) It executes it specifying "-Y" and "Gnome-control-center" command for ssh.
# ssh -Y analysis0001 gnome-control-center
Of course, programs of X-Window other than a config command can be executed in the container.
# ssh -Y analysis0001 firefox
Set work can be done by displaying the GUI screen of the container on HOST by the VNC function.
VNC is a remote, desktop function. It is originally the one to display the GUI screen on the GUI screen of another computer. Here, let's display GUI of the container on HOST.
When SELinux is enable, the server of VNC is not good at the startup on the container of LXCF. First of all, it edits /etc/selinux/config, and SELinux is made disabled.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled <- Here is rewritten in "disabled"
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Reboot is done when rewriting it. After reboot, the container also does start.
Here, container name analysis0001 will be used.
# lxcf start analysis0001
Next, viewer (client) of VNC and the server are installed.
Let's use update of LXCF, and install VNC in HOST and all containers in bulk.
Tigervnc and tigervnc-server are packages of the viewer and the server.
# lxcf update yum install tigervnc tigervnc-server -y
It might take time a little to install it in both HOST and the container.
When the installation is completed, the server of VNC is immediately executed with the
container of LXCF.
# ssh analysis0001
[root@analysys0001 ~] # vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth: file /root/.Xauthority does not existNew 'analysis0001:1 (root)' desktop is analysis0001:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/analysis0001:1.log[root@analysys0001 ~] # exit
#
The arbitrary passphrase can be input only because this password is for the VNC connection though the password is demanded. It is a password input when connecting it with the VNC server. The same passphrase is input to Verify again.
Please remember the figure that adheres with ":" behind the container name. When connecting it, it will need it later. It returns to HOST with exit when it finishes inputting the password.
The port of vnc-server had to open by firewall. Let's log in again and set it.
# ssh analysis0001
[root@analysys0001 ~] # firewall-cmd --permanent --add-service=vnc-server
success
[root@analysys0001 ~] # exit
On HOST, vncviewer is started. The argument is "Container name: the number. "
# vncviewer analysis0001:1
When the password is input, the GUI screen is displayed. The titlebar is right-clicked, and please maximize and resize the adjustment of the size.