LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 03-17-2008, 03:15 AM   #16
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.3
Posts: 7,283
Thanked: 311

[Log in to get rid of this advertisement]
given that the /etc/rc.local process needs to terminate...

nohup <yourcommand> &
chrism01 is offline     Reply With Quote
Old 03-17-2008, 05:58 PM   #17
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
Quote:
Originally Posted by chrism01 View Post
given that the /etc/rc.local process needs to terminate...

nohup <yourcommand> &
The below did not work

Code:
[root:~#] cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
nohup /usr/bin/hellanzb.py -D &
Jongi is offline     Reply With Quote
Old 03-17-2008, 07:26 PM   #18
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
Have you tried something more like

Code:
python /usr/bin/hellanzb.py -D -c /etc/hellanzb.conf

Note the explicit specification of python and clarification of config
billymayday is offline     Reply With Quote
Old 03-19-2008, 07:39 PM   #19
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
billymayday - that didn't work. i suspect there must be something about the nature of hellanzb.
Jongi is offline     Reply With Quote
Old 03-20-2008, 02:42 AM   #20
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.3
Posts: 7,283
Thanked: 311
When I said <yourcmd> that means everything it needs to run, inc full paths to prog and cfg file etc. Just like cron ....
chrism01 is offline     Reply With Quote
Old 03-20-2008, 08:49 PM   #21
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
Code:
[root:~#] cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
/sbin/modprobe snd-ca0106
touch /var/lock/subsys/local
python /usr/bin/hellanzb.py -D -c /usr/etc/hellanzb.conf
that's what didn't work
Jongi is offline     Reply With Quote
Old 03-20-2008, 09:16 PM   #22
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Thanked: 126
Do you get any kind of message during the startup process, entries in logs?
billymayday is offline     Reply With Quote
Old 03-21-2008, 06:33 AM   #23
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
I can see just as the boot process finishes that there is some sort of message but it almost immediately starts loading the DM. Maybe if I booted up in init 3 I would be able to see it? Or does the screen clear and the login prompt then appears?

I've also looked in these two logs and nothing

Code:
[root:~#] cat /var/log/boot.log
[root:~#] cat /var/log/messages | grep hella
Jongi is offline     Reply With Quote
Old 03-21-2008, 08:44 AM   #24
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,308
Thanked: 133
When you start /usr/bin/hellanzb.py from the command line (and presumably it works OK from the command line), which user are you running as? If it is yourself, then that is the problem, as commands in rc.local are run as the root user. Please try suing to yourself, then running the command, with a line like this at the end of rc.local

Code:
su - yourusername -c "cd /home/yourusername/ && /usr/bin/hellanzb.py" &
This is how I start a vncserver for my username when one of my boxes boots. It works nicely
tredegar is offline     Reply With Quote
Old 03-21-2008, 12:19 PM   #25
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 2,828
Thanked: 76
Try adding a sleep 10 as the script's last command to "pause" the output long enough for you to read the messages (if any).
PTrenholme is offline     Reply With Quote
Old 03-21-2008, 03:42 PM   #26
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
doesn't matter whether i run it as root or a normal user. If the command is successfully run, it is in a daemonised state and thus a ps aux should pick it up as running.

will try the sleep 10 command.
Jongi is offline     Reply With Quote
Old 03-21-2008, 04:09 PM   #27
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 2,828
Thanked: 76
The "10" in the sleep 10 is the number of seconds to "sleep," so you can increase it as needed.

From man sleep:
Code:
SLEEP(1)                         User Commands                        SLEEP(1)

NAME
       sleep - delay for a specified amount of time

SYNOPSIS
       sleep NUMBER[SUFFIX]...
       sleep OPTION

DESCRIPTION
       Pause  for  NUMBER seconds.  SUFFIX may be ‘s’ for seconds (the default), ‘m’ for
       minutes, ‘h’ for hours or ‘d’ for days.  Unlike most implementations that require
       NUMBER  be  an  integer,  here  NUMBER may be an arbitrary floating point number.
       Given two or more arguments, pause for the amount of time specified by the sum of
       their values.
PTrenholme is offline     Reply With Quote
Old 03-21-2008, 04:28 PM   #28
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
Yeah I kinda guessed that's what it does.And that has shed the first serious bit of light on the problem.

The following error is what presents itself

Code:
Please install notify-python or disable Hellanzb.LIBNOTIFY_NOTIFY.
I am suspecting that hellanzb is trying to run in init 3 where notify-python is not loaded. I am guessing this as when I am in a desktop manager, There is no problems with running it.

Code:
[root:~#] yum list | grep notify
libnotify.x86_64                         0.4.4-8.fc8            installed
libnotify.i386                           0.4.4-8.fc8            installed
notify-python.x86_64                     0.1.1-2.fc8            installed
python-inotify.x86_64                    0.7.1-1.fc8            installed
inotify-tools.i386                       3.13-1.fc8             updates
inotify-tools.x86_64                     3.13-1.fc8             updates
inotify-tools-devel.x86_64               3.13-1.fc8             updates
inotify-tools-devel.i386                 3.13-1.fc8             updates
kadu-exec_notify.x86_64                  0.5.0-4.fc8            fedora
kadu-led_notify.x86_64                   0.5.0-4.fc8            fedora
kadu-osdhints_notify.x86_64              0.5.0-4.fc8            fedora
libnotify-devel.x86_64                   0.4.4-8.fc8            fedora
libnotify-devel.i386                     0.4.4-8.fc8            fedora
pidgin-knotify.x86_64                    0.1-5.fc8              fedora
pidgin-libnotify.x86_64                  0.13-2.fc8             fedora
python-inotify-examples.x86_64           0.7.1-1.fc8            fedora
EDIT: My suspicion above was confirmed by running hellanzb.py -D in init 5 and 3 once the system had booted. And sure enough the same error pops up in init 3.

Last edited by Jongi; 03-21-2008 at 04:31 PM..
Jongi is offline     Reply With Quote
Old 03-23-2008, 06:18 PM   #29
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Thanked: 0

Original Poster
The key of course was then to run the file not through a console script but through a x script. Enter

Code:
[root:~#] cat /etc/X11/xinit/xinitrc.d/helladaemon.sh
#!/bin/sh
/usr/bin/hellanzb.py -D
which then on boot produces

Code:
[root:~#] ps aux | grep hella
jongi     2469  0.0  1.8 300552 19256 ?        S    00:14   0:00 /usr/bin/python /usr/bin/hellanzb.py -D
So now all is order. Thanks for everyone's help.

Last edited by Jongi; 03-23-2008 at 06:22 PM..
Jongi is offline  
Tag This Post , , ,
Reply With Quote
Old 03-23-2008, 10:16 PM   #30
konsolebox
Member
 
Registered: Oct 2005
Location: Philippines
Distribution: Gentoo, Slackware
Posts: 957
Thanked: 15
i should have known.. your /usr/bin/hellanzb.py is X dependent right?
konsolebox is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i add a local Folder on local Hard Disk as Yum Repository ?? vahid_p Fedora 4 02-22-2007 11:43 AM
Roaming Profile Local Settings Folder missing Pinkks Linux - Networking 6 02-13-2007 03:33 PM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 06:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 08:11 PM
MySQL command prompt (/usr/local/mysql missing) sankar555 Linux - Software 3 03-22-2003 01:48 PM


All times are GMT -5. The time now is 07:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration