154 Posts in Category 'Linux'
X automation with xte
I learned today (via a great blog post) about xte. This program lets you simulate X Windows mouse and keyboard events from the commandline. How much more awesome can you get?
Hans illustrates how to integrate xbindkeys and xte to make KDE4 effects activate. I wanted the KDE4 "Desktop Grid" to appear when I press a mouse button (because my new mouse has a lot of buttons to spare), so this is exactly what I was looking for.
xte is the kind of glue that makes Linux awesome. KDE lets you set global keyboard shortcuts for lots of things. xbindkeys lets you assign shell commands to mouse buttons. And xte ties the two together. Possibly none of the programmers on these three tools knew about the others, but they interact perfectly to let you do anything you want.
You may be thinking, "If you want to work with KDE from the commandline, why not use DBUS?" That's what I tried to do first. But I can't for the life of me figure it out. There's some indication that we might be able to do this somday, like so:
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid
Or maybe it's already in the latest version of KDE and I haven't upgraded yet. Either way.
By the way: could DBUS possibly have a more verbose or cryptic interface? I was hunting through the available DBUS commands looking for something that would show the Desktop Grid, and I ended up having to scan through lists of crap like this:
~ % qdbus org.kde.kwin /KWin
method Q_NOREPLY void org.kde.KWin.cascadeDesktop()
method void org.kde.KWin.circulateDesktopApplications()
method bool org.kde.KWin.compositingActive()
signal void org.kde.KWin.compositingToggled(bool active)
method int org.kde.KWin.currentDesktop()
method QList<int> org.kde.KWin.decorationSupportedColors()
method void org.kde.KWin.doNotManage(QString name)
method Q_NOREPLY void org.kde.KWin.killWindow()
method QStringList org.kde.KWin.listOfEffects()
method void org.kde.KWin.loadEffect(QString name)
method QStringList org.kde.KWin.loadedEffects()
method void org.kde.KWin.nextDesktop()
method void org.kde.KWin.previousDesktop()
method Q_NOREPLY void org.kde.KWin.reconfigure()
method void org.kde.KWin.reconfigureEffect(QString name)
method void org.kde.KWin.refresh()
signal void org.kde.KWin.reinitCompositing()
signal void org.kde.KWin.reloadConfig()
method bool org.kde.KWin.setCurrentDesktop(int desktop)
method void org.kde.KWin.showWindowMenuAt(qlonglong winId, int x, int y)
method Q_NOREPLY void org.kde.KWin.toggleCompositing()
method void org.kde.KWin.toggleEffect(QString name)
method Q_NOREPLY void org.kde.KWin.unclutterDesktop()
method void org.kde.KWin.unloadEffect(QString name)
method bool org.kde.KWin.waitForCompositingSetup()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
This is line noise to me.
Clementine: A triumph of Free Software
Ages ago, in the long-forgotten days of 2008, there was Amarok 1.4. And it was good. Then KDE4 came along and Amarok was rewritten, reshaped, becoming something... different. Something unsettling. Something not altogether pleasant.
Fear not. Today we have Clementine.
I consider Clementine a triumph of Free Software. A great project fell off the rails, so someone else picked up the pieces, forked it and kept the spirit alive.
Sorry for the downtime
This isn't the kind of email I like to see when I wake up:
Our backend monitoring system has detected an error on the host where your Linode resides which could lead to a failure condition. In order to protect your Linode, we have scheduled an emergency migration to a different host which will commence shortly. Please note that there is currently no issue with your Linode - this is a proactive measure we are taking to avoid an issue in the future.
We apologize for any inconvenience this may cause. Should you have any questions or concerns, please do not hesitate to reply to this ticket.
The server rebooted and my sites didn't come back up, so there was some downtime. Sorry about that.
Clementine: looking great
Amarok is looking really good these days:
Hold on, that's not Amarok! It's Clementine, a Qt4 port of Amarok 1.4, aka "my dreams finally come true", aka "what Amarok 2 should've been". It's functional right now, not quite as fully-featured as Amarok 1.4, but all the major bits are there, and it's being actively developed.
Once again I am amazed at and eternally grateful for the number of choices of media players there are in Linux. It seems like I write a new blog entry every other week saying how great some media player is. The reality is that there really are tons of great options. And this is yet another.
But Amarok 1.4 was special. And I really hope Clementine succeeds.
Exaile: The best Amarok since Amarok 1.4
Like a sad dumb dog who still hopefully visits the grave of his dear, departed master, every once in a while I try Amarok 2 again. Unfortunately, there has been no improvement in usability since the last dozen times I checked.
But have you seen Exaile lately? This is what the bleeding edge version looks like:
It's pretty nice. It's about as close as you can get to a stable, fully-functional Amarok 1.4-ish player nowadays.
Aside from looking good, Exaile is good at handling ID3 tags (a few Japanese tags that Amarok 2 displays as ????????, Exaile displays properly) and it's pretty fast to rescan my collection nowadays, which is nice. It does fairly sane grouping of multi-artist albums under "Various artists". It supports moodbar and song lyrics and cover art fetching and such, if that's the kind of thing you enjoy. It even splits the library display by the first letter of the artist names, just like Amarok 1.4 did, which is awesome.
I did have some problems installing the dependencies (python bindings for webkit?) for some of the plugins, but oh well. I figured it out.
Today I went so far as to install gnome-settings-daemon and gnome-control-center just so Exaile wouldn't look like crap. I use KDE4, and I haven't touched Gnome or any Gnome libs in a few years, so this is saying something.
Mark Kretschmann, an Amarok dev, recently wrote an article about the paradox of choice, in which he said (probably correctly) that being presented with too many options and too many choices end up paralyzing people and making them miserable.
Sorry, but the irony was overwhelming...
I really do believe there's a good program buried somewhere in that mess of controls, desperately wanting to be free.
Virtualbox looking good
I blathered on a bit about VMWare a while back, and lots of people recommended VirtualBox. I'm trying VirtualBox 3.1.2 with Windows 7 host and Linux guest, and it works surprisingly well. I've used it successfully to hack on a bunch of projects while I'm stuck on a Windows laptop (shudder).
Installing was essentially self-explanatory. I never read any docs, except when it came to installing those "Guest Addition" programs to allow better mouse-handling. And I had to look up how to go about sharing folders between host and guest. But the documentation was clear, I found a short description how to set up the share and then and a command to run to mount the host folder:
sudo mount -t vboxsf ShareName /mnt/mountpoint
I'm using Gnome in my guest, because I haven't used it in a long time and I was curious what'd changed. I'm amazed even Compiz works in the guest. I recall a time in the very recent past when my computer couldn't even handle Compiz natively, let alone in a virtual machine.
Perhaps the best part about VirtualBox compared to VMWare is that there is one product called "VirtualBox" and one download link that took me a matter of seconds to find. Fancy the thought.
Exaile
In my ongoing quest for a good audio player (after becoming an Amarok exile and refugee) I settled on aTunes. aTunes is really good except for two quibbles...
One, it's a Java app (a Swing app as far as I can tell?) and the GUI is enormous and unresponsive and certain parts of it really behave strangely. Like clicking in text fields to focus them sometimes requires multiple clicks. It's just annoying enough to constantly throw me off.
The second problem is that it crashes all the time. Music keeps playing but the GUI disappears. pkill java has become necessary far too often lately.
So now I'm trying Exaile. It's very Amarok 1.4-like. I can overlook the fact that it's GTK because it's otherwise so nice. Best part, when asked if Exaile is going to go the way of Amarok 2, the dev has this to say:
Never ever ever ever ever ever.
I'm having a hard time coming up with any deficiencies in Exaile so far. Everything in the GUI is laid out nicely. No crashes yet.
One of these days I'll find an acceptable app... Most of these apps are good, but I'm too picky. I love how Linux lets me be picky. There is a wealth of options, and everything is free. I am spoiled.
VMware: What's in a name?
VMware never ceases to confuse me. Not the program, which is a pretty good piece of software. Just the name of everything. Look at this list of VMware software; can you figure out what any of those things are via their names? The VMware official site is no less confusing.

Hilariously, all of these things seem to be named different things than a year or two ago when last I tried to install VMware. It seems this company, like many others, enjoys renaming everything at random, just to keep you on your toes.
Fluxbox, we meet again
I'm sort of tired of KDE4 crashing left and right and Plasma barfing all over me all day. So I decided to check out the current state of lightweight window managers.
Lo and behold, Fluxbox is still going strong. It was the first WM I used way back in 2000-something when I started using Linux full-time. Last time I tried, there were always weird compatibility problems with system tray icons and pagers working properly when running a mix of KDE and Gnome and other apps, but those seem to have cleared up nicely; I have yet to hit any snags. Here's a screenshot.
This took very minimal effort to install and set up. Maybe a couple hours total. I'm using ipager and conky. The wallpaper comes from the UniQ KDE theme. Vim and Emacs themes are my own.
The Fluxbox style is mydefcon_4 from tenr.de which is probably the largest and most thorough set of themes created by one person that I've witnessed. That fellow is motivated.
For all the bells and whistles of KDE4, what features did I actually use regularly?
- A menu of apps
- Taskbar + System tray + Clock
- KWin's good window management.
- Global keyboard shortcuts galore
- One widget: current CPU/RAM/Network usage
- Mouse/keyboard management, background-setting, etc.
Fluxbox gives me all but number 5, and Conky gives me that. Number 6 you can do with xset and feh and such.
And I like being motivated to use keyboard shortcuts for more things. I'm already halfway there. Maybe I can take the plunge eventually and try a tiling window manager. Not sure I've reached that level of nerditude yet though.
And now I can move and resize windows without my graphics card bursting into flames. Maybe when I can afford a few more cores worth of CPU I'll try KDE4 again. Honestly I think I have too much monitor real-estate for my ancient computer to handle smoothly in KDE4.
Not to knock KDE4; it's awesome and I'll probably go back someday. But everyone needs a break now and then.
