Flickr Photos

    Petri Lopia Photography

    If you are here for my photographs visit: http://photography.petrilopia.net/

    Or follow me on Instagram or Flickr.

    Adjust LCD laptop backlight brightness from command line

    /

    I needed to find out how can I change my laptop backlight brighness using just a command line. Solution for that problem was easier than I thought because you can do
    that just with one line =)

    On my laptop which is Dell Latitude D430 brigness file was on /sys/class/backlight/dell_backlight directory but it’s probably almost on the same place /sys/class/backlight/ on every laptop (and linux distribution) which is it possible to change.

    Before you start to change your laptop display brightness you should find out which is the maximum brigness of your screen which you can see with cat command from the max_brigtness file like this:

    cat /sys/class/backlight/dell_backlight/max_brightness

    On my laptop max brightness was 7 and surprisingly lowest brightness is 0 so let’s change brightness between 0-7 =)

    So if I want to save energy and turn backlight as dark as possible I just put 0 to brightness file like this:

    echo 0 > /sys/class/backlight/dell_backlight/brightness

    Continue reading “Linux: Adjust LCD laptop backlight brightness from command line” »

    IP Traffic Monitor already listening on eth0

    If you get this “IP Traffic Monitor already listening on eth0″ error when you are trying to use iptraf:

    IP Traffic Monitor already listening on eth0

    IP Traffic Monitor already listening on eth0

    Or any other interface like eth1 or wlan0 and so on…

    Be sure that you don’t have any iptraf applications running:

    ps ax|grep iptraf

    and after that you should only see line with “grep iptraf” but no iptraf applications.

    After that remove all files from /var/run/iptraf/ and after that start iptraf
    again and it should work:

    root@NSA:/# cd /var/run/iptraf/
    root@NSA:/var/run/iptraf# rm *
    root@NSA:/var/run/iptraf#
    

    Continue reading “IP Traffic Monitor already listening on eth0” »

    Apple Mac OS X and locked files

    I had a client whos Microsoft Windows 7 Fujitsu laptop I had to fix.

    I used Hiren’s BootCD bootable Linux rescue CD to copy files from that laptop to my clients external harddrive and everything when without a problems.

    When I started to move files from that external harddrive to my iMac (Actually to my drobo) I noticed that some (for some reason not all the files on that directory because) files were
    locked so I could not move those files… I didn’t want to go thru all the files using graphical user interface so I had to find way to fix those files using command line.

    So after a little bit searching I noticed that I can use chflags command to do what I wanted so I started terminal and said:

    sudo chflags -R nouchg /Volumes/Drobo/UnCheck
    

    That unlocked all the files from /Volumes/Drobo/UnCheck directory which was exactly what I wanted to do =) I had to do it to couple of other directories too but that was not a hard job
    compared to doing all of this using graphical user interface =)

    Continue reading “Apple Mac OS X and locked files” »