Page 1 of 1

autostart *.pl

Posted: Wed Mar 20, 2013 4:40 pm
by buchmader
hi guys - im new in linux-distribution, so what i want to do is to start this automaticly:
perl ~/folder/test.pl

Usually i have to write this in terminal to start test.pl and than it worsk fine...
To change the brightness, i do this command in /etc/rc.local
"echo 0 > /sys/class/backlight/acpi_video0/brightness" and it works

thx peace buchm. :mrgreen:

Re: autostart *.pl

Posted: Wed Mar 20, 2013 7:11 pm
by pgmer6809
If you check your home directory you should see a file called .profile
or alternatively .bash_profile or .bash_login.

Add whatever cmds you like to (one of) these files, make sure the file is executable, and these cmds will be run everytime you log in.

If you want the cmd to only run when you boot, add it to /etc/rc.local

pgmer6809

Re: autostart *.pl

Posted: Thu Mar 21, 2013 5:11 am
by buchmader
thanks for reply ;)
so i did open .profile and it looks like:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
so, how and where can i place the .pl-cmd?
thx

Re: autostart *.pl

Posted: Tue Mar 26, 2013 5:32 am
by buchmader
lol it works
it tryed again, do the same what i had done some days ago, and it works :)
menue/startup/ add a new startup "perl /link/to/.pl"

solved - thanks