Category Archives: Tech

Everything technology or science related; computers, coding, tech reviews, etc.

WLW reincarnated

So, I blogged today after an insanely long hiatus of 3 years. Yes, I have been otherwise occupied. And after posting using the WordPress editor, I was quite ok. Then, I thought about my next post and I wanted to reference an old one, without too much effort and googling, and I was back to missing Windows Live Writer. It was dead. Despite finding a link to the downloader on a website about blogging tools (supposedly from 5 days ago – really?!) – which refused to install on Windows 10. Annoying, and sloppy – you got my hopes up and dashed them.

But looking at the list, I half considered installing one of the apps listed – but then decided to check up on what was available in the open source world. And lo and behold, my eyes were drawn to the open live writer (OLW) result:

image

And, to add a cherry on the cake, OLW is open source and hopefully will be around for a long, long time to come.

PGP and revoked key

Been playing around with PGP again and stupidly imported my revocation key!

Thankfully, I had not uploaded that revocation to the key server, so using this tip I managed to “undo” the revocation.
http://superuser.com/questions/608336/un-revoke-pgp-key

And to preserve this knowledge from link rot I’ll paste it here:

—–
It turns out that it is possible (and relatively simple) to delete and re-import the key, provided that it is on a keyserver (and provided that the revocation has not been sent to the keyserver, of course).

This is what I found to work (THEKEYID is the short ID of the key):

Delete the public key as follows (the –expert option allows the public key to be deleted whilst the private key is kept) :
gpg –expert –delete-key THEKEYID

Confirm by pressing:
y

Fetch the public key again from a keyserver:
gpg –keyserver subkeys.pgp.net –recv-keys THEKEYID

Done!

Presumably this could also be done from a local (pre-revocation) backup of the public key, using gpg –import public.key instead of the third command.

Simply deleting the entire key (public and private) from the GPG Keychain Access GUI, and then restoring from a backup, did not work – I don’t know why.
—–

Alternately, you can just as easily use a previously sent copy of your public key (in case you have the file/mail) you can just import it after the deletion from file.

gpg –import

Just useful to have! 🙂

Rufus Rocks!

[rufus icon]Darn, I haven’t written about rufus yet! When I wanted to get Windows installed on to my PC, UNetbootin and others really didn’t cut it for me. Rufus saved my day. When I wanted to do full reinstall of Windows onto my old laptop, again Rufus saved the day.

Rufus is a nifty little utility, about 800kb in size, that takes your install cd image (ISO) and moves it over to USB, so you can install using that instead. While I haven’t used it to burn Linux ISOs, I can heartily recommend it.

[rufus screenshot]

Debian Jessie, annoyingly, does not come with UNetbootin in the main repository. So, here I am using Rufus to move stuff over to the USBs. A reasonably compromise and benefit of the dual boot system I have!

Experimenting with Workspaces

Screenshot from 2015-05-08 09:42:22

Linux has workspaces, yes. No big news, but then I got to wondering how I could use them. I recalled that when I used to work as a support professional, I used to have a two screen setup. One screen for the support tool we used and the second for all the work we did. So, that still got me wondering if I could be a bit more productive with with workspaces. After some searching, I found this page with a ton of responses. What it came down to was the following:

  • Workspaces are an excellent way to separate different piles of work and manage the pile of open apps on your desktop
  • To use workspaces you need to be able to separate your work into different piles
  • Common piles are, “Communications”, “Browsing”, “Work” – which could include writing a document or coding.

Loving Cinnamon and Debian 8

I hated Kubuntu. I realize that now, because where I used to hate the Kubuntu feel, I now absolutely adore Cinnamon’s desktop. It just looks awesome. The fonts are good. The look feels a lot more relaxed compared to what I had configured for Kubuntu.

Screenshot from 2015-05-08 09:29:03

The visual look and feel defined a large part of the experience of working on the desktop, which is why perhaps I felt so comfortable on Windows 7.

All that I’m missing now is a blogging client. I really should set myself to that task. I think it’d be learning experience.

Go get an SSD!

I got an SSD (Solid State Drive) for a laptop early last year. I noticed the overwhelming speed experience and became a fan. Today, after installing it on my own laptop, I noticed that in addition to the speed, the battery life’s now extended by a whopping 2 hours or more!

14148496589_055e8d18ac_z

