autostart *.pl

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
buchmader
Level 1
Level 1
Posts: 3
Joined: Wed Mar 20, 2013 4:28 pm

autostart *.pl

Postby buchmader » Wed Mar 20, 2013 4:40 pm

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:

pgmer6809
Level 3
Level 3
Posts: 124
Joined: Sun Mar 04, 2012 9:06 pm

Re: autostart *.pl

Postby pgmer6809 » Wed Mar 20, 2013 7:11 pm

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

buchmader
Level 1
Level 1
Posts: 3
Joined: Wed Mar 20, 2013 4:28 pm

Re: autostart *.pl

Postby buchmader » Thu Mar 21, 2013 5:11 am

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

buchmader
Level 1
Level 1
Posts: 3
Joined: Wed Mar 20, 2013 4:28 pm

Re: autostart *.pl

Postby buchmader » Tue Mar 26, 2013 5:32 am

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


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 11 guests