Cannot install Xfce using Glish on CentOS7

Linode Staff

I'm trying to set up a desktop environment on CentOS7 for using with Glish. I've following the instructions in your documentation but when I run the command sudo apt-get install xfce4 I get the message sudo: apt-get: command not found. How do I overcome this?

1 Reply

You're getting that error message because the command apt-get is for Debian-based distributions (Debian, Ubuntu, etc). CentOS is based on RHEL, Red Hat Enterprise Linux.

I just booted up my own CentOS Linode and was able to succesfully get Xfce working. Here's the process I went through:

First, install the EPEL repository:

sudo yum -y install epel-release

Next, install Xfce:

sudo yum -y groupinstall X11
sudo yum --enablerepo=epel -y groups install "Xfce" 

Finally, you'll need to start the desktop environment. In my case, this meant saving the command to start Xfce in the file .xinitrc and then running the command to start XServer:

echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc 
startx

Keep in mind that Xfce is only one desktop environment. There are many more out there. We use Xfce because it is one of the most useable lightweight solutions. The following link has a lot of great tips for running other environments on CentOS7:

https://unix.stackexchange.com/questions/181503/how-to-install-desktop-environments-on-centos-7

For reference, here's the instructions for getting up and running with Glish:

Using the Linode Graphical Shell (Glish)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct