autostart *.pl

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
buchmader

autostart *.pl

Post 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:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
pgmer6809
Level 4
Level 4
Posts: 228
Joined: Sun Mar 04, 2012 9:06 pm

Re: autostart *.pl

Post 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
buchmader

Re: autostart *.pl

Post 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
buchmader

Re: autostart *.pl

Post 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
Locked

Return to “Beginner Questions”