Get your CTRL+ALT+Fx keyboard shortcuts back in Ubuntu 11.10

I’m now using Ubuntu on my work desktop (nice change). My favourite IDE, IntelliJ Idea has a very useful shortcut CTRL+ALT+F7 to Show Usages of anything under the cursor. Its one of the most simple yet powerful features of the app. The unfortunate problem is that X11 uses CTRL+ALT+F<1..6> to switch between consoles and CTRL+ALT+F<7..9> to switch between desktops and it wins, so IntelliJ doesn’t respond to that useful shortcut anymore.

Tucked away in the Keyboard Layout control panel is an Options… button which brings up an options dialog with various options to configure your keyboard strokes – different to the normal Keyboard bindings you find in the normal Keyboard settings. These are more how you want the keys to be mapped rather than mapping them to functions. Under Miscellaneous compatibility options you’ll find ‘Special keys (Ctrl+Alt+<key>) handled in a server‘ and ticking this gives your shortcuts back to the desktop apps.

Most *nix software wouldn’t assign shortcuts to the ctrl+alt+f<n> because its an accepted convention, but for software that works on multiple OS’, its nice to take this back.

Multitail

Here is something that sounds neat… There’s nothing on earth like a genuine, bona fide, electified, six-log multitail, what’s i’d say? multi-tail.  What’s it called? multi-tail.  That’s right! Multitail! … multitail, multitail, multitail…

http://www.vanheusden.com/multitail/index.html

Basically it lets you tail multiple files in one console, all placed side by side

For linux, solaris and friends.

Shared Libraries on Linux

Fun = figuring out shared library deps on linux.  Not…

This useful article (Program Library-HOWTO) talks about how lib files are discovered and what you can do to force them to be found.

LD_LIBRARY_PATH which I’ve seen many times before, allows you to specify a library ahead of others so you can do

LD_LIBRARY_PATH=.:/my/better/lib.so:$LD_LIBRARY_PATH

If you want to see which libraries a process is using then do

ldd /path/to/your/process

There is still a magic to how those libraries then link off and refer to others but this is considerably more than I knew 24 hours ago 🙂

Multiline Bash

This is so simple, yet so easily forgotten

$ echo ‘this is a test of the emergency
> backslash multiline
> prompt system.
> When will it end, I dont know for sure
> how about if i close the string’

this is a test of the emergency
backslash multiline
prompt system.
When will it end, I dont know for sure
how about if i close the string

So in your sh scripts, can end each line with a sole backslash, for your command to wrap to the next line (and make your scripts easier to read).

Apparently, env variable PS2 will define what the > prompt appears as.

References: http://ubuntuforums.org/showthread.php?t=1062297

VMjunkie

Ok, so I think in a previous post I tolled the virtues of having a VM in my java ee subject to run unix.

I’m falling in love with the increased speed that a virtualised environment provides which I believe is due to more things being kept in memory at a time.

At work today, I used the VMWare virtualisation client to talk to a new virtual machine setup for regression testing and it really makes windows believe that it is talking to a real machine connected to a real monitor.  Which helps greatly because QuicktestPro needs a real machine to record errors.  To find this option, look in the menu’s of the console for an install windows drivers which will install the necessary components into your virtualised OS.

Anyhow, I found the following page which describes how to setup a virtual windows xp install on the VMWare player.  What an excellent way for trialling software and always keeping a fresh install around to compare performance against.  I suppose that these steps could be similiarly applied to linux installs too.
VMware Player with your own Windows XP Professional Virtual Machine

Debian, VMWare and a letterbox view

I am really growing on the idea of virtualised OS’s.  For a recent uni subject, we have to use a virtualised environment, and its great.  No bullshit configuration of the host system or servers.  Everything is ready to go out of the box.

Except that due to my monitors 1280×800 non standard resolution, I learnt that just editing XOrg.conf and providing a new resolution would not do the trick.

As described here: Configuring The Appliance Debian, you need to run vmware-tools-config, to tell vmware of your new resolution.  I don’t know where it pulls the lists of resolutions from, so I updated /etc/X11/XOrg.conf and /etc/X11/xf86config-4 to include the 1280×800 resolution (just in front of all the prelisted 1024×768 800×600 640×480 bits)

After a restart of X (CTRL+ALT+Backspace), the new login screen filled the entire window.  On logging into Gnome, the picture went back to letterbox. To configure Gnome, go to Desktop->Preferences->Screen Resolution.

There should be a lot more there now than there were before 😉

A great Linux reference

It’s a little dated but The CTDP Linux User’s Guide is an excellent linux reference, covering everything from Bash to X to user management, to heaps of stuff.

I like the layout because it reminds me of the reference guides we had at Melbourne Uni.  Simple and to the point.

Another great reference, which is also useful for Windows and Oracle also is the ss64.com site.  It is just a collection of manuals and other reference documentation useful to have around when you simply need to get to manuals.