A minimally installed Linux system(CentOS/Debian/Ubuntu), at some point we need to install a simple and fast desktop environment and access it via RDP.
For example: running a browser, or some Linux application, or even some Windows applications.
Now that you have a better solution, you can quickly install the desktop environment and remote desktop connection and Windows support with just one click. If you are looking for such a solution, just try it.
1. Install the desktop environment and RDP remote desktop connection for Linux (CentOS/Debian/Ubuntu) with one click.
(You need a newly installed Linux system. The recommended hardware requirements are: CPU core ≥ 1, memory ≥ 1GB, disk space ≥ 15GB. The higher the hardware configuration, the better. You can also try to run Debian with a low hardware configuration, but it may Running slowly.)
2. Windows application support. (via Wine)
(Install Wine X64 and X86, now you can Run Windows applications On Linux. For example: Telegram, WeChat, Thunder)
3. Create a 3GB Swap Memory. Avoid errors caused by insufficient memory.
(Swap Location: /var/swapd)
4. Install Chinese input environment, Chinese support.
(Without a Chinese environment, you will not be able to view Chinese fonts. Will lead to coding confusion.)
5. Install software recommended by people, such as Browsers, Office tools, and Input methods.
(I posted a survey here https://www.hostloc.com/thread-466449-1-1.html and https://www.hostloc.com/thread-473982-1-1.html. Respect Results survey, Chrome, Firefox, WPS International Edition, FileZilla is automatically installed.)
6. Install the Remote Desktop client. (Remmina allows you to connect and manage other computers)
(Support RDP/SSH/NX/SFTP/VNC/XDMCP protocol)
1. Make sure you have a newly installed Linux(CentOS/Debian/Ubuntu) Minimize System. (No extra components are installed, otherwise it may cause an error)
[Recommended system] [Original] Network one-click Reinstall CentOS 7 (Official, Pure, Safe, Efficient) [This is the system I use very often, pure, without any extra components.]
2. Log in to SSH and execute the following commands as the root user.
wget --no-check-certificate -qO ~/Linux-Remote-Desktop-Environment.sh 'https://tech.cxthhhhh.com/tech-tools/Linux-Remote-Desktop-Environment/Linux-Remote-Desktop-Environment.sh' && chmod a+x ~/Linux-Remote-Desktop-Environment.sh
Then execute the following command according to your system release:
bash ~/Linux-Remote-Desktop-Environment.sh -CentOS
bash ~/Linux-Remote-Desktop-Environment.sh -Debian
bash ~/Linux-Remote-Desktop-Environment.sh -Ubuntu
You need to understand
1. After completion. You can connect to IP: 3389 (via Remote Desktop Connection), the RDP login account password is your system account and password.
(The root user and the RdpUser user can log in. The root password is the password you set yourself, and the RdpUser password is the default password.)
2. In general, it is not recommended to use the root user daily, so the tool automatically creates the user [RdpUser] and its default password [cxthhhhh.com]. Please log in and modify as soon as possible.
3. When creating a new user, authorize the new user RDP remote connection. You need to do this. (I will demonstrate creating and authorizing new users CXT remote access)
useradd -m CXT to create a user or create a new user CXT in [Control Center] – [Users and Groups]. (Set password for CXT
②. Use the root user to switch to the CXT directory.
③. Enter the following command (you need to be aware that the quotes in the following command are “English status single quotes”.)
echo 'mate-session' > ./.Xclients
chmod a+x ./.Xclients
④. (optional) If you are a Debian/Ubuntu user, you need to run the Windows program after creating a new user. If there is Chinese garbled, please refer to the scheme of Article 9. (CentOS/Redhat does not have this problem)
4. Chrome browser cannot be run by root user. If you need to run, please create a new account. (or attach the run command
5. Some Windows applications don’t work and may require you to shut down SELinux. (Not recommended, generally not required)
6. Some Windows software under CentOS looks blurry, you need to adjust the background color behind the software to a dark color. (for example, replacing the wallpaper with a dark wallpaper) (D/U does not have this problem)
7. Now that you have a browser, I believe you can do a lot of things. (solve the problem yourself as much as possible)
8. The current default system language is Chinese. If you are an English user, please execute ‘ sudo localectl set-locale LANG = en_US.UTF-8 ‘
9. Under Debian/Ubuntu system, if you create a new user, you may run Chinese garbled when you run Wine. You need to execute the following command (take the new CXT user as an example).
su - CXT -c 'mkdir -p /home/CXT/.wine/drive_c/windows/Fonts/'
cp -rf ~/.wine/drive_c/windows/Fonts/* /home/CXT/.wine/drive_c/windows/Fonts/
chown -R CXT:CXT /home/CXT/.wine/drive_c/windows/Fonts/*
10. It is generally not recommended to run this program using the OVZ server. Of course, if you want to use OVZ virtualized server, please note:
①. Swap Memory will not take effect, so your memory must be ≥2GB+.
②. You need to wait for the Swap Memory to be created, immediately open a new SSH window and delete the Swap mount.
③. The mounted configuration file is here (/etc/fstab) and deleted (/var/swapd swap swap default 0 0).
④. Delete the file (/var/swapd).
11. Source code is secure and hosted on Github:
Enjoy a wonderful desktop Linux life
Now you can access it via Remote Desktop Connection (RDP). [IP:3389]
[Technical Blog | Technology Blog] Telegram exchange channel: https://t.me/me_share (TG discussion group please pay attention to TG channel top message)
This article was posted on the [CXT] Technical Blog | 技術博客, if you need to forward the share, please indicate the source.