SOLVED Re: how to start a kde application via shell script
jonorland at gmail.com
Fri May 22 13:47:17 BST 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:
> /usr/bin/kmix | export DISPLAY=0:0
> It works great.
I don't understand why that work. For the record can someone explain?
More information about the kubuntu-users