Automatic reboot after kernel panic

Yep, Linux can do that ! By default in most distribution this feature is disable. To enable it simply edit the /etc/sysctl.conf file and add the following lines:

kernel.panic = 1
kernel.panic_on_oops = 1

Now kernel panic and oops, will automatically trigger an hardware reboot. Don’t forget sysctl -p to take the new values into account immediately.

Optimize rdesktop connections

By default rdesktop try to give you the best image quality which is fine on a LAN but inappropriate in other case. But using some options you can change this behaviour:

  • -x disable theming
  • -m disable mouse motion events
  • -z to enable compression
  • -r soundff disable sound
  • -P enable bitmap caching

So now i use the following command:

rdesktop -u username -f -m -z -x m -P -r soundff -0 myip

Remove CTRL-M characters

One annoying thing with text file is that files created on DOS/Windows machines have different line endings than files created on Unix/Linux. DOS uses carriage return and line feed \r\n as a line ending which Unix uses just line feed \n. So in the end you finish with a lot of supernumerary CTRL-M characters. To get rid of it you can:

Use sed

sed -e "s/^M//" filename > newfilename

Use vi

Inside vi [in ESC mode] type: :%s/^M//g
To enter ^M, type CTRL-V, then CTRL-M (hold down the CTRL key then press V and M in succession).

Use dos2unix

dos2unix filename