[ale] run only one time in Arch Linux how to
JD
jdp at algoloma.com
Thu May 3 16:42:22 EDT 2012
If these scripts can be run automatically at boot, look at 'su - bestuser' and
put that into /etc/rc.local or write a proper init.d/ script. There are
thousands of examples. You probably want yours to happen later in the boot
sequence, so a starting number higher than 90 would be good for the file name.
I don't know anything about Arch, but on debian the 'update-rc.d' tool is the
easy way to setup scripts for different runlevel start/stop needs.
http://www.debian-administration.org/articles/28 has more.
If this needs to work **only** after login, use a PID file in a script ...
probably just like that init.d/ script and if the PID file exists, then the
process was left running. If it doesn't, then you need to start it. Be certain
you capture any signals in your script to clean up the PID file and remember to
clean it up at the "stop" command.
Neither of these methods need a GUI. A 10 line shell script will do. Of course,
you could link the script to a panel icon if you like.
Best of all, you don't need to actually login as the user to make the program
start. Effectively, your script(s) would behave like apache or any other daemon
does on any UNIX system.
Another item you can look at is the difference between the ~/.login and
~/.profile files, though I can't say that you want to use them in this situation.
On 05/03/2012 01:20 PM, Narahari 'n' Savitha wrote:
> Friends:
>
> I have two flavours of VM's I have setup.
>
> Both are Arch Linux.
>
> 1. No X Server
>
> 2. XFCE based desktop
>
>
> For the NON-X server
>
> I want to be able to auto login as user "bestuser".
>
> As soon as bestuser logs in, only one time, a particular shell script (or a
> bunch of scripts) should run. (not each time terminal opens)
> If possible I prefer to auto login the bestuser and thereby auto-run-once a
> bunch of scripts.
>
> For the XFCE desktop setup,
>
> In the Windoze world we have the tweak-ui app that auto logs in the user and the
> startup folder executes what you want. I want similar to that in XFCE4.
>
> Any suggestions would help.
>
> -Narahari
>
>
>
> This body part will be downloaded on demand.
More information about the Ale
mailing list