Installing Kindle on debian testing under wine

finally managed to get this working. I think things are complicated when target machine is 64 bit. I really was keen to get this running on my netbook, and Acer Aspire One.

The steps are a bit scrappy and gleaned from various blogs, but, basically what I did was:

Follow the steps in this blog to get wine installed on Debian Testing. i.e. (as root):

ARCH=`uname -m | sed -e s/x86_64/amd64/ -e s/i.86/i386/`
wget -r -A "*_$ARCH.deb" http://dev.carbon-project.org/debian/wine-unstable/
sudo dpkg -i dev.carbon-project.org/debian/wine-unstable/*.deb

then hop over to this blog, and follow most of the steps in that. Don’t need to install wine as we’ve already got that now, in theory, but cabextract definitely handy.

actually, thinking about it, the only steps I ended up using were these:

wget http://www.kegel.com/wine/winetricks
sh winetricks corefonts

I was getting closer all the time but still it crashed. Until I found this tip on the wineHQ website:

To work around the msvcp90 bugs, delete or rename ­this file:

~/.wine/drive_c/windows/winsxs/manifests/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_deadbeef.manifest

Note that Wine will recreate that file every time you upgrade. To avoid this, make the directory read-only.

and now it works.

Gnome 3

Ok, so you’re typing, and want to use <tab> to help you on your journey. You want to do an ‘ls’ on certain files. You’re not sure what they are. You do ‘ls -l da’ then you hit TAB, because you want to see what’s there. It’s 2 TAB hits to get the autocomplete, but what’s this, on the FIRST tab hit, there’s a DING! Well thanks Gnome3. What the hell is that for. In what way, is you giving me an ALERT on hitting tab, in any way, useful to me?

Installing Debian on an Acer Aspire One 753

This is pretty straightforward with a couple of quirks. Installing stable (squeeze) using the wifi was possible but I had to temporarily configure my router to use WEP (instead of WPA2/PSK) before I could get a connection.

Network cards recognised during install
Network options during install

Then after installation, the wifi had disappeared. I could’ve investigated, and this post certainly suggests that it is fixable, but installing stable had been an accident. Since I had a clean install, there wasn’t anything to lose. I went back to Old Kent Road, and threw the dice again. The current testing release is wheezy, so I decided to give that a blast.

The wifi options were slightly different this time. I was offered WPA2 and even though I had to manually enter the SSID of the router, network connectivity was a breeze.

Installing Debian Wheezy - WPA2 wifi ok
Debian Wheezy Install

I’d read that it was possible to configure the IP address manually by selecting expert install so I chose that route and got a verbose and interesting journey through the install, which was, on the whole, a piece of cake.

Eject CD, reboot, and hello Gnome 3. Well we can deal with you later. But first, the network. Where’s my wifi gone? I’d used it to install, and now it was gone.

I might have given up around now. I toyed with the settings suggested here without much enthusiasm, and thought that LMDE had been working fine, I could just go back. Why make life hard for myself?

And it was a close thing. I knew it was almost certainly possible to get the wifi working again – it was just how much tinkering under the hood was required. It turned out just to be a loose wire, and the fix was really easy. The only difference I found between my system and the instructions in raghu’s blog, is that the config file is actually:

/etc/NetworkManager/NetworkManager.conf

and not /etc/NetworkManager/nm-system-settings.conf.

So what worked for me was to edit /etc/NetworkManager/NetworkManager.conf, change:

[ifupdown]
managed=false

to

[ifupdown]
managed=true

then restart the network manager. i.e.

/etc/init.d/network-manager restart

(or reboot).

And Bob’s your father’s brother.

so thanks for your blog raghu … if I hadn’t stumbled upon it I’d be back on LMDE.

As it happens, the IP address was allocated using DHCP and I had to configure it manually again, so there was no advantage to using the ‘expert install’ option.

Full Circle

It feels like I’ve gone full circle. I started, some time ago, with slackware, installed from a couple of floppies. Then Redhat, Suse, Mandrake and Ubuntu. I’m sure there were others. But in and out of the distros there was always debian. I like Ubuntu but then after one particular upgrade I discovered that, overnight, the desktop had morphed into something gruesome. I could’ve tinkered and regressed. Instead I moved to Linux Mint. Then to Linux Mint Debian. And the LMDE chair was very comfy.

But recently I wanted to install Linux on a couple of clapped out old headless servers. They don’t have USB ports, at least, not bootable ones. They have floppy drives, and space-age CDROM drives. But LMDE is only available on DVDs. I’m sure there are ways of getting LMDE on a CDROM and doing a network install but I really can’t be arsed finding out. Why bother when I can just install debian?

So I installed Debian, and saw that it was good. Really easy. Then I installed it on another Clapped out PC, and that was easy too. Then I installed it on a laptop, and that wasn’t quite so easy. But still easy enough to be worth the effort. It is suggesting I use some abomination that calls itself Gnome 3 but I found it just as happy to use Xfce4 instead. It’s now being installed on an Acer Aspire One 753, and that is not without its problems. But not big problems. And I’ll have debian. It’s like putting on a big comfy pair of slippers.

Overlaying exif tags onto viewed image

Being blessed with a pretty rubbish memory I’ve become a big fan of Spaced Repetition Systems over the years. I’ve tried several but have settled down with the reassuringly simple mnemosyne program. mnemosyne has been out for a long time and the currently stable release is 1.2 although there is now a beta version 2.x.

I use images a lot in my mnemosyne deck especially for learning plants and trees. One of the problems I have is that mnemosyne doesn’t allow full screen viewing of the images or zooming in and out, although I think that is addressed in the new beta. Furthermore, the 1.x release doesn’t really support the idea of cramming, or ad-hoc testing, so if I, for example, want to have a browse through all my tree winter ident photos it’s not particularly straightforward.

Most of my photos are pretty well tagged and are currently enjoying a somewhat haphazard journey from f-spot to shotwell, but on the whole they are tagged, with the meta data physically written to the files themselves. For some time I’ve been musing over a quick and easy way of browsing my images based on simple search criteria but with limited success. Often I rename images which has the benefit of making them rapidly findable using the linux locate command but this is not without its problems.

Ideally what I was after was a way of browsing images full-screen with the ability to zoom in and out, skipping forward randomly or sequentially, and, importantly, when I wanted to, easily viewing the exif tags written to the image.

I’m pretty much there, thanks to a shy little program called qiv. I don’t know where qiv has been all my life but it’s pretty much everything I like about a utility. Lean, mean and does what it does well. Using a bit of scripting and linking I get the images I’m interested together and chuck them somewhere, such as /jlinks/imagebatch1. Then I invoke qiv with something like:

qiv --autorotate --maxpect --fullscreen --delay=10 --random --no_statusbar --file /tmp/flist

where /tmp/flist contains the list of files I want to browse through.

This works pretty well. But there are problems.

If I want to see some information about the image I’m viewing, such as its filename, I can press ‘i’. This displays the status bar and if you happen to be using meaningful filenames as I usually do this can be sufficient to find out the name of the plant, bird, whatever, you’re looking at. The problem is that the text in the status line is too small for me. I can read it but it’s a bit of an effort. I searched for a solution to this, assuming that it would be possible to change the text size. If it is I guess it needs a bit of programming as it’s not readily obvious if it’s possible to reconfigure it in any other way.

What I wanted really was a way to superimpose the filename onto the image itself, in nice big letters. As is often the way I spent a lot of hours looking for a solution that was staring me in the face.

qiv allows you to call an external command based on certain keypresses. It took me a while to realise that, far from being quite complicated, it was simply a matter of taking the sample qiv-command script that is shipped with qiv, chucking it into my search path, and then hacking it to bits.

I’m still experimenting and for the moments I have a few options in my qiv-command file that display the information I’m interested in. Most of the time I am interested in the exif keyword tags embedded in the image as they reliably tell me what it is I’m looking at. They are retrieved in no particular order but that doesn’t matter – it does the job. I also found another utility called gnome-osd-client was pretty handy for overlaying the text I wanted.

Here, for example, is the section of my qiv-command file for what happens if there is a keypress of 0.

0)
 title=$(exiftool -t -title "${filename}")
 where=$(exiftool -t -Country -State -City -Location "${filename}")
 rating=$(exiftool -T -Rating "${filename}")
 tags=$(exiftool -t -Subject "${filename}")
 gnome-osd-client "${title} ""${tags}"" (Rating=${rating}) ${where}"
 ;;

This uses exiftool to get the information I’m interested in, then gnome-osd-client to display it. gnome-osd-client isn’t actually necessary, and other options I have are

 2)
  exiftool -t -title -Subject -Country -State -City -Location -model -Rating "$filename"

and even the brief (producing verbose)

 3)
  exiftool "${filename}"
  ;;

One curiosity I discovered during all this is that the -T switch on exiftool seems to cause consternation with gnome-osd-client. Unfortunately I was using this a lot earlier on and assumed that it was something I was doing wrong, whereas it just seems to be a quirky clash between the two utilities. If you use -T anywhere with exiftool in the gnome-osd-client command you will get an error. e.g.

 4)
  gnome-osd-client "$(exiftool -T -title -Subject -Country -State -City -Location -model -Rating "${filename}")"
  ;;

will fail.

Of course, this doesn’t give you any of the spaced repetition logic that you’d get from using a system such as mnemosyne, and perhaps with mnemosyne 2.x this sort of facility might be buiilt in anyway. However it’s quite nice to just specify a search keyword and get a slab of browsable images on the screen.

bells and whistles

I mean, for God’s sake, why? Why would I want a ding? What purpose is it serving apart from getting on my nerves? Ok, so a ding might be handy to let you know it’s time to type something. But you don’t need it, and might, just might, want an easy, elegant, solution to switching the damn thing off. Linux Mint has surpassed even Microsoft Windows in providing a pompous, pointless, unwanted, not-easily-switchoffable, ding.

The problem is neatly summarised on this forum post. Simple question, that you’d thing would have a simple answer. Well, the answer is simple, but not elegant. I found it on a website showing tips and tricks for post-mint customization. I didn’t follow the instructions exactly, as I didn’t want to change the sound. I wanted to remove it. Here’s what I did:

Press Alt+F2 to bring up “Run Application” window.
typed gksu nautilus /usr/share/sounds/LinuxMint/stereo into the box.
Rename the original file desktop-login.ogg to destop-login-youcanthurtmeagain.ogg

and that seemed to do the trick. I thought I might need to create a blank empty sound file containing NOTHING, but Mint didn’t appear to complain when it found nothing annoying to play before asking me to login. It doesn’t feel a very elegant solution, but it works.

Grub2 – multiple OS – menu display

I guess it’s progress. There was a time when I used to have machines configured so that, if on boot, I held the shift-key down, I got a menu for multiple boot choices on a dual-boot PC.

So let’s just spell that out.

On a dual boot PC, what I want to do is be able to access the grub menu on boot, if I feel like it. And if I don’t, I just want it to silently boot the default OS.

9 times out of 10 I want my PC to just boot up the default OS without questions. And if I want to interrupt the boot and get the grub menu, I want to be able to do that. It’s not much to ask.

That’s it. That’s all I want. Used to be able to do it. Now I can’t. I’ve just spent a couple of “surely I’m missing something really obvious” hours looking for the tweak, the variable, the switch to do this. And I don’t think you can. Can you?

I have had the hilarious pleasure of setting

GRUB_TIMEOUT=0

in /etc/default/grub. Certainly not one of my better ideas, but nice to know I’m not the only one. I needed a visit to unetbootin to create a bootable usb drive to fix things. Even that was a bit inelegant, involving as it did directly editing /boot/grub/grub.cfg on the root partition, then rebooting, then ‘doing it properly’ by editing /etc/default/grub and running update-grub.

So all I want is to have the machine quietly booting into Windows7 by default, and if I choose otherwise, allow me to interrupt the boot and get the grub menu. I use to do this in LILO, and I’m sure it used to be possible in GRUB. Now I’m not so sure.

I’ve even tried step 11 of the GRUB2 tweaks, and that did something. It hid the menu altogether. Not what I’m after. And I’m wary of hacking config files too much, secure in the knowledge that they have a habit of getting unhacked on upgrades.

So I’ll give up on this one.

 

Wireless not enabled automatically on Acer Aspire One

The first problem, or niggle really, is the wireless. When I boot the netbook wireless is not enabled automatically. It’s a simple matter to right-click the network manager applet and select Enable Wireless, then everything seems fine. Just annoying.

So of the the University of Google to find who else shares my pain. Before long I discover that this might be an Acer thing (none of my other PCs have this problem). Like many problems there’s often lots written and complex solutions. I don’t want complicated solutions, I just want the loose-wire solution. Press a button and it’s all lovely.

Sure enough, a post on the Linux Mint forums described exactly what I’m experiencing. There’s another forum post that describes one fix, but I ended up following the hints described in this thread.

Sometimes I like to understand what’s going on under the bonnet, sometimes I try and understand what’s going on, and sometimes I just copy and paste. Like so …

dougie@barra ~ $ rfkill list all
0: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
dougie@barra ~ $

and …

dougie@barra ~ $ sudo rmmod -f acer-wmi
dougie@barra ~ $ sudo rfkill unblock all
dougie@barra ~ $ rfkill list all
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
dougie@barra ~ $

As soon as I ran the rmmod line the wireless suddenly sprang into life.

The next trick is to get this to happen automatically on boot, which is pretty straightforwards. Just add the lines to the end of /etc/rc.local as explained in post 12 of this thread.