xbmc show nvidia gpu temp with nouveau

… is a bit tricky but I made it:

<advancedsettings>
 <cputempcommand>sensors|sed -ne "s/Core 1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
 <gputempcommand>sudo nvclock -T | grep -oE "[0-9]{1,}[C,F]" | sed "s/C/ C/g" | sed "s/F/ F/g"</gputempcommand>
 </advancedsettings>

Howto update-safe change Grub2 default to windows

On debian (ubuntu / linux mint should work too) this is quite simple. Grub2 takes menu entry names as default options. This can be done here:

# filename: /etc/default/grub
# search for or add if it not exists:
GRUB_DEFAULT='Windows 7 (loader) (on /dev/sda1)'

Your install might differ. GRUB_DEFAULT takes the menu entries from your grub.cfg usually placed in /boot/grub/

grep -o "menuentry '.*'" /boot/grub/grub.cfg

And here it is:

[...]
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-XXXXXXXXXXXXXXXXX'

All what is left to do is update grub as super user:

update-grub

Howto speed up your apt-get like never before

… is quite simple. You get your hands on eatmydata. Yes it’s not a convincing name but hey it’s in the standard repositories of debian and ubuntu so it should do you no harm 🙂

sudo apt-get -y install eatmydata

How to use it

sudo eatmydata apt-get <your regular stuff / install / update /...>

Try it on installs. It is SO MUCH FASTER.

Why the speed? Are there risks?

Normally programs like apt-get are very much power-loss persistent. If there is a sudden power loss you can pretty much resume where you got interrupted. This is possible because apt-get checks often if the data that should be on the disk is really written to it. Old school nerds may know the tool “sync” which is basically what apt-get does a lot.

This is very time consuming because file systems like ext4 and btrfs are not used to being forced to write all the time. They want to keep stuff in buffers and write when they decide it’s time. The is part of the magic speed they can achieve. Eatmydata redirects calls from following programs to sync-like functions programs into the void. Eatmydata makes other programs think they work pretty safe but actually they are not (and hell of a lot faster).

So it’s really fast but you really shouldn’t loose power (or sth. similar) when using eatmydata. But hey my last power failure is years from now and how are the chances you’re using eatmydata in this very moment? I wouldn’t recommend it for cronjobs though.

Update: Problems with Xbian on the Raspberry PI (rpi)

Looks like eatmydata causes problems on the raspberry pi with xbian installed. apt-get / dpkg exits with an error from time to time. But one can always proceed with

sudo dpkg --configure -a

But nevertheless eatmydata is not recommended for the rpi.