[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] remembering commands with options



Carsten Haitzler (The Rasterman) wrote:
> On Wed, 01 Nov 2006 09:18:41 +1300 Jochen Schroeder
> <jochen.schroeder@gmail.com> babbled:
>
>   
>> Carsten Haitzler (The Rasterman) wrote:
>>     
>>> On Tue, 31 Oct 2006 16:08:24 +1300 Jochen Schroeder
>>> <jochen.schroeder@gmail.com> babbled:
>>>
>>>   
>>>       
>>>> Carsten Haitzler (The Rasterman) wrote:
>>>>     
>>>>         
>>>>> On Tue, 31 Oct 2006 11:14:46 +1300 Jochen Schroeder
>>>>> <jochen.schroeder@gmail.com> babbled:
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>>>> Replying to myself,
>>>>>>
>>>>>> I just did another test I changed the command to:
>>>>>>
>>>>>> Exec=Eterm -n test -e vim +"cd NotesWiki" +"e ToDo.vimki" && echo "test"
>>>>>>
>>>>>> However .xsession-errors only has:
>>>>>> REMEMBER CMD: "Eterm-ntest-evim+cd\ NotesWiki+e\ ToDo.vimki"
>>>>>> ...
>>>>>>     
>>>>>>         
>>>>>>             
>>>>> yes. you can only execute 1 command - not a sequence of commands, from
>>>>> a .desktop file.
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> I think you misunderstood me. I also have to correct you, putting
>>>> Exec=Eterm && Eterm into a desktop file works perfectly fine when
>>>> starting from the menu or from startup/.order, it starts a second Eterm
>>>> after the first is finished. My real problem is described below, when
>>>> using the remember option: "Start this program on login" it does not
>>>> work, because e does not use the .desktop file entry to start the
>>>> program, but the command from the window properties. Also when it uses
>>>> that command when it starts the program at login, all whitespace is
>>>> lost, thus if you started the program with options it now cannot find
>>>> the command. I'm asking why e is not just using the command from the
>>>> corresponding desktop file when setting "Start this program on login".
>>>>     
>>>>         
>>> i know what the real problem is :) just that running multiple commands
>>> works by sheer luck only - not by design. i know about the other problem :)
>>>   
>>>       
>> Ah, OK :) then forget what I set earlier :). Just one more question, by
>> running multiple commands works by luck, not by design, do you mean, by
>> design you don't want to run multiple commands?
>>     
>
> correct. shell features like pipes, redirection, &&, ||, ; for I in a b v; do
> exec blah; done etc. - just open a can of worms. you start supporting them and
> how much DO you support? before you know you you implemented a full shell
> script parser and executor in E.
>
> it happens to work by luck because it is passed to /bin/sh to execute in such a
> way that it can be executed by the shell correctly. it bypasses the shell if it
> sees special meta characters that shells use ($, ;, & etc.) in the command.
>
> remember to execute something via the shell FIRST requires the shell to execute
> and so its thing THEN the app u actually wanted. if you have ever traced and
> watched what is involved in executing a program you might actually know why you
> want to avoid an exec if it can be avoided. :)
>
>   
OK, thanks for the clarification Raster.