Sunday, December 30, 2012

A4Tech KLS-5 Makeshift Interim Keyboard

So I built a new computer, and while I'm transferring stuff from the old one to the new one I'm running both at the same time. And I found that I only have one keyboard in the house (!).

Rather than get irritated swapping keyboard cables over all the time, I looked up what was the cheapest wired keyboard I could find, then went out and got an A4Tech KLS-5 wired USB keyboard for $9.

Size comparison to my old Logitech keyboard

It's small, and the build quality is...light, but for the price, I was actually pleasantly surprised. I hit keys and the characters appear on the screen. I couldn't ask for more.

There is only one problem (keep in mind, this is a $9 keyboard we're talking about), and that is the location of the \| key: it's right where Enter is on a normal keyboard. Every single carriage return I hit the \ key instead.

But for a short-term "give me a keyboard so I can type" solution, I would heartily recommend...well, nothing. My cheap keyboard worked. Now you know.

Saturday, December 29, 2012

Remove annoying "WD SmartWare" automount

If you've got a WD USB hard drive plugged in, it will probably automount both the "content" part and the annoying "WD SmartWare" part.

The SmartWare is WD's attempt to help people out with some backup and other data management software. It cops a fair bit of flack from what I can see. I never used it, so can't comment, but I'm pretty sure it's all Windows-based anyway. On Linux it makes no sense to have it appear all the time.

To get rid of the automount, edit /etc/fstab (requires sudo) and add the following line:

LABEL=WD\x20SmartWare none udf rw,noauto 0 0

This solution was one of many possible solutions I found, but it worked and was easy. Thanks saltydog.

Update: While initially I thought the above solution worked, it stopped working at some point, because the "WD SmartWare" has now reappeared on my desktop. So I'm open to any other solutions...

Saturday, December 15, 2012

Crowdsourcing FTW

Awesome example of a crowd-sourced investigation and solution:

http://forums.whirlpool.net.au/forum-replies.cfm?t=2025126.

Sunday, November 4, 2012

Wacom Intuos 5 Rotation

To rotate the Intuos 5 for sinister left-handed people:

$ xsetwacom set "Wacom Intuos5 M Pen stylus" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen eraser" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen cursor" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen pad" Rotate half

To get these commands to run at startup, I added them to $HOME/.profile (after trying .bashrc and .Xsession, neither of which worked [running Xubuntu]).

Adapted from notes at linuxwacom sourceforge site.

Dual-screen Setup

(Updated 24 Feb 2013)

After getting an nVidia GPU, I had much more luck getting dual-monitors to work than with either AMD or Intel graphics. By default though the tablet will span across all monitors. If you want to reduce this to a single monitor, do this:

$ xsetwacom set "Wacom Intuos5 M Pen stylus" MapToOutput HEAD-0

Note: if you're not using nVidia drivers, the output of xrandr will give you the names of your screens, rather than HEAD-0, HEAD-1, etc. as shown above.

Sunday, June 10, 2012

Lock Screen Command in Gnome/Cinnamon

The correct lock screen command in Gnome (and hence Cinnamon) is:
gnome-screensaver-command --lock
This is useful in the context of remapping keyboard shortcuts. For some reason, lots of internet searches come up with the equivalent X-based command for locking the screen.

Mapping Keyboard Shortcuts in Cinnamon

Using gconf-editor, follow instructions at http://www.maphew.com/Linux/Use_WinKey_in_Ubuntu.html.

The example is to map Super+E (or Windows+E) to start nautilus, like Windows opens Windows Explorer. The important steps (in gconf-editor) are:
  1. Go to /Apps/metacity/global_keybidings
  2. Set run_command_1 to <Super>E
  3. Go to /Apps/metacity/keybinding_commands
  4. Set command_1 to /usr/bin/nautilus

Installing Canon-MF4140 Drivers on Mint 64-bit

I'd installed drivers for my Canon MF4140 on Linux Mint 11 (32-bit) with a bit of fluffing around. For the 64-bit Linux Mint 13, more fluffing around was required, but of a different sort.

To start with, the drivers from Canon don't have .deb files for 64-bit, so you need to install alien and convert the .rpm files to .deb.
sudo apt-get install alien
sudo alien -k --scripts cndrvcups-common-2.40-2.x86_64.rpm
sudo alien -k --scripts cndrvcups-ufr2-uk-2.40-2.x86_64.rpm
This creates two .deb files, which can be installed with dpkg -i <filename>.rpm. This all worked fine, the printer was detected and added, but nothing would print.

Following this thread, I ended up getting it working, but I did a number of steps suggested, so I'm not sure which ones were necessary.

Overall:
  1. Copy the files as suggested here from /usr/lib64 to /usr/lib. Some of the files might already exist.
  2. Install some more "silent dependencies" as described here: sudo apt-get install libc6-i386 ia32-libs lib32z1. This adds 150Mb or so of dependencies -- quite a lot. Not sure if they were actually needed...
  3. In the end, because this was Mint 13, the important files to copy from /usr/lib64 to /usr/lib were libcanonc3pl.so and libcanonc3pl.so.1. This was the step that got things working, so I'm not sure if steps 1 and 2 were actually necessary. My printer is working, I'm not touching these files again.

Running Diablo II under wine in Linux Mint Cinnamon

Disabling or re-mapping Alt+Click
If you're playing Diablo II in wine, the default Alt+Click mapping in Cinnamon (which moves the underlying window) is kind of annoying. Since the desktop environment is based on Gnome (I guess), you can use the gconf-editor tool to edit the mappings.

Under Mint 13, the configuration editor isn't installed by default, so you might have to do this:
    sudo apt-get install gconf-editor
    gconf-editor
Then navigate to apps/metacity/general and edit the mouse_button_modifier key to something else (I used "Control" which seems to be fine).

Getting "pick up items with Alt held down" to work
Holding down Alt highlights items. If you can't pick up items with Alt held down, you may need to disable the window manager control of the wine window.

To do this, run winecfg, go to Graphics tab, and uncheck the "Allow the window manager to control the windows" option.

Alt+Click for item pick up now works. The downside is that the window won't appear in the taskbar any more, and when you minimise it you get a little icon in the bottom left-hand corner. But it works.

Note: While initially I did this and it seemed to helped, it might also cause keyboard interaction to stop working. I was playing around with the "Window focus mode" in Cinnamon -> Window Settings at the same time, so at the moment I've turned the window manager control back on in winecfg and it's okay.