- Make sure udev-automount is installed
pacman -Sy udev-automount
- Work out udev rules with udevadm (see Arch Wiki - udev)
udevadm info -a -n /dev/sdc
- Create a udev rule file based on step 2, e.g. /etc/udev/rules.d/81-sdcard-sync.rules, with contents like this:
KERNEL=="sd?1", ATTRS{idVendor}=="0781", ATTRS{idProduct}=="a7a8", ATTRS{serial}=="6333011111B1", RUN+="/usr/bin/sd-card-sync-start.py"
Wednesday, 17 April 2013
run a script when a device is mounted
Sunday, 10 March 2013
Restore screen brightness on start-up
For HP Pavilion g6 with intel graphics, change /etc/rc.local to
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 976 > /sys/class/backlight/intel_backlight/brightness
exit 0
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 976 > /sys/class/backlight/intel_backlight/brightness
exit 0
Wednesday, 6 March 2013
Monday, 22 October 2012
Sunday, 27 November 2011
rsync from android
1) /root/rsyncpassword should contain rsync password, with each of owner, group and other all denied read/write (chown o-r, o-w, g-w, etc)
2) rsync.conf should set secrets-file for the 'access module' (e.g. ::data in the rsync command below) which contains:
user:password
rsync --recursive --update --delete --password-file=/root/rsyncpassword vin@192.168.1.2::data/video/Queue/Podcasts/ /sdcard/media/audio/podcasts/
Monday, 17 October 2011
Open deluge console
deluged runs as user deluge, so to run deluge console with the correct config:
deluge-console -c /srv/deluge/.config/deluge
Wednesday, 13 January 2010
.conkyrc for conky
# .conkyrc - Edited from various examples across the 'net
# Used by Craig Watson [ www.cwatson.org ] on Fedora 8
# --- Window Layout & Options --- #
own_window yes
own_window_colour 2B2739
own_window_transparent no
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
use_spacer right
use_xft yes
alignment bottom_right
gap_x 10
gap_y 10
# --- Colours, Sizes, Fonts & Margins --- #
update_interval 2.0
maximum_width 250
stippled_borders 3
border_width 10
default_color grey
# --- Text --- #
draw_outline no
draw_borders no
font Monospace:size=8:weight=bold
uppercase no
draw_shades no
TEXT
${color white}${time %A},${time %e} ${time %B} ${time %G}${alignr}${time %H:%M:%S}
#${color white}${alignr}$color $uptime
#${color orange}CPU ${hr 2}$color$font
Processes: $running_processes/ $processes${alignr}${color white}${freq_g 2}GHz$color
${cpugraph cpu1 25,120 000000 52496B} ${cpugraph cpu2 25,120 000000 52496B}
#${color #ff6600}${cpubar cpu1 3,120} ${color #cc0033}${cpubar cpu2 3,120}$color
#${color white}TOP ${hr 2}$color
${color white}NAME PID CPU MEM$color
1. ${top name 1}${top pid 1} ${top cpu 1} ${top mem 1}
2. ${top name 2}${top pid 2} ${top cpu 2} ${top mem 2}
3. ${top name 3}${top pid 3} ${top cpu 3} ${top mem 3}
4. ${top name 4}${top pid 4} ${top cpu 4} ${top mem 4}
5. ${top name 5}${top pid 5} ${top cpu 5} ${top mem 5}
#${color orange}MEMORY & SWAP ${hr 2}$color
${color white}RAM$color $memperc% ${membar 6}$color
#${color white}Swap$color $swapperc% ${swapbar 6}$color
#${color orange}ETHERNET (${addr eth0}) ${hr 2}$color
${color white}Down:$color ${downspeed eth0}${alignr}${color white}Up:$color ${upspeed eth0}
${downspeedgraph eth0 25,120 000000 52496B} ${alignr}${upspeedgraph eth0 25,120 000000 52496B}$color
Subscribe to:
Posts (Atom)