May 14, 2007

Dashboard in Ubuntu Linux with Compiz or widget layer (using screenlets)


This is probably one of the most interesting features of compiz (or beryl) when it comes to making Linux look like Mac OS X. In Mac world, it is called dashboard. The basic idea is to have some hidden widgets (or screenlets in Linux world) and bring them into focus in front of all other windows, and desktop of course, by hitting a key.
When you install Ubuntu Linux Feisty Fawn (7.04) the default composite manager would be compiz. The bad news is that handling widgets is implemented in beryl (the other composite manager). The good news is that since compiz and beryl are merging, this feature is now available in compiz. It is just not installed by default. Most of the unique beryl features or plugins are now ported to compiz and you have to install them yourself through synaptic. To do that, go to synaptic, find and install:
compiz-extra

Now you have to activate your new plugins in compiz.
Open Configuration Editor and go to:
/apps > compiz > general > allscreens > options

You need to add widget to active_plugins.

Now, you need to have some widgets/screenlets installed. If you have followed one of my previous posts about installing screenlets, chances are you have a handful of them on your desktop by now. Right click on one of them, hit properties and check Treat as Widget.
Since compiz is not bug free you might see some unusual activities! Stay calm, and from your compiz tray icon (where is my compiz manager?), deactivate and reactivate GL Desktop.


Now if you hit F9, you should see dashboard like effect.

Enjoy!

15 comments:

Anonymous said...

my calculator screenlet doesn't start. :(
When I double click on it it opens it up in gedit.(this happens for some other ones too)

"Knows how" said...

Refer to my new post:
http://osnovice.blogspot.com/2007/05/why-my-screenlet-does-not-start.html

Anonymous said...

Thanks for a great blog. I've spent lots of time here already.
However I have a question that betrays my complete lack of experience with ubuntu. I've completed the point where i have installed compiz-extra. Then i am stuck.

Where do I find the Configuration Editor menu you write about? Is it the GL Desktop menu you mean? If so I don't have the options there that you write about. Could you help me further a bit?

Many, many thanks.

::mj::

Unknown said...

I also cannot locate the configuration editor (and I thought I was getting quite a grasp on this UI stuff) :D

Thanks so much for the write-up, it looks great...actually made me go back from beryl to compiz, I'd just LOVE to see the widgets working !!

Unknown said...

I found it... It's supposed to be in Applications / System Tools but it wasn't there for me.

Go to a terminal and enter gconf-editor, hope this helps someone.

Anonymous said...

Thanks Michael,

That last comment has helped me a lot. Now I am writing about a new problem. There seems to be a conflict between my screenlets and my GL Desktop function. Starting the screenlets seems to turn off my GL Desktop and everything turns a bit ugly and cranky. Turning GL desktop back on again is a bit of a pain, and when I finally manage it the screenlets dissappear. Also I haven't managed to 'confine' my screenlets to only appear on my dashbord page, i.e. when i press F9. Could someone take pity on me and help me out here?

In anticipation thanks a bunch,

::mj::

"Knows how" said...

None of Compiz or screenlets are flawless, unfortunately.
I cannot be specific but I do know that some of screenlets simply do not behave well when you add them to compiz widget layer. However, clock, Calender and weather are among good behaving screenlets.

Anonymous said...

I've just found your blog th other day and it's made an interesting read. I've been looking for alternatives to gDesklets which are seemingly all very buggy (at least in feisty). One alternative that looks interesting but is in it's infancy is jackfield. Your blog was the first mention I've seen of screenlets. I do wonder why these things are written in python (screenlets and gdesklets) if only because it seems an intensely resource hungry way of creating fairly simple programs.

Anyway, I've hit three problems.

The first one was of my own making, attempting to enable widgets gives me the error:

/usr/bin/compiz.real: can't load plugin 'widget' because it is built for ABI version 20070328 and actual version is 20061227
/usr/bin/compiz.real: Couldn't activate plugin 'widget'

The version mismatch was because I'd previously tried to install trevino's compiz 0.5 packages from

deb http://download.tuxfamily.org/3v1deb feisty eyecandy

Though this is a good place to pick up kiba-dock packages, I found that compiz 0.5 didn't play nicely with feisty. It may have been updated since, as it's based on the svn. I reverted back to the feisty repository, leaving compix-extra-plugins and the 0.5 verion of widget installed. Having fixed this, I hit my second problem.

Everytime I start a new widget compiz crashes and I'm back in metacity. Once the widgets are loaded I can restart compiz and they work, but this means every time I log in I have to restart compiz. This is the error I get:

** (gnome-compiz-preferences:6794): WARNING **: plugin animation isn't installed Terminated

I've failed to locate an animation plugin in /usr/lib/compiz/ but restarting compiz takes care of it so I'm guessing the animation plugin can't be that important or is in the core (i.e. not a plugin) anyway. I have widget as the last plugin.

The final issue I've hit (apart from some buggy screenlets I've learnt to avoid) is stickiness and this I only hit after a reboot. All the screenlets have widgets and sticky set but fail to show on all desktops, showing instead on only the first. The onyl waty I've found of getting around this one is to disable stickiness and then reenable it for each screenlet in turn after each login.

They look very nice and I'm sure in a while they will work really well but I guess they are not quite ready yet.

