[ale] run only one time in Arch Linux how to

Ted W ted at techmachine.net
Thu May 3 15:13:04 EDT 2012


On May 3, 2012, at 1: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
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


I've set something similar to this up in the office for our FTP server. I have a line in /etc/bashrc to run a script that I wrote at each login. The script checks to ensure the presence of two things. The first is that /var/ftp/pub/$USER exists and then it confirms that /home/$USER/pub_ftp (a symlink to /var/ftp/pub/$USER) is present. If either check fails it re-creates it. If what your trying to do modifies something within the system which can be checked I would suggest just setting up a script in /etc/bashrc which checks for that marker and runs if it's not found, indicating it had not yet been run.

Another version of this might also have a line at the end which, after being run, modifies the bashrc file to no longer include the "run script" line, this would absolutely ensure that it never got run another other time than on first login.

-- 
Ted W. < Ted at Techmachine.net >
Registered GNU/Linux user #413569



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120503/612b7300/attachment.html 


More information about the Ale mailing list