X and Fluxbox :: Desktop Links and XTerm



I'm trying to make a desktop link that will start shoutcast server.  Currently I can make the link open xterm via:
Code Sample

Command: rxvt -T "SHOUTCast Server" -e /opt/shoutcast-1-9-5-linux-glibc6/sc_serv

However, when I activate the link from the desktop the server starts but cannot find the location of sc_serv.conf which is in the same dir as sc_serv.  Is there a way to use a link to pass xterm a set of commands on activation?

I think that I might be able to start a script using a link maybe?  I need to start the server in xterm so I can see the output display.  Once I've closed xterm i can't see the output stats but the ps keeps running.  It would be nice if i could lookup the stats after i have closed the xterm.

If anyone could help me with any of this I would greatly appreciate it.

Thanks,
Louis

SuperLou, yes you can do what you want to do.  You need to use bash as the program that rxvt is running, then use bash's init file to take you the rest of the way.  The *.lnk line would look like this:

Code Sample
Command: rxvt -rv -T "Test Case" -e /bin/bash --init-file /home/dsl/burble


The burble file would look like this:

Code Sample
PS1='\u@\h:\w\$ '
export PATH=$PATH:/opt/shoutcast-1-9-5-linux-glibc6
/opt/shoutcast-1-9-5-linux-glibc6/sc_serv


The PS line sets the prompt of the bash shell.  I copied it from the default bash init so it looks the same.

The export line sets the PATH variable to include the directory where the conf file is (it sounded like shoutcast had trouble finding it, so why not let it know where to look?).  The last line runs you program.  When it's done, the window stays open because bash is still running.  This is nice for debugging since you can work in that window if you want.

You can put the special bash init file anywhere and call it anything you want, as long as you put the path to it in the command.


original here.