Home > boot > rc.local does not execute all of the commands

rc.local does not execute all of the commands

January 1Hits:1
Advertisement
#!/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 "rc.local executed successfully" > /tmp/rclocal_executed  /usr/bin/synclient TapButton2=0 /usr/bin/synclient RightButtonAreaLeft=3 /usr/bin/tilda &  exit 0 

command

echo "rc.local executed successfully" > /tmp/rclocal_executed 

executed successfully, but the rest is not.

I assume the problem could be that these commands should be executed after I log in, and rc.local probably executed when just OS starts, therefore it might have no effect.

How to execute specified commands on a start up?

Answers

The problem was that the following commands require X server to be running, but rc.local executed prior X initialized, therefore commands can not be executed.

Solution:

In Ubuntu 12.04 invoke "Startup Applications" app, and put these commands there.

Tags:boot, startup

Related Articles

  • rc.local does not execute all of the commandsJanuary 1

    #!/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 execut

  • rc.local not being executed when os boots upMarch 14

    I have a script that needs to be run when os boots up. I added it to /etc/rc.local. It was working fine for sometime but now rc.local does not load at boot time. When i checked the permissions on the file, [[email protected] etc]# ls -al rc.local -rw-rw

  • Can you reach back into the local machine and execute an application with parameters from your remote session?May 15

    I am writing a program that is used as a RemoteApp from server to the client machine. I know that using System.Windows.Forms.SystemInformation.TerminalServerSession I can determine if the current session is a local session or a remote session from Re

  • Executing a Super-user command through .bashrcApril 11

    Is it possible to execute a super-user command in .bashrc? And if so, how? It would save me having to execute "sudo /opt/lampp/lampp start" on each startup. I've considered using the LAMP stack from the repositories, but it doesn't really meet m

  • how i can execute more than one command at the same time ? (OS = sun solaris)September 7

    how i can execute more than one command at the same time ? (OS = sun solaris) --------------Solutions------------- Glad to see you're willing to learn shell as I suggested earlier in another question. :-) To put command in background and let it execu

  • How do I execute a sequence of commands by writing one line in bash? August 31

    With cmd.exe's interpreter this is easy: echo testline > .\test.txt && c:\windows\system32\notepad.exe .\test.txt What is the equivelent to this with bash? For instance, vim doesn't execute when I run the following: ./check_nrpe -H 192.168.100.

  • how to execute more than one command gnome-terminalJune 27

    I have a script which is running some of (more than 15) applications like: cd mypath sleep 1 gnome-terminal -t App1 --tab -e "./App1" sleep 1 gnome-terminal -t App2 --tab -e "./App2" .. .. sleep 1 gnome-terminal -t App15 --tab -e "

  • Shortcut to execute output of last command in LinuxNovember 16

    Is there any shortcut to execute the output of the previous command, such as executing whatever is found by the locate command? For instance, if I run this locate command and get this output... [email protected]:~/scripts# locate nasm_shell /usr/share/metasp

  • How to execute multi-line ssh command stored in a variableMarch 12

    Context: I'm trying to execute a bunch of commands on a remote machine that I cannot access directly - I first have to ssh into a gateway machine, then ssh from there and run the commands. Basically what I'm after is a way of packaging up a set of co

  • How do I get nohup to execute [double-]quoted inner commands?April 16

    Let's say I want to run echo nested into watch nested into nohup. Starting from the bottom of the stack: echo test No problems with that. watch -n 1 'echo test' watch -n 1 "echo test" No problems with those either. nohup 'watch -n 1 "echo t

  • wrongly executed kill -9 -1 commandJune 9

    I am a newbie to Linux commands and was trying to delete a user on a CentOS 6 via an SSH connection on Putty, it was giving an error like "userdel: user is currently logged in", hence, i searched for a possible solution of this problem. Googling

  • I want to trigger yum's RPM transaction myself by executing a rpm -ivh command. Which part of yum's source code do I change?June 16

    I would like to execute the rpm install command instead of letting YUM do it by changing its source code. Which part of the source code do I change ? I need this as I need to give additional options to RPM which are not supported by YUM plugin API

  • Execute a list of commands from an ArrayList using JSch exec in JavaJanuary 16

    Using JSch "exec" channel, I connect to a remote server and execute a command. What I can't do is to execute a list of commands stored in ArrayList. I use for loop to pass each element to .setCommand(elem); but for some odd reason, only the last

  • rc.local is not executed on bootup ubuntuMarch 20

    Im on Ubuntu 10.04. I want to execute script on system boot. I added it to rc.local. If I execute rc.local manually it works fine. If I boot system in recovery mode(2nd string in boot menu) it also works fine. But if I boot normally it is not execute

  • /etc/rc.local doesn't execute apache tomcat startup script on bootDecember 19

    I'm having some problem with my centOS machine.I want to insert a line inside the rc.local to execute apache tomcat on startup. Below are the configuration for /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init script

  • Custom sidebar link to local file or executable?May 22

    I've been asked to see if we can create a sidebar link to an executable and start a program to run that has been installed on a user's local hard drive. Can that be done and what would the syntax look like? Prior to this, I've only seen links to file

  • rc.local is not executed on tartup in Ubuntu Server 13.04November 25

    I'm trying to add some iptables rules on startup for my VPN service in rc.local. my rc.local file is: #!/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 succe

  • rc.local won't execute the scriptJuly 31

    This is my rc.local #!/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 ju

  • Terminal: command overridden via shell script in /usr/local/bin not executed unless called directlyNovember 5

    I've created a shell script wrapping ssh to change my terminal background when connecting to a server following one of the many examples on this site and stackexchange. 11:22 ~ $ echo $PATH /opt/local/bin:/opt/local/sbin:/Volumes/Macintosh HD/Users/r

  • libopencv_features2d.so.2.4 present in /usr/local/lib but executable needs libopencv_features2d.so.2.3April 6

    I am a newbie so if this question has been previously asked or it is too rudimentary, please go easy on me and be helpful. I have installed opencv-2.4.0 and now I am working on terrain classification code. I am getting the following error while runni

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.592 s.