Play/pause music in Guayadeque through global keyboard shortcuts

I’ve tried a lot of music players on Linux, ranging from the desktop environment standards like Rhythmbox, Banshee and Amarok, to experimental ones like Tomahawk and Guayadeque. The latter has been my music player of choice for over a year now – its simple UI and small memory footprint works well for me.

One feature Guayadeque doesn’t seem to have is global keyboard shortcuts. Ctrl+Right/Left skips to the next/previous track, and Ctrl+Space plays/pauses the current track, but these shortcuts work only when the Guayadeque window has focus. Referring to this thread and this article, I went about writing a tiny shell script to play/pause music when Guayadeque is running, or launch Guayadeque and then perform the action. Here’s guayadeque_playpause.sh

dbus-send --type=method_call --dest=org.mpris.guayadeque /Player org.freedesktop.MediaPlayer.Pause
returnCode=$?
if [ $returnCode -ne 0 ];
then
  guayadeque &
  sleep 5
  dbus-send --type=method_call --dest=org.mpris.guayadeque /Player org.freedesktop.MediaPlayer.Pause
fi

I replaced MediaPlayer.Pause in the above script with MediaPlayer.Next and MediaPlayer.Prev in separate scripts to handle skipping to the next or previous track. I mapped the shortcut Ctrl+F10 to launch guayadeque_playpause.sh, to use at times when I just want music to start playing!

Downloads:
guayadeque_playpause.sh
guayadeque_prev.sh
guayadeque_next.sh

Issues with upgrade to Ubuntu 13.04 [Raring Ringtail]

April just flew by, and that means it’s time to play with the new Ubuntu 13.04. I’ve been using Ubuntu as my main operating system since 8.10, and as with every new version release and the subsequent upgrade process, I hope that the upgrade will be seamless and not require troubleshooting. Of course, something always manages to go awry, and I end up spending a few hours reviving my system after every upgrade. This one was no different.

I upgraded using the dist-upgrade feature of update-manager. It took a while to fetch the packages [*hat tip to BSNL], and installed them. On the next reboot, however, I was greeted by the cold, silent command prompt.

General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system

Great.

Given that my upgrade attempt was a day after the release, Google hadn’t yet caught up to the barrage of issues and AskUbuntu/UbuntuForums posts that follow every release. It took me a while to dig up the relevant information. What fixed it? Mounting the partition, and attempting to upgrade once again. Apparently, the upgrade process had not completed successfully.

mount /dev/sda1 /mnt
chroot /mnt
aptitude update
aptitude dist-upgrade

That wasn’t too bad. After logging in, I noticed that Unity did seem a lot lighter – The Dash started quickly [The initial delay of the Dash in processing search queries on the first launch was quite a bit in the 11.10 era. I had resorted to using Synapse as my Dash replacement] and the side menu generally stayed out of my way. So far, so good. I opened up Nautilus, and immediately wished I had the forensic “Crime zone. Do not cross” tape – At first glance, Nautilus looks beautiful and shiny, thanks to its new icon set and design, but it takes no more than a minute to realise that its sleekness is at the cost of functionality. What is with the bizarre obsession to dumb down software, to force everything to conform to the “simplistic and elegant, but barely functional” trend? I’m not a designer, nor do I claim to have an intuitive understanding of design, but that principle reminds me of the myth (?) of rib removal in the quest to be pretty. In the habit of hitting the backspace key to go to the previous directory? Too bad. Backspace does not work. The new key combinations are:

Alt + Left = Previous directory
Alt + Up = Parent directory

and there’s no way to change that. Used to hitting F3 to open up another pane within Nautilus to drag-drop files between two different locations? You’ll learn to open up a new window to do the same thing now. Also, the “Open with” menu item has been removed for directories. Forget about being able to add an entire directory to the VLC playlist directly, that’s wrong. File association is messed up, but it’s been the case for a while now.

Sigh. I dare-say Nautilus has jumped the gun, and it’s time to move to Nemo and/or Dolphin.

Talking of VLC, it had issues after the upgrade – it would not show video, instead playing just the audio track. Here’s the fix that resolved it:

VLC –> Tools –> Preferences [or Ctrl + P] –> Video
Uncheck “Accelerated Video Output (Overlay)” in the Display sub-section.

That’s not all – Occasionally, I would have no sound at all, in any app! “Sound settings” would show “Dummy output” as the only output in the input or output devices sections. It’s completely arbitrary – restarting would often fix the issue. I don’t seem to be the only one having this issue.

And that’s a wrap! Notwithstanding these minor hiccups in the transition to a new release, I do like the Ubuntu ecosystem, and don’t intend to move to another distro. This clearly is a maintenance release, with no new “media-bait” features or controversies [Amazon shopping lens, anyone?] and it’s surprising that the end-of-life is Jan 2014. Canonical is branching off into a lot of new ventures, and I believe there are interesting things to come from Ubuntu Phone and Android integration.

