2013-06-07

How-To: Make Xfce Like Unity

This is more or less the sequel to this post. It came about because I wanted to see if it would be easy to make Xfce look like Apple's Mac OS X; I figured that Unity looks similar enough, so I might as well write about that. Follow the jump to see how to do it. I would have added more pictures if I had more time, but I'm heading back to campus tomorrow, so I can only make this a quick post in the meantime.

The process is actually a bit simpler than in KDE, assuming that the starting point, as was the case for me, is Linux Mint 13 LTS "Maya" Xfce; note that the most important step (the global menu) can't really be done in Ubuntu or its derivatives beyond version 12.04 LTS "Precise Pangolin". With that in mind, let us proceed.

Move the existing bottom panel to the top of the screen. Now add another panel, set it to be vertical, and position that at the bottom of the left side of the screen. Add to the second panel, from top to bottom, an Xfce menu, a "Places" applet, application launchers of your choice, a taskbar, a separator, a workspace switcher, a button to show the desktop, and a trash applet. The taskbar settings should be set to not show button labels, always group windows, and show windows from all workspaces. The separator should be set to expand. The workspace switcher should be set to display in two rows. The Xfce menu should be set to have an icon with no label, and the menu itself should be the same as what is already present in the horizontal panel (for example, in Linux Mint 13 LTS "Maya" Xfce, the menu file is in "/usr/share/xfcemint/"). (The reason why I'm doing this somewhat more crude method is because DockBarX doesn't seem to play well with Xfce in Linux Mint 13 LTS "Maya", and I can't seem to install the Microsoft Windows 7-esque improved taskbar applet from source. If you can get either of these other alternatives to work, use those instead.)

Now, remove everything from the top panel except for the separator, notification area (not the indicator applet), and the clock/calendar applets. Follow the instructions here to install and use the indicator menu applet; once both the volume and global menu applets are visible, move the combination to the far left of the panel, such that those sit on the left while the other applets sit on the right, with a lot of space in between. Add an "Action Buttons" applet to the right of the clock/calendar applet. This actually basically completes the major work going into making Xfce like Unity.

The two panels should play well together too. The horizontal panel (on top) should be locked, have a row size of 23 pixels, should have a length of 100%, and should have the length automatically increased. The vertical panel (on the left) should be pushed to touch the bottom of the screen as well, be locked, have a row size of 48 pixels, have a length of 97%, and should have its length automatically increased as well. This combination will replicate the two panels present in Unity.

For even better results, more can be done. Turn on Xfce compositing (or install and use Compiz, though you really have to know what you're doing for the latter to work). Install the Ubuntu GTK+ and icon themes from the repositories, and use the Ambiance GTK+ and dark Ubuntu icon themes. To get the Ambiance Xfwm theme, follow the full instructions here; following that, move the window buttons to the left side. Change the Xfce menu icon to one that looks more like the Ubuntu icon. Change the vertical panel background to be a solid color (preferably black) with an alpha value of 70 out of 100. Use an Ubuntu-esque wallpaper, and change the Xfce desktop icon font color to white; this latter step is done by going into the home folder, pressing 'CTRL'+'H', opening the file ".gtkrc-xfce", and changing all instances of the value "#000000" to "#FFFFFF".

Xfce as Unity
Tada! Xfce now looks like Unity! I don't know why anyone would do this rather than just use Unity; at least with KDE there is the excuse that it offers even more features not found at all in GTK+ DEs along with its own set of unique applications, but that can't really be said of Xfce aside from generally being as customizable as GNOME 2. But in any case, I figure someone might find this useful. There are only three issues with this. The first is that the volume applet is tied to the global menu, and nothing can be done about this. The second is that GTK+ 3 applications retain their own menus (and also allow the global menu to function normally), which is especially odd considering that when I tried this yesterday, GTK+ 3 applications cooperated just as well as GTK+ 2 applications. The third is that in Ubuntu 12.10 "Quantal Quetzal" and more recent versions (along with its derivatives), the global menu no longer supports GTK+ 2, which means none of these steps work there. Enjoy this while you can!

24 comments:

  1. Innocent BystanderJune 7, 2013 at 4:30 PM

    In other words, how to catch lung cancer even when you don't smoke. Sorry, but people uses XFCE because they want to avoid Unity.

    ReplyDelete
    Replies
    1. @Innocent Bystander: I'll admit the analogy is pretty good, but did you not read the article at all? I specifically said that there really isn't any compelling reason to do this, but I figured at least one person out there would want to learn how to do this for whatever reason. The beauty of Xfce is in how easy it is to customize it even if the end result is crazy.

      Delete
    2. Innocent BystanderJune 7, 2013 at 5:43 PM

      Then it would be much more useful to make a tutorial on how to create custom launchers, grouped launchers, install custom icons pack & nice themes, how to backup & restore XFCE custom settings from one machine to another, comparing XFCE panel to Cairo Dock. Those are useful stuffs which will augment the value of XFCE.

      Delete
    3. STFU, douche.

      Delete
    4. You really do not understand why people use unity.

      It is because on widescreen it is convenient
      1) to have vertical panels
      2) merge horizontal stripes of maximised windows with poor usage of their area e.g. window titles that usually occupy only up to 20% of length.
      An in opposite its obnoxious to work with these screen area wasters.

      And most of it can be achieved with xfce that has far less harware requirements, better prformance parameters and it is availble without designing new desktop environment.

      This is important message. And thanks to the author for it.

      Delete
    5. Hello
      I'm the one person who prefer to use unity instead of default desktop manager.
      Not everyone have large screen, so getting the most of the workspace is a good thing.

      Delete
    6. @Agung Mauliady: It's great that you enjoy using Unity, but what exactly do you mean by the "default desktop manager"? Also, you are aware that almost all other DEs offer similar or more fully-featured workspace management tools versus Unity, right? Anyway, thanks for the comment!

      Delete
    7. Who are that strange folks? XD

      Delete
    8. @Anonymous: To be honest, that includes me; I really did want to use Xfce to avoid Unity, and I did this post merely out of curiosity regarding what might happen. Thanks for the comment!

      Delete
  2. That's why I use XFCE, very customizable. I don't particularly like Unity, but I enjoyed the article. Incidentally, you could have turned the Opacity down a bit on your Dock to match Unity's.

    I use Xubuntu, when I do I always delete the Dock on the bottom and drag the top bar down to the bottom. I add some spacers and launchers and such till it looks like *that* classic OS from around '98. It's just my preference because it's simple and stays out of my way. I use the Shiki-Brave and Classic Ambiance themes.

    Nothing in my System Tray on the right except the clock, weather update and Network Monitor (Bars only). And Dots style separators. I like it =p Point is, it's very customizable to anyone’s liking. But it annoys me they still call XFCE a 'light' WM when it's resource usage is the same as Gnome 3 and KDE; and they STILL don't have even basic effect's like fade-in and out or Min-Max animations.

    ReplyDelete
  3. This is an excellent documentation of the level of customization that is possible. I seem to recall another site where they did a Vista and MacOS X redesign - it was quite impressive.

    ReplyDelete
  4. Unity's screen layout is actually OK. But if Unity was just a reorganization of an on-screen dock and panel, then it wouldn't have generated so much controversy.

    Canonical eliminated the start menu, replacing it with a cumbersome search function; they also adopted the Mac's one-menubar-for-all-programs style, took away many customization options, and put all of that in a package that requires high-end graphics capability to even run. I don't know why anyone would want to emulate any of that.

    With Xfce, you can put a launcher in the dock that opens the "application finder", which is a nicely laid out menu of installed programs, organized by program type (graphics, internet, etc.). Alternatively, the launcher could run "thunar /usr/share/applications", which would produce a very Mac-like display of clickable icons of all installed applications. I imagine one could do this with Unity, in effect restoring the start menu (but I haven't tried - Xfce works just fine).

    And I still haven't found a simpler way to switch desktops than Xfce's trick of just moving the mouse off the right or left screen edge. No mouse clicks at all! Gnome 2.x had the same thing, I think; gone the way of the Dodo bird...

    ReplyDelete
  5. I'm with Innocent Bystander. I switched to Xfce 3 years mainly to get away from what I saw coming down the pike with GNOME 3 and Unity. While it's interesting to know that this can be done with Xfce, this article begs the question: WHY would anyone in his/her right mind WANT to do this? As someone who likes Xfce the way it is due to the Xfce team sticking to tried and true intuitive GUI design that has stood the test of time, I consider this article to be completely and utterly pointless.

    ReplyDelete
  6. @Innocent Bystander: Those are all useful articles in their own rights, but isn't it nice to see them put to use in a concrete example as well?

    @Mike Frett: I too am a fan of the classic Microsoft Windows-esque interface. I also agree that Xfce is not lightweight in and of itself; for instance, my preferred setup uses about 350 MB of RAM at idle.

    @Morten Juhl-Johansen Zőlde-Fejér: I think the articles about customizing Xfce to look like Apple's Mac OS X are a little old now, though. Plus, to get a normal-looking dock instead of the weird mishmash of panels/docks as in Unity, I would just use something like Docky/Plank.

    @Anonymous 1: The beauty is that you can replicate the default desktop layout of Unity in Xfce without bringing the extra baggage of restrictions on how to further customize the desktop. Also, I believe Compiz and/or KWin have hot corners that allow for switching desktops if need be.

    @Anonymous 2: No one may particularly want to customize Xfce in this specific way, but is it not useful to see the range of ways that Xfce can be customized in one concrete example?

    Thanks for the comments!

    ReplyDelete
  7. I like Unity generally because I have some space on laptop screen with global menu. But I don't like Unity hunger for system resources so im currently using unity-2d so if global menu will be better in XFCE I will switch to this.

    ReplyDelete
    Replies
    1. @Anonymous: Your results may vary, but more importantly remember that this is impossible for newer versions of Ubuntu or its derivatives (beyond version 12.04 LTS "Precise Pangolin"). Thanks for the comment!

      Delete
    2. Yep! I know. There is no Unity-2d now. They are working on unity8 witch is rewritten and have to be lighter, if not i will switch to xfce for sure, i don't want nice system UI without launch any prog because it will be laggy :D I have constantly running a 2 web browsers mail client, music client, pidgin, skype, bluefish, xammp, etc. I prefer response from computer over nice look :) so i hope they will fix some bugs in unity or in xfce and i will have a nice choice options :D Bytw. thanks for this post, i know now about some alternatives for me.

      Delete
    3. @Anonymous: There may be some alternatives on the horizon for getting Xfce to do this in the future. I think there already exist a global menu applet for MATE as well as a plugin to make it work in Xfce, and while it is extremely hard to get Compiz 0.9.X (i.e. when Unity came around) to play nicely with Xfce, I think there are plans to fork Compiz 0.8.X so that MATE, Xfce, and other DEs can use Compiz as it was when GNOME 2 was around. Thanks for the comment!

      Delete
  8. i appreciate your article for someone who loves the UI of unity but wants a lightweight desktop like xfce. :)

    ReplyDelete
    Replies
    1. @Melchor Dioso: Thanks for the support!

      Delete
  9. I've set my Xfce up like this as I love the idea of getting rid of window menus. Sadly though as it is on Arch not all programs will give up their menu bar so easily, I think the Ubuntu versions must be patched or something...

    Anyway love this idea, works great.

    ReplyDelete
    Replies
    1. @Henry Gibson: Unfortunately, at this point, these instructions are not likely to work on Ubuntu either, so they are basically deprecated. Thanks for the support!

      Delete
  10. how can I install indicator appmenu in xubuntu 12.04 that used xfce 4.8? I tried this tutorial http://forum.pinguyos.com/Thread-How-to-customize-Xfce-4-10 didn't work the panel shows only "Appmenu not found" 'cause the tutor just for xfce 4.10. Is there a way to fix that problem because? I really love that indicator appmenu

    ReplyDelete
    Replies
    1. @Sofian Nugraha: I'm not sure exactly what the deal is, but it is possible that the package is no longer maintained. Thanks for the comment!

      Delete