Thursday, January 27, 2011

How to change or modify the openSuse 11.3 KDE4 "My Computer" sysinfo window background color to match your desktop theme color

Sometimes you change your Desktop background image and change the theme to your favorite eye candy style. But "My Computer" stays the same old green color.

The images for the KDE4 sysinfo "My Computer" are stored at
/usr/share/kde4/apps/sysinfo/about/images


-rw-r--r-- 1 root root 2.5K 2008-06-19 11:01 sysinfo.png
-rw-r--r-- 1 root root 4.0K 2008-06-19 11:01 network.png
-rw-r--r-- 1 root root 4.1K 2008-06-19 11:01 mem.png
-rw-r--r-- 1 root root 3.1K 2008-06-19 11:01 launch.png
-rw-r--r-- 1 root root 5.8K 2008-06-19 11:01 inner-bcg.png
-rw-r--r-- 1 root root 2.9K 2008-06-19 11:01 hdds.png
-rw-r--r-- 1 root root  773 2008-06-19 11:01 hdd.png
-rw-r--r-- 1 root root 1.1K 2008-06-19 11:01 dirs.png
-rw-r--r-- 1 root root 2.7K 2008-06-19 11:01 cpu.png
-rw-r--r-- 1 root root 3.7K 2008-11-11 08:11 display.png
-rw-r--r-- 1 root root 591K 2010-07-05 19:05 background.png






1. Make a backup copy of the images, 'background.png' and 'inner-bcg.png'
2. Open them with Gimp > Colorize > Change to your favorite color
3. Replace the original
4. Now open My Computer from Desktop and you should see the new colors.


Right click on "My Computer" and 'open with' > kwrite... You must see a lot of information now on the XML page
/usr/share/kde4/apps/sysinfo/about/my-computer.html

This html page has more details to explore

Friday, January 14, 2011

Helpful commands for Linux cluster job management

qstat

qstat -a

qstat -an

qstat -f : to see full details of a job
gstat -a

finger
qdel

To kill all of your jobs: (queued and running)
for x in `qstat -a | grep 'username' | awk -F. {'print $1'}`;do qdel $x; done


To run a python program script command in a cluster node:


        ####################################################

        # /usr/bin/python   # XY run on linux cluster.
        # Run as $python XY-v1.0.py prg_script(.py)
        # Advantage of the scripts is that this can be used to run XY # in any node processor
        # of the cluster (or any linux cluster with PBS). But 1 job runs only on a single cpu

        import sys, posix, fileinput, string, re

        # XY path installed in your system
        path = "/XY/bin"
        stem = sys.argv[1]
        cwd = posix.getcwd()
        N = 0
        jobname = """%s""" % (stem)
        command = """echo "#PBS -l nodes=1

        #PBS -m ae
        #PBS -M your_e-mail
        #PBS -l walltime=3:00:00
        #PBS -l mem=512mb
        #PBS -S /bin/bash

        cd %s
        %s/bin/xy %s.py" > %s.j
        chmod +x %s.j
        qsub %s.j


        """ % (cwd, path, stem, jobname, jobname, jobname)
        posix.system(command)
         ####################################################