Yes, you can buy a massive internal drive for the price of a 128 or 256 GB SSD. I think the time and energy savings of buying a smaller SSD are worth it, unless you’re doing massive video edits or dealing with larger files. In that case you might just want to splurge on a larger SSD.

If you’re in India, I can say that the SanDisk X21 is a steal. I’ve tried Samsung’s EVO and they’re awesome – but they’re consumer SSDs. The X21 is targeted at the OEM (Original Equipment Manufacturer) market, and low end server market. So you won’t get a fancy box, or the software to help transfer your current hard drive over, but you’ll get a great bargain for the price and something that’s going to last you a long while!

Debian Jessie on Dell Latitude 6220

I guess I should’ve read my own posts comparing Linux and Windows, before raving on about Windows last time. The updates on Win7 were a nightmare, with me having to boot and reboot every other hour for a day or two until the download floodgate was shut, almost. I don’t think I’m done. I see that sign next to “Shut Down” where I’m being warned of another upcoming update.

Debian 8That aside, I did want to get my Latitude E6220 on Linux. This time, I’ve chosen to go with Debian, and since I couldn’t choose, I went for both Cinnamon and Mate desktops. Mate gives me the creeps just from the look of the Menu. Cinnamon feels more comfy that way. Next step was to get the drivers all sorted. Frankly, that was a bit easier than getting it done on Windows! You could download the drivers from http://support.dell.com but it wasn’t a clean one-time thing.  I noticed two issues on Linux from the get go:

  • WLAN not working
  • Reboots left the computer hanging

Mercifully, the Ethernet worked right away on Linux – which it did not on Windows on first install. I had to download the Ethernet drivers from Dell’s support site via another PC. So Linux scores better here! A short bit of searching brought me to this resource on the reboot issue. I went into the nearest Latitude on that list and it did mention the reboot issue. The solution was simple:

To solve the reboot issue you’ve to pass the kernel reboot=pci. You can achieve this by adding reboot=pci to GRUB_CMDLINE_LINUX="" in /etc/default/grub.

And after updating that file, I ran update-grub and suffered my final hang.

The WLAN issue was a bit less straightforward. Reading through the WiFi wiki, I identified the adaptor as BCM43228. And I’d have saved myself some time if I’d just scrolled to the end of the PCI section. The wl section covered what I needed. Chased that with a now working reboot and ta da, laptop configured. Since Linux is friendly with Windows, grub handles my dual-boot and I seem to have no issues on that front. I guess I might have issues with the clock as I did previously, but thankfully I do have my old post to help me out.

Back on WLW, Windows & Office

Wow, never thought I’d make it back into the Microsoft world again, but here I am. Got myself a machine set up with Windows 7 and currently installing Office 2013 Home & Student. And I can say it is a relief, in some ways. In other ways, I still want  to ensure that I can dual boot this machine with a Linux distro. Smile

So, what’s changed? I guess, I got older and started thinking of rational decision making, at least on a personal level. That’s the gist of it. And there have been a lot of changes in the state of play in the IT arena.

Just to try my hand at storytelling, I do want to get into this a bit more, however, I’m working on my resume and time’s a-flying. Hopefully, by tomorrow evening I’ll have polished up my resume enough to do just that.

Signing off with a sigh of relief at being back on Live Writer.

Rockbox – audiobooks, podcasts and sorting

Since I moved to Rockbox, I’ve had two issues that have been bugging me:
1. Keeping my podcasts and audiobooks separate
2. Sorting my podcasts (reverse chronological order and separating the ones I’ve listened to already)

I finally got tired of ignoring the issue and decided to give it a serious shot today. And it goes on to prove to me that with sufficient motivation, you need not fear doing things you’re unfamiliar with. In this case it was editing some config files in Rockbox.

For those not interested in the story, but just the job, here’s the file:

#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file

# Tag Browser configuration file, do not edit as changes will be lost!
# Instead, you can modify “/.rockbox/tagnavi_custom.config” which will never
# get overwritten automatically.
# Basic format declarations
%format “fmt_podcast_album” “%s” album ? genre == “podcast”
%format “fmt_podcast_title” “%s %s – %02d:%02d” basename title Lm Ls %sort = “inverse” %strip = “15” ? genre == “podcast”
%format “fmt_podcast_alphanum_title” “%s – %02d:%02d (%s)” basename Lm Ls filename ? title == “” & genre == “podcast”
%format “fmt_podcast_alphanum_title” “%s – %02d:%02d” title Lm Ls & genre == “podcast”

