SOLVED Re: how to start a kde application via shell script
Jonas Norlander
jonorland at gmail.com
Fri May 22 12:47:17 UTC 2009
On Fri, May 22, 2009 at 2:29 PM, Sascha Güthling
<guethling at googlemail.com> wrote:
> On Thu, May 21, 2009 at 8:59 PM, Bruce Marshall <bmarsh at bmarsh.com> wrote:
>> On Thursday 21 May 2009, Antonio Augusto (Mancha) wrote:
>>> One of the reasons that it doesn't work from cron is that the cron
>>> process doesn't have an X session associated with it.
>>> You can try puting the following before calling the kde application:
>>> export DISPLAY=0:0
>>
>> I recently got a similar command to work by using the display statement right
>> in the cron line:
>>
>> */10 * * * * DISPLAY=:0.0 /usr/local/bin/keepxfd2
>>
>> The above runs a script I wrote.
>
> I tried both, I put 'export DISPLAY=0:0' and 'export DISPLAY=:0.0' in
> my script before calling the KDE app, both didn't work. I got errors
> saying "/usr/bin/bmix bad variable"
>
> Changing my the crontab didn't help either.
>
> But that told me to try piping the application start through export
> DISPLAY=0:0 and that worked.
> My script now looks as follows:
> #!/bin/sh
> /usr/bin/kmix | export DISPLAY=0:0
>
> It works great.
>
I don't understand why that work. For the record can someone explain?
/ Jonas
More information about the kubuntu-users
mailing list