Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: start an application on boot< Next Oldest | Next Newest >
xlancealotx Offline





Group: Members
Posts: 54
Joined: Nov. 2007
Posted: Dec. 11 2007,21:48 QUOTE

ok, never mind the old one's this must be an easy one.

I have DSL4 working and wish to start 2 items, the old machine had an rc.local of;

cd /
perl connextgen.pl >> /var/log/messages 2>&1 &

gflashplayer /main.swf >> /var/log/messages 2>&1 &

I know there is no rc.local, so I assume I should be updating the .xinitrc file.   I commented out the Dillo stuff as I don't need, but tried the above to look similar adding the & but no good.

So how do you kickstart a command line app (well, 2 of them) on boot.

Tnx
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 11 2007,22:14 QUOTE

putting "cd /" in .xinitrc isn't a good idea. This will cause you to run your desktop from /, which makes a few applications fail to behave as they should. Some programs are configured to use files with a path relative to your home directory.

I can't quite figure out the way you are redirecting output, so for all I know there may be a conflict there. My personal experience has been to use the most minimal format possible. If you're attempting to redirect both stderr and stdout, i think you can rely simply on >> (I'm not certain of this). Also make sure you have write permission to /var/log/messages. DSL does not initially allow a regular user to write to it or read it.

gflashplayer isn't a commandline application, so it must be run from .xinitrc

The perl script depends on whether it's a user app or a system (root) app. If it must be run by root, it should be run from /opt/bootlocal.sh. If run by a regular user, and doesn't require X, put it in /home/dsl/.bash_profile. If it needs X, put it in .xinitrc


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Dec. 12 2007,05:36 QUOTE

There are other rc* directories you could also use.  In addition to mikshaw's comment, I'm wondering why you have to files stored on / anyhow... but for now you can just specify the full pathname.

>> appends stdout to a file while 2>&1 redirects stderr to stdout, so in essence both stderr and stdout gets appended to the file.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 12 2007,14:26 QUOTE

I guess I follow. The "2>&1" and similar has never looked logical to me, even after reading the abs redirection chapter several times, so it has never sunken in.
In any case, I believe "&>>" is the simplified version I was looking for, not ">>".


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
xlancealotx Offline





Group: Members
Posts: 54
Joined: Nov. 2007
Posted: Dec. 12 2007,15:08 QUOTE

well the cd / and such were what was done in the past, I am not sure why that as well as why everything in the root (maybe for convenience).  Basically these little box's are connected via serial device to a data collection device and uses the perl script to interpret the data and gflashplayer to show it live.

As for the starting, gflashplayer is a command line script as far as I can tell, it's the adobe flash player standalone, but it works w/o a web browser, from a terminal, a simple;
/gflashplayer /main.swf loads the entire monitor with the application.  I am not sure if that means it is or not a command line app or not, but I have tried loading it using the .xinitrc as well as the bootloader and neither start it up.

I will tackle the perl script next, but I can run the flashapp w/o perl running, it will just return 0 for data.  But again, on dsl, I click run command, type /glfashplayer /main.swf (which I assume runs as dsl) and it starts fine.

I am not a 'bash scripter' yet, so not sure if there is something else on the lines I must put, but as I said, 'run command' type it works, so I typed just that in both the above files and neither starts on boot.

Tnx for all the help already.
Back to top
Profile PM 
5 replies since Dec. 11 2007,21:48 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: start an application on boot

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code