%menu_start “podcasts” “Podcasts”
“New podcasts” -> album ? genre == “podcast” -> title = “fmt_podcast_title” ? playcount == “0” & genre == “podcast”
“Old podcasts” -> album ? genre == “podcast” -> title = “fmt_podcast_title” ? playcount != “0” & genre == “podcast”

%menu_start “main2” “Database”
“Artist” -> artist ? genre != “podcast” & genre != “audiobook” -> album -> title = “fmt_title” ? genre != “podcast”
“Album Artist” -> albumartist ? genre != “podcast” & genre != “audiobook” -> album -> title = “fmt_title” ? genre != “podcast”
“Album” -> album ? genre != “podcast” & genre != “audiobook” -> title = “fmt_title” ? genre != “podcast”
“Audiobooks” -> album ? genre == “audiobook” -> title = “fmt_title” ? genre == “audiobook”
“Podcasts” ==> “podcasts”
“Genre” -> genre -> artist -> album -> title = “fmt_title” ? genre != “podcast”
“Composer” -> composer -> album -> title = “fmt_title” ? genre != “podcast”
“Track” -> title = “fmt_alphanum_title” ? genre != “podcast”
“Year” -> year ? year > “0” -> artist -> album -> title = “fmt_title” ? genre != “podcast”
“User Rating” -> rating -> title = “fmt_title” ? genre != “podcast”
“Recently Added” -> album ? entryage < “4” & commitid > “0” -> title = “fmt_title” ? genre != “podcast”
“A to Z…” ==> “a2z”
“History…” ==> “runtime”
“Same as current…” ==> “same”
“Search…” ==> “search”
“Custom view…” ==> “custom”

# And finally set main menu as our root menu
%root_menu “main2”

To solve this issue I had to approach the problem from two ends:
1. The files – correct tagging (podcast/audiobook) and in the case of podcasts, I had to ensure that the podcast filename was just the date the podcast was produced.
2. Rockbox – making the menus and the filtering

The files were relatively easy in terms of tagging. For podcasts, I use gPodder. I upgraded to the latest version on the debian repository (in Testing) and changed the config settings in gPodder to set the synchronized filename as just the “sortdate” as gPodder puts it.

In Rockbox, I had to pore over this page: http://www.rockbox.org/wiki/DataBase, and then experiment with the things listed until I finally got to the desired result. My key challenge was to understand how filters worked in the menus!

For example, initially, I had added the podcast menu as follows:
%menu_start “podcasts” “Podcasts”
“New podcasts” -> album -> title = “fmt_podcast_title” ? playcount == “0” & genre == “podcast”

This resulted in me seeing all the albums on my player, not just the podcasts! So after poring over the Database wiki some more, I realized that I needed to add the conditional inside the menu!

“New podcasts” -> album? genre == “podcast”

Once I’d figured this out, the rest was a matter of tuning the gPodder output and figuring out what works!

Hope this helps.

Buttons and Stock Images in Python

Thanks to codecademy.com I’ve learnt the basics of Python, and now I’m trying to figure out pygtk. I looked up the tutorial on the pygtk website and even found a package python-gtk2-tutorial on the debian repository. Awesome. In Chapter 6 of the tutorial, there’s an exercise to add an image to a button. Now, the way the author does it is by using a pixmap, but gtk also has a ton of stock images, which you can use.

There is a catch – which is why this blog post’s here! In GTK, it appears that you cannot set a label and an image for a button at the same time, and have them both show by default. If you set the button as a stock.

button = gtk.Button(stock=gtk.STOCK_ADD) – for example, then you’ll see the text "Add".

To allow buttons to have both icons and labels, use the following bit of code before you type window.show()

settings = gtk.settings_get_default()
settings.props.gtk_button_images = True

However, you still can’t use a stock image with a custom label directly. So here’s the workaround:

 button = gtk.Button()
image = gtk.Image()
image.set_from_stock(gtk.STOCK_ADD,gtk.ICON_SIZE_BUTTON)
button.set_image(image)
button.set_label("button 1")
button.connect("clicked", self.callback, "button 1")
button.show()

(courtesy: https://stackoverflow.com/questions/2188659/stock-icons-not-shown-on-buttons)