confuse about openususe's startup script

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

  1. shellfly

    shellfly New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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
    2
    3 ### BEGIN INIT INFO
    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
    12
    13 #/etc/rc.status && rc_reset
    14
    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 Administrator Staff Member

    Messages:
    575
    Likes Received:
    233
    Trophy Points:
    43
    What if you specify the path for xmodmap..

    Code:
    /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 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I have solved it by adding "xmodmap /home/shellfly/.xmodmap" in /etc/profile.local (opensuse)
    any way thks for you reply:D
  4. Stefano Messicano

    Stefano Messicano New Member

    Messages:
    88
    Likes Received:
    3
    Trophy Points:
    0
    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