Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Wednesday, July 18, 2012

NX7400 screen blacks out

Suddenly my nx7400 screen startet blacking out, making me have to reboot my laptop with the screen opened at above 90 degree angle. The real problem though was the LCD inverter. After changig it, I've experienced no further problems as to the screen blacking out...

You get new inverters cheap at ebay...

Friday, June 15, 2012

Automaticly set cpu governor when cable gets connected or disconnected

Edit 99-cpu, and add:


if on_ac_power ; then
    cpufreq-set -r -g performance
#    notify-send "[X] AC: Running in performance"
    cpufreq-set -r -g powersave
#    notify-send "[ ] AC: Running in powersave"

To install it:
sudo install 99-cpu /etc/pm/power.d

Next, to set the default cpu governor for your linux setup, simply edit /etc/default/cpufrequtils, and add:

Thursday, May 17, 2012

Stop rtorrent seeding immediately when done

First, the rtorrent ratio settings explained:
First you have to enable the ratio settings in .rtorrent.rc by typing this line:

Next, rtorrent has a setting for a minimal ratio to reach AND a minimum uploaded size which it has to reach before the max.ratio action can take place:

I want it to stop immediately, so I set them as low as possible.

Next you can set the max ratio to reach before it stops. I have set it to 1, which equals something like 0.001.

# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.

Saturday, May 12, 2012

Quick mount/umount dir with shortcuts

First make /usr/bin/mount_htpc:


if mount|grep $volume; then
umount /home/user/htpc
notify-send "[ ] Umounted /home/user/htpc"
mount /home/user/XBMC
notify-send "[X] Mounted /home/user/htpc"

Then create a shortcut to this function! Fast and easy!

Smart Lightweight Linux Launch Bar

Try this dmenu launchbar! Works wonders! Simply add a shortcut for it in your system, i.e. .fluxbox/keys:

Mod4 d :Exec $(dmenu_path | dmenu -fn arial -nf grey -sb grey -sf black -nb black)

Sunday, April 29, 2012

Easy NFS howto for Ubuntu/Debian

This works wonders!


Install NFS Server Support
at the terminal type
sudo apt-get install nfs-kernel-server nfs-common portmap
When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:
sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart

Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server

invoke your favorite text editor or
sudo vi /etc/exports

Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from through
  • /files,no_root_squash,async)

Or for Read Only from a single machine
  • /files (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart

Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a

Install NFS client support
sudo apt-get install portmap nfs-common

Mounting manually
Example to mount to /files. In this example is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine. 
cd /
sudo mkdir files

to mount the share from a terminal type

sudo mount /files

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab

In this example my /etc/fstab was like this:
  • /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made. 
mount /files 
in a terminal, and the mount point /files will be mounted from the server.

Saturday, March 31, 2012

Auto enable numlock at ubuntu startup

Easy fix...

Just install numlockx.

apt-get install numlockx

Restart, DONE! :-)

Ubuntu Oneiric 11.10 60 second halt during startup

The error: "waiting for network configuration"

Well, I've been there, done that, fixed that.. Here it goes.

In my case I just updated to the latest version of ubuntu (11.10 oneiric). I am also using wicd-client for managing all my network connections, which works flawless. After the update I started getting these halt messages during startup. The problem is ubuntu's own network config files which has other expectations on how the network should act.

The fix:

root@System:/home/user# nano /etc/network/interfaces 

now # out all lines except "auto lo" and "iface lo inet loopback".
My file looks like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp