Create iso from optical media

It is becoming increasingly rare, still from time to time I get a DVD or CDROM as installation media. To create an iso-image from optical media under Ubuntu, run:

readom dev=device -f file.iso
# e.g.:
readom dev=/dev/disk/by-label/your-media-label -f /place/to/store/the/image.iso

The program readom (read optical media) a is available from the package wodim

apt-get install wodim

readom serves for me better than dd as it has build-in error checking and shows progress out-of-the-box.

Test Mail Submission

Encode username and password

The snippet below shows how to send an e-mail from command to debug submission errors.

1
2
perl -e 'use MIME::Base64; print encode_base64(q"user");'
perl -e 'use MIME::Base64; print encode_base64(q"password");'

Connect and submit mail

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
openssl s_client -debug -starttls smtp -crlf -connect mail.ulm.org:587
ehlo dominik
auth login <user_mime_base64>
<password_mime_base64>
235 2.7.0 Authentication successful
mail from: <moritz@example.com>
250 2.1.0 Ok
rcpt to:  <max@example.net>
250 2.1.5 Ok
data
From: Moritz <moritz@example.com>
To: Max Muster <max@example.net>
Subject: Test
 
test
 
.

Instant network connection with wpa_supplicant

The snippet below shows how to make wpa_supplicant taking your ssid and passphrase directly from command line. This is very handy for instant connections, e.g. if your network manager was broken during upgrades or to obtain the driver for your network card.

  • Authenticate using WPA/WPA2 in foreground (better for debugging):
1
2
nohup wpa_passphrase <ssid> <passphrase> \
| wpa_supplicant -i wlan0 -c /dev/stdin 2>&1 &
  • Or authenticate using WPA/WPA2 in background:
1
2
wpa_passphrase <ssid> <passphrase> \
| wpa_supplicant -B -i wlan0 -c /dev/stdin
  • To inquire the name of the access point (ssid). The link has to be up (ip link set wlan0 up):
1
iwlist wlan0 scanning | egrep 'Cell |Frequency|ESSID'
  • To obtain an IP via DHCP:
1
dhclient wlan0

.DS_Store auf dem NAS

Die von Mac OS X Finder angelegten .DS_Store-Dateien sind für die meisten an meinem Linux-NAS angeschlossenen Geräte sinnlos. Nachfolgend zwei Schnipsel zum löschen der Dateien und ausschalten der Funktion im Finder.

1
2
3
# Rekursiv alle .DS_Store Dateien
# ausgehend vom aktuellen Verzeichnis löschen 
find . -type f -name ".DS_Store" -print0 | xargs -0 rm
1
2
# .DS_Store am Mac für Netzlaufwerke abschlaten
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Referenz

Chromium Browser Cache ausschalten

Da mein Linux-Desktop auf einem Flash-Memory läuft, möchte ich unnötige Schreiboperationen vermeiden. In Chromium habe ich hierfür keine direkte Einstellung gefunden. Das Cache-Verzeichnis lässt sich jedoch per Start-Parameter auf /dev/null schreiben

1
2
3
4
5
cp /usr/share/applications/chromium-browser.desktop \
~/.local/share/applications/
 
vi ~/.local/share/applications/chromium-browser.desktop
# Exec=chromium-browser --disk-cache-dir=/dev/null %U
Referenz:

Menüeintrag für Hibiscus Onlinebanking

1
2
3
4
5
6
7
8
9
10
echo -e "[Desktop Entry]\n"\
"Name=Hibiscus\n"\
"Comment=Hibiscus die freie Homebanking-Anwendung\n"\
"Exec=/opt/jameica/jameica.sh\n"\
"Terminal=false\n"\
"Encoding=UTF-8\n"\
"Type=Application\n"\
"Icon=/opt/jameica/jameica-icon.png\n"\
"Categories=Office,Finance\n"\
| sudo tee  /usr/share/applications/Hibiscus.desktop

http://standards.freedesktop.org/menu-spec/latest/