Panel can't do shell expansion?
brettholcomb at charter.net
brettholcomb at charter.net
Tue Feb 15 21:23:18 CET 2005
Excellent explanation. Now I understand.
>
> From: Jaap Karssenberg <j.g.karssenberg at student.utwente.nl>
> Date: 2005/02/15 Tue PM 06:32:14 GMT
> To: XFCE general discussion list <xfce at xfce.org>
> Subject: Re: Panel can't do shell expansion?
>
> David Olbersen wrote on 02/15/2005 06:27 PM:
> > Am I alone in the expectation that what I type in the Command field of a
> > launcher should work as though it were a shell command?
>
> Well, yes, I hope so.
> Almost any program I know of that allows you to configure a command
> string just passes it to execvp() which does little more than searching
> $PATH. There is a good reason for that; shell parsers are quite
> complicated and it would be overhead to have a shell interpreter
> embedded in your program just so a user can have shell expansion.
> This is the reason that the "#!" for shell scripts was invented. Shell
> scripts allow you to have a shell expansions, redirections etc. etc. and
> can be called from your execvp() as a command. In fact even if your file
> isn't executable execvp() will still try to run it as a shell script.
>
> So your options are either inlining a "sh -c", as other posters
> suggested, or make a shell script containing the expansion logic.
> As a bonus you are allowed to choose for yourself which shell- or
> script-interpreter you use.
>
> Note that the "exec" command in script languages like bash or perl uses
> the execvp() system call internally.
>
> --
> ) ( Jaap Karssenberg || Pardus [Larus] | |0| |
> : : http://pardus-larus.student.utwente.nl/~pardus | | |0|
> ) \ / ( |0|0|0|
> ",.*'*.," Proud owner of "Perl6 Essentials" 1st edition :) wannabe
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce
> http://www.xfce.org
>
More information about the Xfce
mailing list