MAC OS X, Linux, Windows and other IT Tips and Tricks

15 Apr 15 How to create a bootable USB stick on OS X

This article is based on the following How-to in Ubuntu site:

We would encourage Mac users to download Ubuntu Desktop Edition by burning a CD. But if you prefer to use a USB stick, please follow the instructions below.

Note: this procedure requires that you create an .img file from the .iso file you download. It will also change the filesystem that is on the USB stick to make it bootable, so backup all data before continuing.

Tip: Drag and drop a file from Finder to Terminal to ‘paste’ the full path without risking typing errors.

1 – Download Ubuntu Desktop
2 – Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight).
3 – Convert the .iso file to .img using the convert option of hdiutil e.g.,
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
Note: OS X tends to put the .dmg ending on the output file automatically.
4 – Run
diskutil list
to get the current list of devices.
5 – Insert your flash media in USB port.
6 – Run
diskutil list
again and determine the device node assigned to your flash media (e.g. /dev/disk2).
7 – Run
diskutil unmountDisk /dev/diskN
(replace N with the disk number from the last command; in the previous example, N would be 2).
8 – Execute
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
(replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
Using /dev/rdisk instead of /dev/disk may be faster
If you see the error dd: Invalid number ‘1m’, you are using GNU dd. Use the same command but replace bs=1m with bs=1M
If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the ‘Disk’ and unmount (don’t eject) the drive
9 – Run
diskutil eject /dev/diskN
and remove your flash media when the command completes.
10 – Restart your Mac and press alt/option key while the Mac is restarting to choose the USB stick.

05 May 14 Testing internet speed on Linux command line

This small script does a fairly good Upload/download speed test of your Internet connection:
Note: This is a Python script. So you’ll need first to make sure you have Python installed in your system.

Get the script:
wget -O speedtest-cli //

Make it runnable
chmod +x speedtest-cli

Run it

Have fun

03 Jan 10 German keyboard layout on MACBook

Settings in Regional & Language -> Keyboad Layout
setxkbmap -model macbook78 -layout de


setxkbmap -option altwin:swap_lalt_lwin,compose:rwin,ctrl:nocaps,grp_led:caps,apple:badmap,eurosign:e
setxkbmap -option apple:badmap

Function keys reversal:
apt-get install pommed
To inverse this behaviour, change
fnmode = 1  to  fnmode = 2
by editing /etc/pommed.conf

Also to do:
apt-get remove mouseemu

To enable the Trackpad’s following special functions:

Moving two fingers vertically IconsPage/arrow.png scrolling up/down
Moving two fingers horizontally IconsPage/arrow.png scrolling left/right
Two fingers on the pad + touchpad click IconsPage/arrow.png right click
Three fingers on the pad + touchpad click IconsPage/arrow.png middle click

Create the file:
and copy & paste the following content into it:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<match key="input.x11_driver" string="synaptics">
<merge key="input.x11_options.SendCoreEvents" type="string">true</merge>
<merge key="input.x11_options.Device" type="string">/dev/psaux</merge>
<merge key="input.x11_options.Protocol" type="string">auto-dev</merge>
<merge key="input.x11_options.SHMConfig" type="string">true</merge>
<merge key="input.x11_options.LeftEdge" type="string">10</merge>
<merge key="input.x11_options.RightEdge" type="string">1200</merge>
<merge key="input.x11_options.TopEdge" type="string">10</merge>
<merge key="input.x11_options.BottomEdge" type="string">370</merge>
<merge key="input.x11_options.FingerLow" type="string">10</merge>
<merge key="input.x11_options.FingerHigh" type="string">20</merge>
<merge key="input.x11_options.MaxTapTime" type="string">180</merge>
<merge key="input.x11_options.MaxTapMove" type="string">220</merge>
<merge key="input.x11_options.SingleTapTimeout" type="string">100</merge>
<merge key="input.x11_options.MaxDoubleTapTime" type="string">180</merge>
<merge key="input.x11_options.LockedDrags" type="string">off</merge>
<merge key="input.x11_options.MinSpeed" type="string">1.10</merge>
<merge key="input.x11_options.MaxSpeed" type="string">1.30</merge>
<merge key="input.x11_options.AccelFactor" type="string">0.08</merge>
<merge key="input.x11_options.TapButton1" type="string">1</merge>
<merge key="input.x11_options.TapButton2" type="string">3</merge>
<merge key="input.x11_options.TapButton3" type="string">2</merge>
<merge key="input.x11_options.RTCornerButton" type="string">0</merge>
<merge key="input.x11_options.RBCornerButton" type="string">0</merge>
<merge key="input.x11_options.LTCornerButton" type="string">0</merge>
<merge key="input.x11_options.LBCornerButton" type="string">0</merge>
<merge key="input.x11_options.VertScrollDelta" type="string">20</merge>
<merge key="input.x11_options.HorizScrollDelta" type="string">50</merge>
<merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
<merge key="input.x11_options.HorizEdgeScroll" type="string">0</merge>
<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge>

Reboot, and off you go…

EXTRA Configs:
If you want to change related settings, just add new lines which have the same format. For example:

Option          "HorizScrollDelta"      "10"

in xorg.conf would convert to

<merge key="input.x11_options.HorizScrollDelta" type="string">10</merge>
in the .fdi. file

(Essentially we’ve just “ported” the xorg.conf changes we know from previous Ubuntu versions to the new .fdi
file based HAL configuration of input devices. For more background information on this,
check out X/Config on this wiki)