rc.local (linux-kubuntu)

Discussion in 'General PC Help Center' started by Octopussy, Dec 21, 2008.

  1. Octopussy

    Octopussy New Member

    Joined:
    Nov 26, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    How would I go about adding commands to the rc.local file? The command I want to add is "synclient MaxTapTime=0", which disables tapping on the laptop's touchpad. Here's what the file currently looks like...

    Code:
    #! /bin/sh
    
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    [ -f /etc/default/rcS ] && . /etc/default/rcS
    . /lib/lsb/init-functions
    
    do_start() {
        if [ -x /etc/rc.local ]; then
            log_begin_msg "Running local boot scripts (/etc/rc.local)"
            /etc/rc.local
            log_end_msg $?
        fi
    }
    
    case "$1" in
        start)
        do_start
            ;;
        restart|reload|force-reload)
            echo "Error: argument '$1' not supported" >&2
            exit 3
            ;;
        stop)
            ;;
        *)
            echo "Usage: $0 start|stop" >&2
            exit 3
            ;;
    esac
    
    Where would I put the command I want it to run at startup?
     
  2. mqudsi

    mqudsi Mostly Harmless Staff Member

    Joined:
    Apr 5, 2006
    Messages:
    13,597
    Likes Received:
    4
    Trophy Points:
    38
    Location:
    Chicago
    Hi octopussy,

    What's the path for the file you posted above? I don't think it's /etc/rc.local, is it?
     
  3. Octopussy

    Octopussy New Member

    Joined:
    Nov 26, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    The path is /etc/init.d/rc.local. I want the system to do "synclient MaxTapTime=0" at login or startup, that's all.
     

Share This Page