Category Archives: Operating Systems

Play&Pause a XBMC remote app

I have a XBMC HTPC in my dorm room acting as my sound system. One annoyance I had in the past was a lack of proper remote control. At first I used a cheap Android Tablet bought from china but the incredibly short battery life on it made it impractical.

After dealing with those half-solutions I decided to create my own. Programmed in C++ Qt it can run on just about any platform but I targeted it for my meamo n900 and the meego emulator. It primraly works with the music player and features skip, play/pause, and volume control. The download: PlayAndPauseXBMC_2011-03-28.zip The zip contains the source, and binary builds for x86 and Maemo. Both my laptop and phone have the remote running 24/7 and I’m quite enjoying the convenience.

Transitioning to Linux on Thinkpad T510

I’ve been running various Linux distros on my non-primary computers for ages. Last month I tried transitioning to openSUSE on my primary laptop. In the end I returned to MS W7 because of trivial annoyances with KDE. Fast forward to Christmas and I managed to get myself compromised by a script kiddie. Since I was going to reformat anyway I decided to make the transition full time to Linux. So I bought a new HDD and put ubuntu on it.

This wasn’t the easiest install I’ve done but it was far the worst.

The open source nvidia drivers were unusable due to a nasty bug with screen brightness. The proprietary drivers faired marginally better but required editing xorg.conf to enable managing the screen brightness.

Battery life has been reduced, haven’t actually measured it but I definitely need to plug it in more often.

Perhaps the worst part is that my university appears to be doing something odd with apt-get repositories which causes hash mismatches on the four primary ubuntu repositories. I had to update two of my computers using my cell phone connection.

Of course it wouldn’t be fair if I didn’t list the many positives I’ve ran into. Like no BS when switching to Japanese. Windows is really bad about this, if you don’t have “Professional”,”Ultimate” or server editions of windows you’ll have to resort to hacks to alter the localization. Gnome has a simple GUI to change localization within three clicks and a log out. The coverage of the translation is also superior.

Then there is the use of repositories, really not much to say here that wouldn’t be preaching to the choir.

Now if only school was going so smoothly, I’m exhausted from 7am mornings which wouldn’t be so bad if everyone else in dorm would go to bed on time. This plus the script kiddie has consumed the effort I was planning to put into foomatic. I’m now coming down with a cold as if I wasn’t unproductive enough.

Loging the #openprinting irc channel

The IRC channel is nice in theory for team wide casual communication. Unfortunately you need critical mass for it to do this task well. Often #openprinting will only have me and Till in it. Occasionally others will be present and only very occasionally will conversation occur. Since I’m new to the project I want to intercept as much inter-team communication as possible. Thus I’ve setup my home server with the irc client Irssi which logs all communication, then a perl script to clean the log and FTP it to my site. Finally one line of php to print it out on it’s own page.

Truthfully I wrote it up on a whime, but I do look forward to not missing out on chats.

Reusable code in DB.pm for import/export to/from DB

After asking Till some guestions I’ve figured out what’s left to write.

DB.pm already has:
Perl -> XML
SQL -> Perl (For printers and drivers)
XML -> Perl (For printers and drivers)

That only leaves me to write:
Perl -> SQL
SQL -> Perl (For options)
XML -> Perl (For options)

Functionality wise a good majority of hte code is already there. I also already have a function for create the tables from schema. After this I need to create a function to import a single XML and then a second function which calls the first function on all the XMLs.

Foomatic SQLite Progress as of November 22nd

As of today, November 22nd, Foomatic can operate from a sqlite DB. On the Foomatic side this required only two lines of code.

my $dbfile = "$libdir/db/openprinting.db";
$this->{'dbh'} = DBI->connect("dbi:SQLite:dbname=$dbfile","","");

Foomatic will only use SQLite if there is not a mySQL credentials file yet is a SQLite DB. To make my SQLite copy of the DB I exported it from mySQL. The mySQL db was created using a php script written for openprint.org. Since XML -> mySQL -> SQLite is a most impractical build process my next task is to write what ever is needed to go XML -> SQLite.

When I was first consulting Till about what I needed to do there was the general assumption that I would be expending DB.pm with this importation functionality. Yet when I sat down to plan my approach I designed an external script. When I mentioned this to Till he reiterated about including everything in DB.pm. A bit of a facepalm moment since his point is so logical. DB.pm already has quite a bit of the functionality I need. So far I have only taken a cursory glance at what DB.pm has to offer. I know that there is functions in there I can use but I will have to take pen and paper and figure out what exactly I’ll use and what I need to write.