Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: ebelouet on July 08, 2014, 07:00:12 PM

Title: Automatique start Python programm
Post by: ebelouet on July 08, 2014, 07:00:12 PM
HI,

I would like to know how starting Python software on DEbian with A20 board ?

Sincerely
Eric
Title: Re: Automatique start Python programm
Post by: kantal on July 08, 2014, 07:49:55 PM
For non graphics program, you can start it from /etc/rc.local on system start, but the outputs must write into a file or must be redirected.

prog &
Title: Re: Automatique start Python programm
Post by: ebelouet on July 08, 2014, 07:53:15 PM
thank but it's graphic python software
Title: Re: Automatique start Python programm
Post by: kantal on July 08, 2014, 08:01:25 PM
I don't use Debian now but on Ubuntu Gnome desktop there is a "Startup Applications" item in the Application menu.  Try to find similar!
Title: Re: Automatique start Python programm
Post by: martinayotte on July 09, 2014, 04:26:28 PM

If you wish to start your python script, don't place it directly in /etc/xdg/lxsession/LXDE/autostart, but create a desktop file instead which look like the following :

[Desktop Entry]
Encoding=en_US.UTF-8
Type=Application
Terminal=false
Name=MyPythonApp
Comment=MyPythonApp
Exec=/usr/bin/python /home/eric/eric.py
Modify message
Title: Re: Automatique start Python programm
Post by: MBR on July 13, 2014, 05:57:40 AM
If you dont'n need window manager, you can start the application from .xinitrc (but withou window manager, you must manage all the windows on you own). So it's only usefull for fullscreen applications.
Title: Re: Automatique start Python programm
Post by: Alep on July 14, 2014, 10:15:51 AM
This is my  /etc/xdg/lxsession/LXDE/autostart and work fine

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@x11vnc -bg -forever -noxdamage -ncache_cr
@./run.py