Tag Archive: linux

Fix transient X pointer issues with Ctrl-Alt-FKey

I run Xfce 4.8, and I occasionally get problems with the pointer:

  • Stops responding to input
  • Motion ‘sticks’ (even if it’s stuck on the physical level, I’ve done this by using the touchpad with wet fingers)

A quick way to reset input to the pointer is to change to another tty and then back again. The graphical session is in tty7 by default:

Ctrl-Alt-F6 Ctrl-Alt-F7

$(()) vs. `expr`

Just a quick note on the relative speed of $(()) vs. expr as a means of evaluating arithmetic expressions in bash: even though they’re (apparently) functionally equivalent, this:

for i in {1..10}; do n=expr $i + 10; echo $n; done

Takes about a full second to run (I can see it print the lines one at a time), whereas this:

for i in {1..10}; do n=$(($i + 10)); echo $n; done

pops out all at once. Tested in GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu).