maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   autostart applications (https://talk.maemo.org/showthread.php?t=46080)

hqh 2010-02-28 14:00

Re: autostart applications
 
Try
Code:

export DISPLAY=:0.0
before starting GUI apps...

craigcii 2010-02-28 14:38

Re: autostart applications
 
putting

export DISPLAY=:0.0

before running mauku using

export DISPLAY=:0.0
>/home/user/mauku.log
/usr/bin/mauku >/home/user/mauku.log 2>&1

outputting the log i get

Quote:


$ cat mauku.log
process 1438: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
This is normally a bug in some application using the D-Bus library.
process 1438: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
This is normally a bug in some application using the D-Bus library.
Aborted
using the same for gpodder

export DISPLAY=:0.0
>/home/user/gpodder.log
/usr/bin/python2.5 /usr/bin/gpodder --fremantle >/home/user/gpodder.log 2>&1

then exporting the log i get

Quote:

~ $ cat gpodder.log
Traceback (most recent call last):
File "/usr/bin/gpodder", line 138, in <module>
session_bus = dbus.SessionBus()
File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 219, in __new__
mainloop=mainloop)
File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 108, in __new__
bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
File "/usr/lib/pymodules/python2.5/dbus/bus.py", line 125, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException
~ $


hqh 2010-02-28 14:41

Re: autostart applications
 
Quote:

Originally Posted by craigcii (Post 549891)
putting

export DISPLAY=:0.0

before running mauku using

export DISPLAY=:0.0
>/home/user/mauku.log
/usr/bin/mauku >/home/user/mauku.log 2>&1

outputting the log i get



using the same for gpodder

export DISPLAY=:0.0
>/home/user/gpodder.log
/usr/bin/python2.5 /usr/bin/gpodder --fremantle >/home/user/gpodder.log 2>&1

then exporting the log i get

So the apps can't get dbus session bus address. Now this is a really ugly hack, but try putting this in the script before starting the apps...

Code:

PATH="/bin/:/usr/bin"
pids=`pgrep dbus-daemon`
for pid in $pids; do
    FILE=`cat /proc/$pid/environ | perl -pe 's/\x0/\n/g'|grep SESSION_BUS_ADDRESS_FILE \
    |sed -e 's/SESSION_BUS_ADDRESS_FILE=//g'`
done
eval `cat $FILE`

This works for me, I don't know if there is a cleaner/better way...

craigcii 2010-02-28 14:57

Re: autostart applications
 
i actually did a search for the error message and cae across this

http://talk.maemo.org/showthread.php?t=37423

where they suggested putting run-standalone.sh before the the program call as below

Quote:

cd /home/user

>/home/user/mauku.log
/usr/bin/run-standalone.sh /usr/bin/mauku >/home/user/mauku.log 2>&1 &

>/home/user/gpodder.log
/usr/bin/run-standalone.sh /usr/bin/python2.5 /usr/bin/gpodder --fremantle >/ho

date > /home/user/q.txt
anyway this has worked. just had to remember to background the script wirh & otherwise both will not run till the other ends.

i don't know what the script does but but am assuming the script sets up its own memory area or something.

i will do some more searches on it so i understand.

thanks for the help.

craigcii 2010-02-28 14:59

Re: autostart applications
 
this explains it further

http://talk.maemo.org/showthread.php?t=37095


All times are GMT. The time now is 20:14.

vBulletin® Version 3.8.8