Hello everyone,
I’m struggling in setting up a desktop environment on CentOS 7. I have tried following multiple guides but with no luck.
I have followed these guides with no luck.
I have followed a guide for LXDE with no luck either.
At some point I got it working through DO remote console following a guide for Gnome 3 for CentOS 7 but the whole desktop environment was about 2 GB on disk.
Any way I haven’t managed to have tiger-vnc working.
I tried to set it up at every attempt (7-8 times) and I managed to connect for a short time when I had installed Gnome 3. But after a reboot it failed to start hence I was not able to connect.
Is there anyone able to suggest a guide to get a light desktop environment for CentOS 7 as well as one for having constantly working a VNC server?
Thank you.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I got:
]# yum groupinstall “X Windows System” -y Loaded plugins: fastestmirror, langpacks, universal-hooks Loading mirror speeds from cached hostfile
To use XFCE do
yum groupinstall "X Windows System" -y
yum groupinstall "Xfce4" -y
and apply Step 3, 4, 5 and 6 this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-remote-access-for-the-gnome-desktop-on-centos-7
after that if you want to keep security apply the firewall and selinux settings.
here is the tricky part.
before you run
systemctl start vncserver@:4.service
edit /etc/X11/xinit/Xclients file
and add
if [ -x /bin/xfce4-terminal ] ; then
exec /bin/xfce4-terminal
fi
before last curly brackets.
you can start VNC server with
systemctl start vncserver@:4.service
I think xfce will show up in your vnc client.
The instructions below are not terribly detailed, but should get you moving in the right direction.
#################################################
## These first several can be run directly as root
## or via SUDO
## Make sure all of the packages are up to date
sudo yum -y update
## This provides extra packages not included in the base
sudo yum -y install epel-release
## This is optional, but is a sanity-saver
sudo yum -y install bash-completion
## This installs the XFCE desktop environment
sudo yum -y groups install Xfce
## This installs your VNC Server
sudo yum -y install tigervnc-server
## This puts the VNC server under management by systemd
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
#################################################
## This next one should be run from the user as
## whom you will log-in using VNC. This should
## NOT be root
##
## If the user is not able to issue commands as
## root using SUDO, you will need to manually edit
## the file /etc/systemd/system/vncserver@:1.service
## as root and put in that user's name instead
## This puts the VNC user's information into the startup file
sudo sed -i -e 's![<]USER[>]!'"${LOGNAME}"'!g' /etc/systemd/system/vncserver@:1.service
#################################################
## This next one should be run from the user as
## whom you will log-in using VNC. This should
## NOT be root
##
## Set the VNC password and configuration for VNC user
vncserver
#################################################
## These next ones can be run directly as root
## or via SUDO
## Make sure VNC Server starts at boot time
sudo systemctl enable vncserver@:1.service
## Make sure systemd has picked up the new configs
sudo systemctl daemon-reload
#################################################
## This next one is only needed if you are running
## FirewallD
## Allow VNC Server traffic through the firewall
#sudo firewall-cmd --permanent --zone=public --add-service vnc-server
At this point, you should be able to access your server via VNC (the connection address would be the server’s IP, followed by a “:1”, so if your server’s IP address were 10.253.126.17, the connection address would be “10.253.126.17:1”).
Note, you will likely need to configure XFCE to do anything useful, like start a window-manager (xfwm4) and a terminal (xterm) when you log in, but that’s another story, for another time (and you can probably figure it out from http://docs.xfce.org/)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.