Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

confuse about openususe's startup script

Discussion in 'Desktop / X' started by shellfly, Jan 26, 2012.

  1. shellfly

    shellfly Guest

    I want to change my Caps_lock and Control_L when my computer startup
    so i write a simple script in /etc/init.d/changecc,and chkconfig it ,but it seems not working...
    the .xmodmap file is ok and it work fine when use xmodmap command in bash
    i don't know where is the problem,can you help me?

    1 #! /bin/bash
    4 # Provides: changecc
    5 # Required-Start: $null
    6 # Required-Stop: #null
    7 # Default-Start: 2 3 5
    8 # Default-Stop: 0 1 6
    9 # Short-Description: change Caps_Lock and Control_L keysym
    10 # Description: change cc
    11 ### END INIT INFO
    13 #/etc/rc.status && rc_reset
    15 case "$1" in
    16 start)
    17 echo "changecc start"
    18 xmodmap /home/shellfly/.xmodmap
    19 ;;
    20 *)
    21 xmodmap /home/shellfly/.xmodmap
    22 ;;
    23 esac
  2. Rob

    Rob Guest

    What if you specify the path for xmodmap..

    /usr/bin/xmodmap /home/shellfly/.xmodmap
    You'd think you wouldn't need to since /usr/bin is probably in the $PATH .. but you could give it a shot..
  3. shellfly

    shellfly Guest

    I have solved it by adding "xmodmap /home/shellfly/.xmodmap" in /etc/profile.local (opensuse)
    any way thks for you reply:D
  4. Start yours programs as cronjobs, as usual, as recurrent jobs (i mean, every n minutes/hours it is up to you). This solves the problem they are not running. There is no need to check, just put it to run again every n minutes.

Share This Page