Automaticly run a console comand on boot-up.

Booting, installing, newbie
Post Reply
Message
Author
User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

Automaticly run a console comand on boot-up.

#1 Post by flamesage »

You see, I am running a shoutcast server currently, how do I, when the computer boots up.
Automaticly tell it to load up two consoles (rxvt)

With..
./root/sc_trans_040/sc_trans_linux

(and then another console)
/usr/local/shoutcast/sc_serv

(And also, if it wouldn't be too much trouble, would there be a way to automaticly put them in my tray?)

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#2 Post by dvw86 »

You could try the litte start-items Rox-App that I wrote.
http://www.murga.org/~puppy/viewtopic.php?t=18&start=209

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

i haven't tried start-items yet ... it sounds like a very useful app

you could write a script (i think with Puppy 1.0.4, you can right click on a rox window and click New Script) ... something like:

#!/bin/sh
rxvt -e /root/sc_trans_040/sc_trans_linux &
rxvt -e /usr/local/shoutcast/sc_serv &

and run the script from /etc/profile, probably put the line just before exec xwin, like this:

/root/shoutcast/run-shoutcast
exec xwin

if you called the script run-shoutcast and put it in /root/shoutcast

if you run Icewm, you can have a tray icon for rxvt if you put this line in /root/.icewm/winoptions:

rxvt.tray: 1

but there will be a tray icon for ALL rxvt windows

you could make a symlink or 2 to rxvt, so rxvt runs with a different name

for example, you could drag rxvt from /usr/local/bin/ with the middle mouse button to /root/shoutcast/ and click Link ... rename the link to shoutcast1 ... if you like, you can make another link, and rename it shoutcast2

then your run-shoutcast script could be:

Code: Select all

#!/bin/sh
/root/shoutcast/shoutcast1 -iconic -sl 32000 \
  -e /root/sc_trans_040/sc_trans_linux &
/root/shoutcast/shoutcast2 -iconic -sl 32000 \
  -e /usr/local/shoutcast/sc_serv &
and you could put this in .icewm/winoptions:

shoutcast1.icon: eyes24
shoutcast1.tray: Minimized
shoutcast1.workspace: 3

shoutcast2.icon: fishy24
shoutcast2.tray: Minimized
shoutcast2.workspace: 3

(as an example ... you can pick better icons)

set up this way, the 2 shoutcast rxvt windows should start running automatically on boot, minimized, in workspace 4, with tray icons (one a fish and the other icon eyes), and there will be no button on the task bar when it's minimized

(-iconic starts rxvt minimized, -sl 32000 saves 32000 lines in the rxvt window that you can scroll through)

like this picture: Image

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »


User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#5 Post by Lobster »

Can someone who feels they would like to have a go at adding data to the wiki please add G2's data to the wiki

Let us know where you put it and how you get on :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

#6 Post by flamesage »

Well.. I tried that auto-start manager thing.

I "think" it runs, but whenever it loads it just exists back out again.

(I used the same technique as I did with Dream Seeker (a few posts back.))

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

Lobster wrote:Can someone who feels they would like to have a go at adding data to the wiki please add G2's data to the wiki?

Let us know where you put it and how you get on :)
Do you mean, put this post in the Wiki somewhere, and add an entry in the Wiki index pointing to it? :?

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

You got it flash - but the index entry is not required (though indexing is also worth considering) - that is automated - you will see an index at the top of the wiki

- so worth doing a hunt around there . . .

Using a wiki (and Puppy is developing one of the best) is useful - it is concentrated info

:)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Post Reply