An RC file is a script file containing startup instructions for an application program (or an entire operating system). These are usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the ...
1
vote
0answers
8 views
How to write LSB init.d scripts that can run multiple instances of the same service?
Here is the problem I have: I do have to run multiple instances of several services on the same machine and I want to be able to re-use the init.d scripts.
You can see here an example of service ...
1
vote
1answer
22 views
OpenBox Mouse binding for dragging window to screen edge
I am trying to edit the lxde-rc.xml file (in ~/.config/openbox) so I can implement Window snapping like in Microsoft Windows. When a window is dragged to the right edge of the screen, it maximizes to ...
1
vote
1answer
34 views
rc.local is not running /sbin/ifconfig command
/etc/rc.local code,
echo "rc.local has started successfully" > /home/sk/tmp/init.log
isEthConfigured=$(ifconfig eth0 | grep "inet addr")
echo "rc.local has run ifconfig command well, with result ...
1
vote
1answer
43 views
RC script that brings itself to foreground under certain criteria
I have a simple script that asks for user input ([y/N]) and then acts upon it. I wrote a daemon rc wrapper so that it can run from startup. I was wondering if it is possible to make the daemon/script ...
0
votes
1answer
42 views
How do I make a python daemon run at bootup?
I am writing a Python program that will act as a custom converter for a hardware application for me on the raspberry pi.
I have written python code to act as a daemon, but how do I go about making it ...
0
votes
1answer
24 views
Run .zshrc when passing command via -c
I have a script that runs a command via zsh -c. However, when zsh runs, it doesn't appear to load ~/.zshrc.
I understand a login shell flag exists, but even zsh -lc <command> doesn't seem to ...
-1
votes
1answer
65 views
Starting Debian mono application (that has a GUI) AFTER boot is done [duplicate]
I've been trying to figure out how to start an application after Debian (Wheezy) is done booting up and on an LXDE desktop session. It is a mono C# application. The script I have is simply
mono ...
1
vote
2answers
43 views
Separate bashrc file for ssh sessions to avoid Unison Errors
Recently my Unison started throwing up some strange error whenever I tried to sync between my laptop and my PC. I realized that I had added a line in bashrc that would print my pending tasks whenever ...
0
votes
0answers
25 views
Terminal command will not execute after boot-raspberry
I have a raspberry pi which I want to turn into a web server. I have installed everything needed. The problem is I am using ngrok to get the server online. To do this, all I have to do is run the ...
3
votes
1answer
155 views
What is the difference between .exrc and .vimrc?
I know from experience that the ~/.exrc file can be used to configure vim. I also know that the ~/.vimrc file can be used for the same purpose.
However, If I use .exrc to configure vim, this leads ...
1
vote
3answers
163 views
update-rc.d doesn't accept the header of a script file
I have beagleBoard and I want to start my script at boot time ( boot/reboot). So, i ran command: update-rc.d GatewayStart.sh defaults
Output which says: header is rejected
...
2
votes
1answer
68 views
Color syntax highlighting working on one system but not the others. Same nanorc file
I'm trying to set my color syntax highlighting in nano, but it doesn't work as expected.
One system everything works. This is an Fedora 21 laptop.
Two systems everything I've tried except man ...
3
votes
2answers
199 views
How to check if vim is installed?
I want to know how to check whether a command is installed.
Specifically, I want to alias vi to vim on all machines where vim is a valid command. And I want to keep my *rc files generic. But some ...
0
votes
0answers
22 views
How do I set the operating directory in a script in rc.d (FreeBSD)?
I have a rc.d script that fires up a program that normally looks for a configuration file in ~/.app/app.conf. However, when I use service app start (or when it is auto-started at startup), the app ...
0
votes
1answer
74 views
run a script from rc.local, that exists on an autofs nfs share
I mount some nfs exports from a fileserver to my workstation.
The workstation is ubuntustudio 64bit 14.04.
in order to make the mounts as transparent as possible, I have inserted the following in my ...
0
votes
0answers
61 views
rc.local, su, and a bash script
I've got a bash script /usr/local/bin/startvnc that's just this:
#!/bin/bash
vncserver -kill :$1
sleep 2
vncserver -geometry 1250x950 :$1
And it gets called, per user, from /etc/rc.local like this:
...
1
vote
1answer
60 views
File that is only readable with root privileges
I have a binary file that needs to run at startup on all accounts (including unprivileged user accounts), so a command to run it will be put into /etc/rc.local. The program itself will have only ...
0
votes
0answers
18 views
put second instance of mysql in autostart
System: Debian GNU/Linux 6.0.10
I have two instances of MySQL running on my Server. The default one is (probably) already set in autostart, since there are some files in the /etc/rc.X named S03mysql ...
2
votes
1answer
129 views
Shutdown script seems to be executed twice
I have a small backup bash script that I wrote for my computer at work. I have copied the script into /etc/rc0.d/ and called it K01backup so it is executed before anything else upon shutdown. It backs ...
0
votes
1answer
177 views
while(1) on /etc/rc.local
I wrote while true; do ping 10.9.0.1; sleep 1; done on /etc/rc.local on an embedded board. I have been waiting longer than 20 minutes that it does not get the log in prompt. Either it got stuck on the ...
1
vote
1answer
231 views
Less command change color of “~” and “(END)”?
How do I change the color of the "~" characters that go along the edge of a Less command output.
And how to change the color "(END)" at the bottom?
2
votes
2answers
187 views
Execute root command after a user starts their session
I'm trying to find how is possible to execute a root command when a user starts their session.
I found that adding commands to thes file /etc/rc.local should execute the commands after the boot, but ...
2
votes
1answer
1k views
What is the difference between rc, rc.local and rc.sysinit?
I tried to display the list of startup scripts for the current runlevel at bootup. I wrote the following code.
rl=`runlevel | cut -d " " -f2`
ls /etc/rc.d/rc$rl.d/S* | cut -d "/" -f5
sleep 10
It's ...
4
votes
1answer
269 views
Installing software the first time a system boots after CentOS installation
I have a custom text based CentOS 6.4 installation that installs the OS, then after the first boot I have a custom rc.local file that installs custom applications and prepares the system for our ...
0
votes
0answers
157 views
Stuck/hung upon connect usb device
I have a device the is coming up 'busy' as soon as I plug it in. I even sniffed the usb connection and all looks normal. How do I find out what is capturing the device? How do I free it up?
...
2
votes
2answers
113 views
How to prepare a headless machine?
I'm currently preparing an SD-card for my Raspberry Pi, i.e. an ARM machine, while I'm sitting on a x86 one. Therefore I cannot simply chroot into it and run rc-update add sshd default. So, how else ...
2
votes
2answers
381 views
disable sudo password prompt for boot script
I've got raspbian installed and need to mount a cifs path after boot is completed. In fstab I got an entry for this with the noauto parameter. When using auto, boot hangs.
So in raspbian, the file is ...
2
votes
1answer
397 views
Launch a command at the end of Linux startup
I have a Raspberry without screen/keyboard/mouse that does nothing else than launching a radio stream at startup :
mplayer http://95.81.146.2/fip/all/fiphautdebit.mp3
I have put this command at the ...
0
votes
1answer
126 views
rc.subr can't access file?
On FreeBSD 8.3 I'm running script (as root):
/usr/local/etc/rc.d/foo/foo.sh start
content is typical:
. /etc/rc.subr
name="foo"
rcvar=${name}_enable
load_rc_config ${name}
...
2
votes
1answer
206 views
local shutdown scripts (do's and don't's)
At work, I'm running linux, and use vagrant on a daily basis. What I find annoying is that the system often hangs when I reboot/shut down, if I forgot to vagrant halt any virtual boxes I may have ...
2
votes
1answer
598 views
Automatically start an application with a modifed LD_PRELOAD?
I have an application that needs a modified LD_PRELOAD.
I want to start the application using the originally provided rc script, so I can benefit from an automatically updated rc script on an update ...
3
votes
1answer
2k views
How to properly use Gentoo Linux as a supplement to an existing distribution?
While I originally wanted to entirely replace the Linux distribution my NAS uses, I meanwhile came to the conclusion that it would be better to leave the existing system as unmodified as possible and ...
2
votes
0answers
640 views
FreeBSD: How to start a python script as daemon?
I'm facing an issue with a python file that I'd like to start as a service.
I named my service ocrserver and the script I want to start is in /home/administrator/ocr/ocrserver/init.py with some ...
2
votes
0answers
377 views
Debian Wheezy : problem installing .deb package that uses update-rc.d with dependancy numbers
I'm trying to install a .deb file, written by us, on a new Debian Wheezy system. The .deb file was originally written for Lenny so is fairly old. I've tracked down one point where the installation ...
0
votes
1answer
332 views
What are my problems with my VMWare runlevel setup?
I recently upgraded to Debian Wheezy (7) and had to upgrade VMWare Player along with that since the version I had didn't like the 3.2 kernel.
However, I notice that the kernel modules aren't starting ...