Script does not work when place in Startup directory
PuppyThis forum is for the discussion of Puppy Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A better place might be to include that in your ~/.xinitrc or your DE's startup script (ex: ~/.fluxbox/startup). That way it is explicitly tied to your current X session.
I put the command in .profile but it does not start seamonkey.
Quote:
#120221 moved this code here from /etc/profile, also take 'exec' prefix off call to xwin.
if [ ! -f /usr/bin/X ];then
#v2.00r1 now support a text-mode-only puppy...
if [ -f /usr/local/bin/elinks ];then
if [ ! -f /tmp/bootcnt.txt ];then
touch /tmp/bootcnt.txt
#exec /usr/local/bin/elinks file:///usr/share/doc/index.html
#/usr/local/bin/elinks file:///usr/share/doc/index.html & #110804 110807
/usr/local/bin/elinks file:///usr/share/doc/index.html
fi
else
echo
echo "\\033[1;31mSorry, cannot start X. Link /usr/bin/X missing."
echo -n "(suggestion: type 'xorgwizard' to run the Xorg Video Wizard)"
echo -e "\\033[0;39m"
fi
else
if [ -f /root/.xorgwizard-reenter ];then #130423 see /usr/sbin/xorgwizard-cli 130513 also see init (in initrd)
xorgwizard-cli
fi
/usr/bin/seamonkey
#want to go straight into X on bootup only...
if [ ! -f /tmp/bootcnt.txt ];then
touch /tmp/bootcnt.txt
# aplay -N /usr/share/audio/bark.au
dmesg > /tmp/bootkernel.log
#exec xwin
#xwin & #110804 110807
xwin
fi
fi
I put the command in .profile but it does not start seamonkey.
I will not comment on the code that you posted, as I am not sure I understand how or why you did it that way.
But it is entirely possible that your ~/.profile file is not being executed.
Do you have a ~/.bash_profile file? If so, from man bash...
Code:
INVOCATION
A login shell is one whose first character of argument zero is a -, or one started with the --login
option.
An interactive shell is one started without non-option arguments and without the -c option whose stan‐
dard input and error are both connected to terminals (as determined by isatty(3)), or one started with
the -i option. PS1 is set and $- includes i if bash is interactive, allowing a shell script or a
startup file to test this state.
The following paragraphs describe how bash executes its startup files. If any of the files exist but
cannot be read, bash reports an error. Tildes are expanded in filenames as described below under Tilde
Expansion in the EXPANSION section.
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login
option, it first reads and executes commands from the file /etc/profile, if that file exists. After
reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads
and executes commands from the first one that exists and is readable. The --noprofile option may be
used when the shell is started to inhibit this behavior.
You will also need to background seamonkey for the startup script to continue.
Is the reason that .sh files are not executable by default for security reasons ?
Under *nix, the filename extension has no relevance to whether it is executable or not, only the executable bits matter.
A .txt file can be made executable, and a .sh file can be made non-executable, filename extension has no part in determining the executable status.
So, they are not executable by default for the reason that any newly created text file is not executable - because there is no reason for it to be! In that respect it is a safety, or security, default.
If it is a script that should be executable, you must set the executable bit without regard to extension.
Yes, Russian. I had to google translate the German, and would have had to reverse translate my response, so instead I gave you something to translate... and gave myself an excuse to use my recently learned Russian...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.