Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install graphical interface in linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, Xiaobian will bring you about how to install graphical interfaces in Linux. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

Linux installation (root user operation)

1. install vncserver;

yum install tigervnc-server

2. install vncviewer;

yum install vnc

3. Stop and disable firewalls;

systemctl stop firewalld.servicesystemctl disable firewalld.service

4. Install linux graphical desktop

yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

II. Configuration

1. modify startup file

vim /root/.vnc/xstartup

Fill with the following:

VNCSERVERS="1:root"VNCSERVERARGS[1]="-geometry 1200x800"gnome-session &

Indicates that the window is a geome-based desktop configuration

2. Create a new configuration file, take window 1 as an example (you can also open multiple windows at the same time, modify the number), the method is as follows:

cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service

Or add another window:

cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:2.service

Edit/lib/systemd/system/vncserver@:1.service to set user root related parameters. The final content is as follows:

[Unit]Description=Remote desktop service (VNC)After=syslog.target network.target[Service]Type=forking# Clean any existing files in /tmp/.X11-unix environmentExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"PIDFile=/root/.vnc/%H%i.pidExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 ||:'[Install]WantedBy=multi-user.target#Launch window 1vncserver :1#View launch list status vncserver -list

The results of successful start-up should be as follows:

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/eunke-network002:1.log

View logs Get port number:

cat /root/.vnc/eunke-network002:1.log

If the startup fails, enter the folder, delete the X1 file, and restart Window 1:

cd /tmp/.X11-unixrm -rf X1#kill window 1vncserver -kill :1#launch window 1vncserver :1

4. Windows installation VNC viewer

1. 64bit download address: www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.19.923-Windows-64bit.exe

2. After installation, enter IP: port as follows:

Enter to open the remote linux desktop.

Linux is a free-to-use and freely distributed UNIX-like operating system, is a POSIX-based multi-user, multitasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

The above is how to install graphical interface in linux shared by Xiaobian. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report