[ale] run only one time in Arch Linux how to
James Sumners
james.sumners at gmail.com
Thu May 3 17:31:21 EDT 2012
Arch does not use SysV. See [1]. Thus, /etc/rc.local is the correct advice.
[1] -- https://wiki.archlinux.org/index.php/Arch_Boot_Process
On Thursday, May 3, 2012, JD wrote:
> 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.
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org <javascript:;>
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
--
James Sumners
http://james.roomfullofmirrors.com/
"All governments suffer a recurring problem: Power attracts pathological
personalities. It is not that power corrupts but that it is magnetic to the
corruptible. Such people have a tendency to become drunk on violence, a
condition to which they are quickly addicted."
Missionaria Protectiva, Text QIV (decto)
CH:D 59
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120503/03088e27/attachment-0001.html
More information about the Ale
mailing list