About Mouses and Chameleons: Polishing the XFCE Desktop on OpenSUSE | SUSE Communities

About Mouses and Chameleons: Polishing the XFCE Desktop on OpenSUSE

Share
Share

I know that Xfce users are known out there as “the guys who doesn’t care much about how the desktop looks like”… well, that not 100% true.

I was a Gnome user before the transition to version 3. “What a waste of resources” I said… the brand new “tablet-like” interface that Gnome team was so proud to announce at that time wasn’t really my thing… I normally used linux on a desktop/laptop computer and the big flying icons with fancy effects on Gnome 3 did nothing but eating up my RAM. I needed something simple and lighter. It was time to choose a new desktop interface. I though about using KDE but it wasn’t light enough either.

Thankfully, great Gnome 2 forks appeared like Cinnamon and Mate. Unfortunately, they can’t be installed on OpenSUSE through the installation media without you specifically choosing the needed packages, so I decided to make a guide about how to install and polish Xfce as your main desktop interface on OpenSUSE, which is an easy option to choose right from the installation with all essential pre-installed applications you’ll need to get it running.

If you use Xfce already for some time then chances are that you’re already familiar with what I’m gonna talk about here. If you are new to Xfce, welcome! here is how to make it really shine.

All begins with the system installation itself. During the installation process, on “Desktop Selection” step, select Xfce Desktop:

Here is how the desktop already installed looks like:

The pre-configured Xfce desktop on OpenSUSE is good but definitely not perfect though. As SUSE still keep focusing on Gnome and KDE as their main desktop options for users, the impression I have is that Xfce was kept as a side project, suffering from lack of polishing on the interface, which is exactly what re are about to change.

A better menu:

We can start by changing the system main menu, the Xfce’s default “Applications menu”. At the beginning, it looks like this:

 

Pretty basic right? By instance, there is not even a search bar for the applications in it and the menu doesn’t come up when you hit the (pardon me) “Windows” key on the keyboard. Also, the default geeko icon on the menu button seems to be too big for itself. As you can see it’s “cutting off” the edges… We are about to improve that by substituting what we already have with Whisker menu. Issue the command to get it installed:

zypper in xfce4-panel-plug-in-whiskermenu

After the installation, remove the old menu on the bar by right-clicking on it and selecting “Remove”. Confirm the removal from the dialogue when prompted. Now, right-click again on the bar and select “Panel > Add New Items”.

On the Add New Items window, search for “Whisker Menu” and click on “Add”. Now, you should be able to see a new blue icon on the bar. Move it back to the position where the old menu was by right-clicking on it, selecting “Move” and dragging it to the beginning of the bar. Finish the moving with a left click on the spot you want it to be on the bar. Now, lets adjust it’s icon and looking.

Do a right-click on the Whisker Menu you just added and select “Properties”. If you want to add a title, select the “icon and title” from the Display option. Set the title as you wish and change the icon to better fit the edges of the bar. You can do this by clicking on the icon and selecting “Image files” from the menu. My suggestion is adding the “distributor.png” icon located in: “/usr/share/icons/hicolor/16×16/apps/”. Now the icon doesn’t exceed the borders any more. The final result should look like this:

Ah, much better! Now, lets make it respond to the window key when pressed: Click on the main menu and select “Settings > Settings Manager”. On the new window, select “Keyboard”. On the Keyboard window, select the “Application Shortcuts tab” and click on “Add”. On the “Command” box, type “xfce4-popup-whiskermenu” and hit “ok”. Now, when the Command Shortcut window appear, hit the “window” key on your keyboard. The system will automatically identify it as “Supper L”. This is how it should look like in the end:

Overlapping notifications?

Now, lets fix the notification section. As you can see, by default the icons are squeezed and the edges are overlapping, which makes it ugly and difficult to distinguish from one to another:

Lets expand the bar first, which will give more space to the icons so we can organize it better later on. Do a right click on the panel and select “panel preferences”. On “Display” tab, expand the “Row Size (pixels)” to 30.

Now, to fix the notification area, open again the panel preferences. On the “items” tab, select “notification area”. Expand the “Maximum Icon size” to 30 and select “Show frame” box:

The final result should look like this:

As you can see, icons are fitting better. We will be able to see more how it will look like when adding more notification icons to It later on.

I got the power!

Now, lets adjust the Power Manager plug-in on the bar, which also seems to be too big for the bar itself. Unfortunately there is no easy option to change the icons directly on the plug-in as we did previously with the whisker menu.

If you will use Xfce on a desktop machine, maybe there is not even a reason why you should use this plug-in in the first place. I’m making this tutorial on a VM so there is no reason on keeping it too but if you are planning to use Xfce on a laptop, it might be a good idea to have it so you can get the status from your battery. If this is the case, I suggest substituting the power manager plug-in with the battery monitor, which is more robust and complete. In order to do that, you will need to install it first with the command:

zypper in xfce4-panel-plug-in-battery

After the installation, remove the current power manager plug-in by right-clicking on it and selecting “Remove” Confirm the removal from the dialogue when prompted. Now, right-click again on the bar and select “Panel > Add New Items”.

