Posts tagged ‘linux’
Mobile broadband for linux
It appears that new mobile internet dongles aren’t very well supported in linux.
I had problems get the new vodafone dongle to work (ZTE K3570-Z – I bought this in January 2010, this was with quite a lot of work).
3 were the only provider who I could be sure provided a dongle that worked with linux (ZTE MF112 avaiable as of april 2011).
This worked out of the box with Lucid, with the following caveats:
i. The dongle occasionally sent out stronger signals causing my monitor to flicker. (This was very occasional every hour or so, and on a laptop)
ii. The dongle becomes quite hot (more noticeable so that with the windows only vodafone dongle).
iii. I think the connector on the dongle is slightly flimsy. I managed to break this by leaving my laptop on things. Though I was by no means being careful. I would advise using the connector provided.
Debugging Wifi on Ubuntu Linux
To actually get ubuntu to give you some logging when connecting to wifi (you know so that you can act according to some information rather than at random):
- Become superuser
- Run killall NetworkManager
- Run NetworkManager –no-daemon
This will then give you output for every stage of the connection process.
Network manager is (I believe) the tool that handles the overall process of opening a wifi connection using different processes (iwlist, iwconfig, wpa_supplicant etc) to do the actual connection.
Notes
Messages of the form “supplication connection state change number -> number” are (i think) from wpa_supplicant. Someone who isn’t me should change NetworkManager so that these are written in english. For now note that the states mean the following:
0 – WPA is disconnected
1 – WPA is inactive (no enabled connections and wpa isn’t trying to connect
2 – WPA is scanning
3 – WPA is associating (a loose-form of connection)
4 – WPA is associated
5 – WPA 4-way hand shake
6 – WPA group handshake
7 – WPA completed
I was seeing a lot of 3 -> 0 state changes when I was debugging. [This was taken from the wpa_supplicant source code in src/common/defs.h]
Backing up one’s home directory with tar
This is something that should be fairly easy. However in practice there are some problems:
- Tar has a proliferation of options and can be an effort to use – at least if you are using it infrequently
- One’s home directory often contains large files (like perfectly legally downloaded music and videos), which you don’t really want to back up repeatedly.
- Some applications put rather large things in hidden directories under your home directory
There are various solutions:
(more…)
How to stop the bell ringing in bash
To stop bash from trying to ring the bell add
set bell-style none
to the /etc/inputrc file. You can also be added to a local ~/.inputrc file – but this won’t work if
you log in as root.
Also, note that this won’t stop other applications from trying to ring the
bell – for this it might be best to switch off the bell at BIOS level.
See man bash.
Other applications whose bells you might like to stop:
less: Use the -q option. This can be acheived permanently by adding alias less=”less -q” to your .bashrc file.
man: man uses the $PAGER environment variable to display man pages, or the default pager (normally less) otherwise. Therefore add export PAGER=”less -q” to your .bashrc file.
vim: By default vim rings the bell. To stop this type set vb t_vb= at the colon-line, or add it to your .vimrc file.
emacs: Set the variable ring-bell-function to a function that doesn’t do anything. (setq ring-bell-function (lambda () nil)
How to not break your hands when using key combinations (using *nix)
I find that trying to use both hands when entering key combinations feels slightly less inclined to cause injury than using the same hand. For example, instead of pressing control-C with only your left hand, you hold the control button with your right hand and press C with your left hand. This approach seems to limit the degree to which you need to contort your fingers. (However, I have no experience with RSI, so perhaps you shouldn’t believe what I say)
Learning to use these new fingerings takes a little mental reprogramming.
If you are going to try to be religious about this, one problem that you will face is that a keyboard only has one alt key: the alt key on the right hand side of the keyboard normally being used to insert non-ascii characters. By rebinding this alt key to have a slightly more mundane meaning you can save yourself some contortion.
This rebinding can temporarily be done using the following shell commands.
xmodmap -e "keycode 113 = Alt_L" # Make the left hand alt key (key 113) behave like a left handed alt. xmodmap -e "clear mod5" #Stop any key (and particular key 113) from being used to insert non-latin characters.
To make this permament one needs to modify the .xmodmap file in one’s home directory – or create it – should it not exist. .xmodmap will be executed by xmodmap when X starts.
<pre>
keycode 113 = Alt_L
clear mod5
</pre>
Notes
See “man xmodmap”.
If you love for your native language exceeds your loathing for hand contortion, you could try rebinding a different key to act as ‘mod5’. I might recommend using the windows (super) or context menu keys for this.
You should be able to do this with the ‘add’ command – though not that this takes keysyms rather than keycodes as arguments. (This will, hopefully, make sense after consulting the manual).
On windows one can use the freeware program Sharpkeys to carry out this change. This works by setting changing a registry key.