why not exec .service

Tang Ke tangk at lemote.com
Thu Feb 4 16:50:46 PST 2010


On 2010年02月04日 18:08, Ross Burton wrote:
> On Thu, 2010-02-04 at 16:47 +0800, Tang Ke wrote:
>    
>> hi guys
>> I edit the /usr/share/dbus-1/system-services/com.example.Slow.service
>>
>> [D-BUS Service]
>> Name=com.example.Slow
>> Exec=/home/tangke/slow.py
>> User=root
>>
>> and the /home/tangke/slow.py file
>>
>> [snip]
>>
>> when I reboot the machine,and run d-feet not found the com.example.Slow
>> but when I use the "python /home/tangke/slow.py" and run d-feet will
>> found the com.example.Slow
>>      
> When you run it manually you are invoking the python interpretter, but
> your exec line doesn't do that and slow.py doesn't contain a
> #! /usr/bin/python so exec doesn't know what to do.
>
> My suggestion would be to add a #! to slow.py so that exec knows to run
> it with python.
>
> Ross
>    
When I add the #!/usr/bin/python
but after I reboot, the dbus object is not created, I think that the 
service file is not use.

thanks in advance.


More information about the dbus mailing list