Am I missing something when it comes to /etc/rc.local?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
This is one of the biggest frustrations of my Linux life!
scripts you create from scratch ALWAYS need to be made 'executable' in order for Linux to run them.
"chmod" is pretty easy to learn and is found in Chapter 2 of most Linux reference books...
...but, basically... 777 means setting Read/Write/and Execute for all users and groups of your system.
By default, newly created text files (aka newly created scripts...) have Read/Write persmissions set, but not Execute... I believe that equates to a chmod of 551
"chmod 777 hellanzb.py" (without the quotes, from inside the directory where the file is located) should do the trick... although... "chmod 751 hellanzb.py" or "chmod 711 hellanzb.py" is probably safest
God I hope this saves someone frustration... I would be LIGHT-YEARS ahead in learning Linux if I had found that sooner!
Your chmod anecdote is interesting. However hellanzb.py was always executable. Even as a normal user. See post 7 to see that it already has the executable attribute. The issue lay firmly with the fact that it needed an X environment to run due to one of the options I chose in its configuration.
Jongi
are u setting 777 i mean are u giving the executable permission ?
it needs to begin with S --> inorder to start
and then the process number -- > 97 for example | inorder to initiate the process with the priority as a number.
S97filename | make sure its 7xx
When you responded that you didnt have a clue what he was talking about here... I figured I would share this eureka moment... just in case!
So Debian doesn't have the folder /etc/X11/xinit/xinitrc.d/ . It does however have the file /etc/X11/xinit/xinitrc . So I thought adding the line /usr/bin/hellanzb -D to it would see it working. However the daemon does not start in Debian. Again the same command works from the command line once Debian is up and running.
Code:
[root:~#] locate hellanzb | grep bin
/usr/bin/hellanzb
/usr/share/python-support/hellanzb/Hellanzb/NewzbinDownloader.py
[root:~#] ls -la /usr/bin/hellanzb
-rwxr-xr-x 1 root root 1942 2008-01-05 01:04 /usr/bin/hellanzb
[root:~#] cat /etc/X11/xinit/xinitrc
#!/bin/bash
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
. /etc/X11/Xsession
#HellaNZB
/usr/bin/hellanzb -D
sleep 10
Well, the script wouldn't get to your addition before the X session had terminated, eh? So you might see a 10 sec. delay before your logoff is processed/
Added /usr/bin/hellanzb -D to ~/.xinitrc. No help. The most promising result was when I added the line to ~/.xsession. Except that it ignored the fact that the system is meant to auto login. And it came up with a different login screen. When I wen tto console from there, hellanzb was running. So it was close, close but no cigar.
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757
Rep:
Quote:
Originally Posted by kcoriginal
scripts you create from scratch ALWAYS need to be made 'executable' in order for Linux to run them.
This is not "ALWAYS" true. You can execute a script from the command line without the shebang command interpreter line at the top of the script and without executable bit set on the script file, but the calling command interpreter must preceed the script file name.
Code:
user@mybox:~$ cat /home/user/scriptfile
echo "This is a test"
user@mybox:~$ /bin/sh /home/user/scriptfile
This is a test
user@mybox:~$ /bin/csh /home/user/scriptfile
This is a test
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.