On 02May2011 13:14, JD <jd1...@gmail.com> wrote:
| $ cat /home/jd/bin/viewer
| #!/bin/sh
| xterm -fn 12x24 -bg white -fg black -e vi $* &
| 
| How can I replace xterm with gnome-terminal?
| 
| I tried to simply change xterm to gnome-terminal
| but gnome-terminal does not recognize the args
| and never executes vi on the file selected.

I discovered to my horror several years ago that gnome-terminal wants to
use "-x" where xterm and most other terminals use "-e".

Have a look at "man gnome-terminal" for specifics.

But try this:

  gnome-terminal -bg white -fg black -x vi ${1+"$@"} &

ALso note the change of $* - your origial script will break if you get files
with whitespec in their names.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Sometimes I think that the only reason I stay in the physics biz is the hope
that someday I can give the "Thermonuclear Protection" a little thermonuclear
testing.        - Phillip J. Birmingham <birmi...@fnalv.fnal.gov>
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Reply via email to