Setting MATE as Default Desktop Environment for startx on Fedora

Posted on In Linux

I ever discussed Starting KDE from Command Line by startx for KDE and GNOME. Recently, I installed MATE desktop on Fedora 17 and am very happy with it—dear, Gnome 2 is back. However, I checked the /etc/X11/xinit/Xclients script which is called by ‘startx’ and it only includes ‘startkde’ and ‘gnome-session’ without support to MATE. But that’s find, let’s configure it by ourselves.

Let’s find a place to put our configuration. Check the ‘starx’ script and I find:

userclientrc=$HOME/.xinitrc
sysclientrc=/etc/X11/xinit/xinitrc

...

       if [ -f "$userclientrc" ]; then
            client=$userclientrc
        elif [ -f "$sysclientrc" ]; then
            client=$sysclientrc

That’s very clear now. We can set our one $usersciptrc (‘$HOME/.xinitrc’) and ‘startx’ will invoke it instead of the system-wide one.

Like Gnome 2, MATE’s process name for the session is ‘mate-session’ (Gnome use gnome-session). We can then create a .xinitrc under $HOME like this:

$ cat $HOME/.xinitrc
exec mate-session

After setting Fedora’s runlevel to multi-user (3) and booting it to the virtual console, invoke ‘startx’, then ‘MATE’ desktop happily appears ;)

MATE on Fedora 17
MATE on Fedora 17

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

4 comments

  1. GTK 3 application may look ugly under MATE. To make it look better:

    $ ln -s /usr/share/themes/TraditionalOkClassic/gtk-3.0/ ./.config/
    

    Of course, other themes that support GTK 3 is also okay.

  2. Install the ‘mate-media’ package to get the “sound volume” icon on the panel:

    # yum install mate-media
    

Leave a Reply

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