Am Fr, den 01.04.2005 schrieb Claude Jones um 1:44:
Excuse me if this is another answer in my face question:
I have a simple program - in order to run it, I have to open a shell and
type in the program name and arguments; it then opens a second shell
or window depending on the arguments and runs - this is dosemu for the
inquisitive a 'dos in a box' program to run dos legacy stuff.
I would like to create a simple executable script that I could place on
my desktop to run this sequence. I can't figure out how. I've tried
simply writing a one line file that contains the program and arguments,
and making that executable, but that doesn't work. I think there's that
extra step of invoking a shell first that has to happen. If I press
alt-f2 and type in the program in the command window, that works, so how
do I turns those two steps into one executable?
2 things are possible:
a) Edit ~/.bashrc with an editor of choice and add an alias line.
alias foo='xterm -e top'
This as an example. You will have to source the changed .bashrc file by
. ~/.bashrc or source ~/.bashrc
If you then enter "foo" (without quotes) either in the console, xterm or
the starter box queried with Alt+F2, an xterm will open with top running
b) You may create a shell script instead. First create a bin directory
in your user home running "mkdir ~/bin". Use then an editor of choice
and create a file inside new directory bin in your home directory called
i.e. "dosinbox" with following 2 lines content:
/path/to/dosemu further parameters
Use the proper path to dosemu (though it might not be necessary) and the
correct parameters you like to use with dosemu and your program. Once
saved the file make it executable with "chmod 750 ~/bin/dosinbox". If
you then call "dosinbox" either on console or by creating a starter
(Gnome desktop right mouse button click) the commend will be executed.
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.10-1.771_FC2smp
Serendipity 01:51:58 up 1 day, 23:18, load average: 0.79, 0.96, 0.83