"Knows how" said...

That sounds like a lot of errors! First of all I am delighted that you found the post useful.

As you know both screenlets and compiz are not bug-free. However I think some of problems might be fixed if you use the stable version of compiz. That means going one version down but gaining more stability.

About the last error, do you run "screenletsd start" before loading any screenlet and every time you start the system?

Anonymous said...

The latest stable version of compiz is 0.4, as I say I'm currently using the feisty repo so I'm on 0.3.6-1ubuntu1. What version are you using?

"screenletsd start" is in my session startup scripts (~/.config/autostart/).
screenletsd itself is a bash startup script for screenletsd.py (plus other stuff). Whether I start screenlets using 'screenletsd add [screenlet]' or directly click on screenlets, it makes no difference. As soon as I click the widget box compiz crashes. Previously screenlets are started by screenletsd.py from the settings in ~/.config/Screenlets and that crashes compiz too.

Yeah, they are insteresting and thanks for bringing them up but if my experience is anything to go by, I'd say they are maybe not ready for the mainstream. I'd be interested to know what problems you've had and/or solved.

I notice that you list a number of stable screenlets, is this list exhaustive in your opinion? I might try cutting down to just those screenlets.

Currently I have Weather, Clock, Comic, Rss, NowPlaying, Notes, and Calendar. Maybe I'll cut down to Clock and see how that goes.

"Knows how" said...

I am using the very same version of compiz too.

On my own system, I gave up using widget layer+screenlets and ended up putting those three screenlets directly on my desktop. I haven't experience any problem so far. Though I should say weather screenlet was also stable.

Anonymous said...

Interestingly I just tried the clock screenlet on its own. Though it crashed compiz when I selected widget in the properties dialog it's been rock solid on session restarts (I've just done 20).

To me the widget layer is really useful. I normally have my desktop piled high on 4 workspaces with windows that are variously minimised, docked in the notification area or open. Sometimes show desktop works fine :). Also I have my desktop itself full of documents and folders so finding space for a bunch of screenlets proved tough.

Why did you give up on the widget layer?

As you've mentioned several times compiz isn't yet very stable (though I haven't tried 0.4). One of my pet peeves is that window border controls are sometimes inaccessible on the top window and two aligned windows mean that you can actually end up closing a window below by mistake. I know have use a theme that has nice colouring for the buttons so I know if they are working or not.

Anyway, thanks for your comments (which are super fast btw). I'll continue reading and enjoying your blog. Just for interest I'll list the things I haven't found on your blog which I think make my Feisty install work. Some may have been too obvious for you :)

Medibuntu (the new semi-official place for multimedia etc)

deb http://medibuntu.sos-sts.com/repo/ feisty free non-free
deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free

Getdeb (nice clickable to install debs which won't rock the boat when you upgrade to feisty+1 - in theory).

http://www.getdeb.net/

k9copy (I know it's a kde app but you won't find better for backing up DVDs - the gnome equivalent is not good)

dvdstyler (A basic DVD creation application that works really well if you have all your video in the right form already).

mandvd (A nice looking and more fully featured DVD creator that dvdstyler but manages to increase file sizes of DVD compatible video by throwing everything through mencoder irrespective of whether it needs it or not).

kiba-dock (download the debs from trevino's repository without adding the repository

http://download.tuxfamily.org/3v1deb/pool/feisty/eyecandy/

kiba-dock, kiba-settings, kiba-plugins.

The configuration utility is a bit opaque but this is still the best dock imo. The version I have installed needs to be switched to viewing all files when attempting to add launchers. Some plugins don't work and some crash it when you try to start them.

Jokosher - a very weird and nice looking audio recording tool which just doesn't look like it should and I intend to play with sometime soon simply because I'm curious. I managed to import an old cubase song and play it within a couple of minutes of first starting it (wav by wav). I still can't figure out how to do that in ardour.

Avidemux is great for converting one form of video to another. The one shipped with ubuntu has a few very useful features switched off. I haven't tried the getdeb version.

Stardict is a great dictionary program once you've figured out how to install the dictionaries and the annoying sounds can be turned off.

Banshee is my favourite media player now. It's not as clever as rhythmbox in a lot of ways but it's the closest app to one that does everything audio from ripping cds, burning cds good ipod and other usb mass storage mp3 player support (.is_audio_player keys).

"Knows how" said...

The reason I gave up on widget layer was its instability. I also like to see (for instance) my clock when I am working on a document. So I figured widget is not for me. And since my desktop is usually icon-free, I have ample space for screenlets.

The list the you kindly wrote down here is so extensive I have to take my time and go through them one by one. As far as I see, many of them are new for me. I will write about them as soon as I feel I have something to share!

Unknown said...

hello.

I appreciate this blog, because I think this is a very cool feature of Mac OS.

I haven't quite gotten this to work. When I go to the configuration editor>apps>compiz>general>allscreens>options
there is not an activate_plugins as you mentioned in your blog. I see an active_plugins, but I assume these are not the same things.
So, what should I do? do I create a activate_plugins key?

Any help is greatly appreciated.

Thank you!

"Knows how" said...

Hi Kyle,

They are indeed the same! It was a type and the correct one is active_plugins.

Thank you for bringing this issue up. It was in fact a typo and I have corrected it in my post.