My new Setup

Advertisements

Root applications styled in your current theme

You can manually install the theme for your user account; but if you change themes in your main user account you will need to change your root account as well. A quick alternative is to linq your theme to the roots theme.

sudo ln -s /home/<insert your username here>/.themes /root/.themes
sudo ln -s /home/<insert your username here>/.icons /root/.icons
sudo ln -s /home/<insert your username here>/.fontconfig /root/.fontconfig

HDTemp and Conky

Conky’s execi command can be use to execute any terminal line application and then display the output. We can use this with hdtemp to display the temperature of the hard disk.

sudo apt-get install hdtemp

Say yes to run as a start-up service and also accept the default port of 7634.

Open a terminal and type

nc localhost 7634

My output looks a little like this.

|/dev/sda|ST9500420ASG|41|C|lukey@debFooey:~$

As you can see the temperature is 41|C.

What we need to do is pipe the output of nc into the cut command to remove the surplus output to leave us with 41. We can then display this in the conky output

Either count along to what looks like the first number of the temperature and replace the c-24 with c-<yournumber>-c

nc localhost 7634  | cut -c24-25

run the command and make sure you are good to go.

Then copy the following into your .conkyrc

${execi 300 nc localhost 7634  | cut -c24-25;}°C


My Conky.

Conky is a lightweight system monitor for Linux. It is highly configurable and renders onto the x window directly.

Conky is so highly configurable it is worth googling for conky screenshots to find out just how varied people can make it; below is a screen shot of mine.

You will need to install conky and hdtemp.

sudo apt-get install conky hdtemp

Hdtemp will ask you if you would like it to be run as a boot up service and also which port. Say yes and accept the default port;7634.

Running conky is done by conky. It will by default pick up the config file from ~/.conkyrc if it exists if not it will use the default configuration file. Copy the configuration file into a text file in ~/.conkyrc

You will need to configure the params for hd partitions, wifi and ethernet interfaces if they vary from eth0, wifif and also if you don’t have partitions for / /home and /data like me.

You will also need to configure hdtemp entry. See the next post on how to do this.

Enjoy
update_interval 1
double_buffer yes

own_window no
#own_window_transparent yes
#own_window_colour black
#own_window_transparent yes
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

default_color black
no_buffers yes
alignment top_right
minimum_size 300 1000
maximum_size 300 1000
background no
use_spacer no
draw_borders no

border_margin 90
border_width 10
gap_x 10
gap_y 35

# Text stuff
draw_shades no
draw_outline no
uppercase no

# Font
use_xft yes
#xftfont dejavu sans condensed:style=condensed:size=12
xftfont liberation sans:size=9

# Colour
color0 black  #displayed values
color1 black  #headers
color2 black  #swap graph
color3 black  #disk graph
color4 black   #labels for values
color5 black   #cpugraphs for values

TEXT
${font Radio Space:size=20}${alignc}${time %A}
${font Radio Space:size=20}${alignc}${time %d %b %Y}
${font Radio Space:size=45}${alignc}${time %H:%M}${font}
$color1${font sans:style=bold:size=9}System$font $hr
${color4}Hostname:$alignr$color0$nodename
${color4}OS:$alignr$color0${pre_exec lsb_release -d | cut -c14-}
${color4}Kernel:$alignr$color0$sysname $kernel
${color4}Uptime:$alignr$color0$uptime
${color4}Battery:$alignr$color0$battery

$color1${font sans:style=bold:size=9}CPU$font $hr
${color4}Temperature:$alignr$color0${acpitemp}°C
${color4}CPU 1:$alignr$color0${cpu cpu1}%
$alignr${cpugraph cpu1 30,400 color5 color5}
${color4}CPU 2:$alignr$color0${cpu cpu2}%
$alignr${cpugraph cpu2 30,400 color5 color5}
${top name 1} $alignr${top cpu 1}%
${top name 2} $alignr${top cpu 2}%
${top name 3} $alignr${top cpu 3}%
${top name 4} $alignr${top cpu 4}%
${top name 5} $alignr${top cpu 5}%

$color1${font sans:style=bold:size=9}Memory$font $hr
${color4}RAM Usage: $alignr$color0$memperc% ($mem/$memmax)
$color2${membar}$color0
${color4}Swap Usage:$alignr$color0$swapperc% ($swap/$swapmax)
$color2${swapbar}$color0

${top_mem name 1} $alignr${top_mem mem 1}% (${top_mem mem_res 1})
${top_mem name 2} $alignr${top_mem mem 2}% (${top_mem mem_res 2})
${top_mem name 3} $alignr${top_mem mem 3}% (${top_mem mem_res 3})
${top_mem name 4} $alignr${top_mem mem 4}% (${top_mem mem_res 4})
${top_mem name 5} $alignr${top_mem mem 5}% (${top_mem mem_res 5})

$color1${font sans:style=bold:size=9}Disk$font $hr
${color4}I/O:$alignr$color0$diskio
${color4}Temperature:$alignr$color0${execi 300 nc localhost 7634  | cut -c24-25;}°C
${color4}/:$alignr$color0${fs_used_perc /}% (${fs_used /}/${fs_size /})
$color2${fs_bar /}$color0
${color4}/home:$alignr$color0${fs_used_perc /home}% (${fs_used /home}/${fs_size /home})
$color2${fs_bar /home}$color0
${color4}/data:$alignr$color0${fs_used_perc /data}% (${fs_used /data}/${fs_size /data})
$color2${fs_bar /data}$color0

$color1${font sans:style=bold:size=9}Network$font $hr
${color4}External IP:$alignr$color0${execi 300 curl ‘http://www.theworldofstuff.com/other/ip.php&#8217;}
${color4}Ethernet IP:$alignr$color0${addr eth0}
${color4}Wireless IP:$alignr$color0${addr wlan0}
${color4}Wifi Connection:$alignr$color0${wireless_essid wlan0}
${color4}Wifi Signal:$alignr$color0${wireless_link_qual_perc wlan0}%

${color4}Ethernet:${color4}Down: ${downspeed eth0}k/s (${totaldown eth0})${alignr}Up: ${upspeed eth0}k/s (${totalup eth0})
${color4}${downspeedgraph eth0 32,200}${alignr}${upspeedgraph eth0 32,200}

${color4}Wireless:${color4}Down: ${downspeed wlan0}k/s (${totaldown wlan0})${alignr}Up: ${upspeed wlan0}k/s (${totalup wlan0})
${color4}${downspeedgraph wlan0 32,200}${alignr} ${upspeedgraph wlan0 32,200}

A flicker free conky

My conky was a little wonky. I had flickering and a constant resizing issue. I had not had this for several years; conky just seemed to work for me. I have two laptops running Debian Squeeze one is perfect the other brought back haunting memories of trying to fix this last time.
WMCTRL

  • Install wmctrl; “apt-get install wmctrl

DBE

  1. Turn on dbe x module; this seemed to actually be on by default.
  2. If you don’t have xorg.conf see my previous post
  3. Inside /etc/X11/xorg.cong load the dbe module
  4. Look for a section called ‘Section “Module”‘ and underneath add ‘Load “dbe”

Section “Module”
Load  “glx”
Load  “dbe”

~/.conkyrc

Add the following into ~/conkyrc

  • Place before “TEXT
  • Note you will need to change the dimensions of the max and min size to be your required size; the only important requirement here is that they should both be equal

double_buffer yes
own_window no

minimum_size 300 1000 # WIDTH HEIGHT
maximum_size 300 1000 # min and max should be equal

  • Place as the very last line

${execi 6000000 wmctrl -a conky}