P.S: Am I the only one who’s not impressed by the version names? [Yup, some people can complain about ANYTHING]. The next release will be called Saucy Salamander. That is so…mainstream and so unlike the precedent established so far. You disappoint, Canonical!

Sri Lanka

[Disclaimer: This post is just my opinion and I don't intend to disparage Sri Lanka or its culture. If, however, you feel you must let out your rage over something in this post, feel free to insult me in the comments section, or you could just pass this off as the views of a 'smelly Indian', if that helps :P]

I’ve just returned from a two-week backpacking getaway in Sri Lanka, and it’s a fascinating country. Here’s the breakdown

Continue reading

Setting up a mail server: The n00b edition

One of the reasons why working at a startup excites me is the unpredictability of my future tasks. Case in point: I was recently asked to set up a mail server as a replacement for the Google Apps subscription currently in use. The requirements given to me specified that IMAP support and a web client are essential, as is the ability to send out emails not just to internal addresses, but also to other domains. After all, what good is a mail server if it can’t talk to the rest of the world? I decided to get started, but there was a tiny hold-up: I had no idea how to build a mail server! Continue reading

Basic ActionBar action item tutorial

As requested by a reader, here’s a simple tutorial explaining the use of menu items in an ActionBar. Menu items shown in the ActionBar are called “action items”, and they’re just as easy to use as menu items. This demo app shows an appropriate Toast when action items are selected.

To start with, make sure to set the minimum SDK version as 11 (Android 3.0 Honeycomb) or greater. ActionBar was introduced in Honeycomb, and will not work on platform versions below that without the help of the Android support library and/or ActionBarSherlock (Setting up ActionBarSherlock is covered here).

Continue reading

Shell script to attack a WPA/WPA2 network [Based on reaver and aircrack-ng]

I’ve spent the past few days playing around with the command line, and that is not something I do very often. It all began when I discovered this handy tool called Reaver which exploits vulnerabilities of the WPS standard. Naturally, I had to test it out on the numerous WPS-enabled wireless networks around me: I must say I have very, err, co-operative [and oblivious] neighbours!

I had previously tried in vain to learn to use the aircrack-ng suite of WiFi hacking. Since reaver is based on aircrack-ng, I had no choice but to give it another shot. This time, however, things made more sense, and I managed to use reaver successfully.

I made a small configurable shell script that will hopefully make the command line options seem a little less intimidating to the newcomer.

Continue reading

TaskMaster programming notice

As you might have noticed, TaskMaster hasn’t been updated for a while. For once, this is not because of my laziness. Sometime ago, my laptop died, and I lost all my data, including the Android certificate used to sign applications. Google Play does not allow the the certificate used for an app to be different from the certificate used for updates. This essentially forbids me from releasing updates to TaskMaster.

English translation: the present version is the final release of the app. I’m sorry! I’ve received several mails from users providing suggestions and improvements, but I can’t work on that. However, TaskMaster will continue to remain on Google Play.

I’m currently working on an “update” to this app (It can’t replace the existing version, as explained earlier, because of the certificate issue. It will be released as a separate app, probably as TaskMaster 2). It’ll include the functionality of Control Freak, as well as events (finally!) and other features! Stay tuned!

P.S: I’ve learnt my lesson. I keep backups of the certificate used to sign applications developed after the (literal) laptop crash.

No future updates!

As you might have noticed, Control Freak hasn’t been updated for a while. For once, this is not because of my laziness. Sometime ago, my laptop died, and I lost all my data, including the Android certificate used to sign applications. Google Play does not allow the the certificate used for an app to be different from the certificate used for updates. This essentially forbids me from releasing updates to Control Freak.

English translation: the present version is the final release of the app. I’m sorry! I’ve received several mails from users providing suggestions and improvements, but I can’t work on that. However, Control Freak will continue to remain on Google Play.

But there’s a tiny bit of hope: I’m currently working on an update to the TaskMaster app that would include the functionality of Control Freak in it. Stay tuned!

P.S: I’ve learnt my lesson. I keep backups of the certificate used to sign applications developed after the (literal) laptop crash.

No future updates!

As you might have noticed, QuickHTML hasn’t been updated for a while. For once, this is not because of my laziness. Sometime ago, my laptop died, and I lost all my data, including the Android certificate used to sign applications. Google Play does not allow the the certificate used for an app to be different from the certificate used for updates. This essentially forbids me from releasing updates to QuickHTML.

English translation: the present version is the final release of the app. I’m sorry! I’ve received several mails from users providing suggestions and improvements, but I can’t work on that. However, QuickHTML will continue to remain on Google Play.

P.S: I’ve learnt my lesson. I keep backups of the certificate used to sign applications developed after the (literal) laptop crash.