On the Add New Items window, search for “Battery Monitor” and click on “Add”. Now, you should be able to see a new battery icon on the bar. Move it back to the position where the old Power Manager was by right-clicking on it, selecting “Move” and dragging it. Finish the moving with a left click on the spot you want it to be on the bar. Now to adjust how it looks like, do a right-click on it and select “Properties”.

Under Display tab, uncheck the box “Display bar” and check the boxes “Display Icon, “Display percentage” and “Hide time/percentage when full”.

Now once your laptop is unplugged from the charger, the percentage will come up right next to the icon. Also, you will receive notifications when the battery is low the the icon color will also change according to the level.

Can you hear me?

Ok, moving to audio control. The one that is installed by default is based on alsa mixer, which is very limited and confusing. Luckily, we can take a better control over the audio devices on the machine by installing a new plug-in based on pulseaudio and pavucontrol:

 zypper in xfce4-panel-plug-in-pulseaudio pavucontrol

After the installation, remove the current audio mixer plug-in by right-clicking on it and selecting “Remove” Confirm the removal from the dialogue when prompted. Now, right-click again on the bar and select “Panel > Add New Items”.

On the Add New Items window, search for “PulseAudio plug-in” and click on “Add”. Now, you should be able to see a new volume icon on the bar. Move it back to the position where the old audio mixer plug-in was by right-clicking on it, selecting “Move” and dragging it. Finish the moving with a left click on the spot you want it to be on the bar.

To control your sound devices, click on the volume icon and select “Audio mixer”. There you can enable, disable and control the input/output devices with more details.

New locker:

We are almost done with our new (and now improved) Xfce desktop. Only some few small details are still missing. On OpenSUSE, the Xfce comes with lightdm as a Desktop Manager and xscreensaver as screen locker/screensaver.

This article is about polishing your desktop so we are supposed to be picky here: Xscreensaver is very old, ugly, inflexible and It doesn’t fit the same look you have on the login screen with lightdm.

By default, this is how the login screen looks like:

But this is how a locked screen looks like:

You can make the locked screen look exactly the same as the login one by setting the light-locker as the default program to handle the locked screens. Note that the following procedure also imply that you will remove xscreensaver from the system so if you still want to have a screensaver program running, then the migration to light-locker might not be the best option. You can install light-locker with:

zypper in light-locker

After the install, create the file /usr/local/bin/xflock4 and add the following content on it:

#!/bin/sh

PATH=/bin:/usr/bin
export PATH

# Lock by light-locker, xscreensaver or gnome-screensaver, if a respective daemon is running
for lock_cmd in \
    "light-locker-command -l" \
    "xscreensaver-command -lock" \
    "gnome-screensaver-command --lock"
do
    if [ ! -z "$lock_cmd" ]; then
        $lock_cmd >/dev/null 2>&1 && exit
    fi
done

Now, change the permissions on this file to be executable:

chmod +x /usr/local/bin/xflock4

And uninstall xscreensaver:

zypper rm xscreensaver

Now, when you lock your screen with Ctrl+Alt+Del, you should be able to see something like this:

Yast doesn’t like my mouse cursor!

You will notice that when you open Yast, the mouse pointer theme on that window changes from whatever you are using to “DMZ” theme. If you want to have only one mouse pointer theme through the whole system, here is how to do it:

Open Yast and select “etc/sysconfig Editor”. On the left-side menu, click on “Desktop” and “X_MOUSE_CURSOR”. You will see that the “DMZ” is selected there. Click on the field and type the name of the cursor theme you want to use. A reboot is required to see the changes made.

Thunar and Archive Managers:

By default, Xfce on OpenSUSE comes with gnome file-roller program installed as archive manager. If you want to remove file-roller and use any other program instead like engrampa for example, Thunar will fail to recognize it and perform right-click actions like compress and decompress files as you can see bellow:

To change that, copy the file “/usr/lib/thunar-archive-plug-in/file-roller.tap” to “/usr/lib/thunar-archive-plug-in/<name>.tap”, where “<name>” is the name of the new archive manager you want to use. I confess that I didn't this procedure with all archive managers available but I know this will work well with engrampa at least.

Now, open the file you just copied and substitute all “file-roller” words with the name of the desired program you want. Reboot the machine and try to create the archive file once again.

GTK2 and 3 compatible:

The last thing to do is to select a window theme that can work well on both gtk2 and 3 applications. I recommend using “Menta” theme, which can be installed with command:

zypper in mate-themes

You an chose the “Menta” through the Xfce “Settings Manager”. On “Window Manager” and “Appearence”, select “Menta”.

Conclusion:

Xfce is a great desktop environment for OpenSUSE: flexible, light and robust. Don’t take it’s simplicity for granted… there are many other things we could do with it which were not covered. The next step now is on you.

Share

Comments

  • Avatar photo victorhck says:

    Hello.

    I think that the Desktop selection in openSUSE has been renovated.
    Now the selections rely on patterns.
    https://lizards.opensuse.org/2017/02/20/highlights-of-yast-development-sprint-31/

    anyway, great first steps for new Xfce users.

    ‘ve phun!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    Avatar photo
    34,372 views