SysPeek – A System Monitor Indicator for Ubuntu

I’ve always used the build-in system monitor applet in Gnome to keep an eye on what’s going on system-wise (I run a lot of application/web server locally for developing). But I never liked the look & feel of the applet. Nevertheless, it was there – so I used it.

As Ubuntu finally dropped support for panel applets, I thought there should be a system monitor indicator, that fits in well with the panel style and the other indicators. So as little side project, I developed my own indicator. Here is what I came up with.

SysPeek System Monitor Indicator

SysPeek

The icon shows the CPU load. It is actually 10 icons, so for every 10% CPU load another icon is shown.

SysPeek icons

SysPeek icons from 0% to 100%

By clicking on it, it reveals more information about memory, swap, disk and network traffic. It is not configurable yet, but that’s the next on the todo list. The disk usage is, at the moment, for whatever disk /home is mounted on.

The project lives in Launchpad: https://launchpad.net/syspeek

I’ve also set up a PPA for easy installation:

sudo apt-add-repository ppa:vicox/syspeek && sudo apt-get update
sudo apt-get install syspeek

Or download the .deb directly: syspeek_0.2~natty1_all.deb

Bash Snippet: Aliasing a Directory of Scripts

The Atlassian SDK contains not one script, that you can put somewhere and alias it in your .bashrc, but a whole folder with “atlas-run”, “atlas-clean”, “atlas-mvn”, etc…
With a for loop, you can alias them all at once:

for filename in /home/vicox/Apps/atlassian-plugin-sdk-3.3/bin/*
do
 alias $(basename $filename)=$filename
done;

JSF StackOverflowError (faces-config.xml)



faces-config.xml

I was getting a java.lang.StackOverflowError in my JSF Application. Putting “version=2.0″ into the faces-config tag fixed it. Thank you Hazem!

<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
              version="2.0">
</faces-config>

Ubuntu Launcher for Google Webapps, Twitter and Facebook (PPA)

I’ve build some packages which add launcher for Google webapps (Mail, Reader, Calendar, Docs), Twitter and Facebook to the applications menu.

Menu

This is how it looks like in Docky

Install from PPA:

Add “ppa:vicox/weblauncher” to the Software Sources in the Ubuntu Software Center, or type in the terminal:

sudo apt-add-repository ppa:vicox/weblauncher

To add all launcher (Google Mail, Reader, Calendar, Docs, Twitter, Facebook), install:

weblauncher

Just Google Webapps:

weblauncher-google

Just Twitter and Facebook:

weblauncher-social

Individual:

weblauncher-google-mail
weblauncher-google-reader
weblauncher-google-calendar
weblauncher-google-docs
weblauncher-twitter
weblauncher-facebook

Install from DEB:

Google Mail: weblauncher-google-mail_1ppa1_all.deb
Google Reader: weblauncher-google-reader_1ppa1_all.deb
Google Calendar: weblauncher-google-calendar_1ppa1_all.deb
Google Docs: weblauncher-google-docs_1ppa1_all.deb
Twitter: weblauncher-twitter_1ppa1_all.deb
Facebook: weblauncher-facebook_1ppa1_all.deb

About Todo Lists and Indicators

Indicators were introduced in Ubuntu with version 9.10 and will sooner or later replace the notification area. Some programs like Rhythmbox, Gwibber and Evolution are already using indicators instead of notification icons (at least in Ubuntu).

An indicator is basically an icon in your panel, that tells you something about the state of the program. For example, the messaging indicator turns green when you get an email.

But, you can also interact with the indicator. By clicking on the icon, a menu pops up where you can start playing music, jump to your music player, go to your inbox, quit an application, etc.

Here are two indicators, that are new in Ubuntu 10.04.

Sound Indicator

Sound Indicator

Me Menu

Me Menu

What’s special about these indicators, is that they have a volume slider and a text entry field. Usually you don’t find that in a menu. That’s cool, they put application functionality into the indicator. No need to locate or open Gwibber to post a new tweet. Just click on the Me Menu, type and hit enter.

Then I made this mockup.

Todocator

Todocator

It’s a simple todo list. Yes, there are already a lot of of todo apps, Tasque for example. But these applications are too complicated. You can set a due date, set a colour, group tasks or even create sub tasks. It’s a lot of work to manage your todo list. I want to work on my tasks, not on managing my tasks.

Also, a lot of tasks come from email or your browser. If I get an email that says “Do this”, I don’t copy that email into my todo list. Too much work. Instead, I move it into an email folder, called TODO. If I read something on the internet that leads to something I want to or must do, I use Read it later.

So “Try Lubuntu” in the mockup, actually wouldn’t be in my todo list, because I would save the website in Read it later, or I just download the ISO to my download folder, which also serves as a todo list.

As I made this mockup, I had a simple todo list for basic things in mind. Similar to a Post-it note on your desk, or a shopping list. Quick adding, quick strikethrough. I think an indicator would be perfect for this.

Ok let’s code…

As it turns out, the programming part is not as easy as it looks. The menu that pops up, when you click on an indicator, is a GTK Menu. And you can’t put text entry fields or markup-ed text (strikethrough) into a GTK Menu or a GTK MenuItem. You’ll have to build a custom widget.

Because I don’t have a desktop programming background, and I’m new to GTK, I’m still in the process of figuring out how to accomplish this in Python. Any tips or references would be appreciated.

I think it would be great, if there was a library, some sort of GTK extension, that helps an app developer to put widgets like entry fields, sliders, etc into menus. I can imagine a lot of programs would benefit by this.

Blog 2.0

So this is my new blog? ‘New’ because I had an old blog. And I deleted it. The reason I did it, was that most of the articles where howtos for things that are now obsolete. No one is interested now in how to work around an ALSA bug in Ubuntu 7.10. And because I hadn’t posted anything new for months, I just took it down.

A couple of days, I went without a blog, but that didn’t feel right. So very soon after purging it, I downloaded a fresh copy of WordPress, and put it here. I didn’t delete or replace the “Hello world!” post, I just let it sit there, knowing that someday I want to blog again… about something.

Well, yesterday, while randomly surfing the internets, I came across this blog post from Alex Payne. He is talking about taking a hiatus from blogging, so funnily, exactly the opposite of what I am doing. But he says:

I write for myself. Always have, always will. Writing helps me structure my ideas.

And that is the opposite of what I was doing. I wrote, not for me, but for others. I like the idea, writing for oneself, without an audience in mind. Focusing on things, you think are important. And that motivated me, even though it was already pretty late at night, to go into my blogs admin panel again.