You are here

Linux

Image: 

Paper Tux

Linux

there is no such thing as too many cubicle toys- make your very own paper Tux.

Linux 3.8

Linux

Where's the time that we spent ages in 2.6 ? Linux 3.8 has been released today.

Power Shell Usage

Linux

Bash junkie ? You need to read this : power shell usage for power users.

Rotating wallpaper

Linux

I've been working a while on a Windows 7 machine, and one of the nice desktop blings there is the rotating wallpaper item. There are quite some sets available, and you can download many more (eg like the famous Bing backgrounds). Linux has this functionality already since some time, but the sets of available wallpapers there are quite limited.

I've played around with Drapes, but the rotation time is quite small (I want maximum one wallpaper rotation per day). So why not write a script which downloads automatically some wallpaper from sites like APOD, Bing or National Geographic ?

Here are some scripts I found on the internet which do this for you. Place them in your crontab with a frequency of your liking.

Bing

#!/bin/bash
# modify this, if you want to save to other place
#  - $HOME: your home dir
#  - %F: full date (%Y-%m-%d)
#  - other date format: man date :P
OUTPUT=`date "+$HOME/Pictures/bing_bg.%F.jpg"`

# get the bing.com page, and separate the background image (DONT touch this)
IMG=`wget -q http://www.bing.com -O- | sed -r "s/[\]//g;s/.*g_img=\{url:'([^']+)'.*/\1/gp;d"`

# get the background image to the output (DONT touch this)
wget -q "http://www.bing.com$IMG" -O "$OUTPUT"
# error handle
if [ $? -gt 0 ]; then
        echo "there is a problem with downloading.."
        exit 1
fi
# Setting background-image.
# NB: Use an absolute URL
gconftool-2 -t string -s /desktop/gnome/background/picture_filename "~/Pictures/bing_bg.%F.jpg"
gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"

National Geographic

#!/bin/sh
#Based on code of APOD, you can really find everywhere on the web.

#Downloading html of the Picture-Of-The-Day
wget -N http://photography.nationalgeographic.com/photography/photo-of-the-day/ -O /tmp/ngpod.html
#Getting the URL of the image
img_location=`egrep -o "http://images.nationalgeographic.com/[^]*\.jpg" /tmp/ngpod.html|head -n 2|tail -n 1`

rm /tmp/ngpod.html

#Download image
TODAY=$(date +'%Y%m%d')
wget $img_location -O ~/Pictures/$TODAY.jpg

# Setting background-image.
# NB: Use an absolute URL
gconftool-2 -t string -s /desktop/gnome/background/picture_filename "~/Pictures/$TODAY.jpg"
gconftool-2 -t string -s /desktop/gnome/background/picture_options "zoom"

Running the native Nvidia drivers

Linux

Since the upgrade to Karmic on my desktop, graphic performance has gone down considerably. I solved this in the past by downgrading Nvidia, but since Lucid, this has become impossible. It's not that I cannot live without the desktop bling, but suspend-resume is impossible without running the Nvidia drivers. The problem manifest itself by very high CPU bursts by kernel processes (kondemand, ksoftirqd), which makes the desktop unworkably slow.

I tried everything, from disabling PAT, KMS modesetting, switching framebuffers, all without success. I even tried to enable Lenny's Nvidia drivers, but that pulled in a 2.6.26 kernel, which I cannot use, because my filesystems are ext4.

I eventually turned in despair to the Nvidia website, looking for older drivers. The 173 release was still available in the archive download section, which came as a ncurses-based installer. These Nvidia based drivers are famous for messing up a Linux system, so I was rather reluctant to use those. I still decided to give them a go, which rather went surprisingly really well.

Finally a performant system again !

Pages

Subscribe to RSS - Linux