Last active
January 2, 2019 19:57
-
-
Save cerealskill/480aa34b329ecd8eef0f2f8e83f7c5ec to your computer and use it in GitHub Desktop.
Install X Windows Server on CentOS 7 & XRDP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo yum groupinfo "Server with GUI" | |
| sudo yum groupinfo "GNOME Desktop" | |
| sudo yum groupinstall 'GNOME Desktop' | |
| # systemctl enable graphical.target --force | |
| #rm '/etc/systemd/system/default.target' | |
| #ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target' | |
| sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm | |
| sudo yum install -y xrdp tigervnc-server | |
| echo "SELINUX exceptions"; | |
| chcon --type=bin_t /usr/sbin/xrdp | |
| chcon --type=bin_t /usr/sbin/xrdp-sesman | |
| echo "Start the services and auto enable boot time"; | |
| sudo systemctl start xrdp | |
| sudo systemctl enable xrdp | |
| echo "Firewall exceptions"; | |
| sudo firewall-cmd --permanent --add-port=3389/tcp | |
| sudo firewall-cmd --reload | |
| echo 'For those who are getting disconnected after 1 - 2 secs, you need to edit the file /etc/xrdp/xrdp.ini and comment out the line containing "channel_code = 1".'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment