LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running Python Script in UBUNTU Session Manager (http://www.linuxquestions.org/questions/linux-newbie-8/running-python-script-in-ubuntu-session-manager-361372/)

warnetgm 09-08-2005 05:53 AM

Running Python Script in UBUNTU Session Manager
 
Hi,
I want my python script run everytime login.
In WinXP I've done this simply by placing shortcut of my program into StartUp Folder
In Ubuntu Linux, I tried using session manager in Startup tab adding :
Code:

python /home/user/program.py
Well it being loaded after I tested to logoff and login, but unfortunately the status is "TRASH" icon which I've read in manual mean not started in current session.

So how to make my python script executed every login using session manager ?

Please Help,
Thank You

warnetgm 09-14-2005 09:07 PM

Halo,

Is there no one have any idea Running Python Script on Gnome (Ubuntu) Session Manager ?

Please Help
Thank You :)

jodarom 12-06-2006 03:08 PM

Quote:

Originally Posted by warnetgm
Is there no one have any idea Running Python Script on Gnome (Ubuntu) Session Manager ?

Some non-interactive or launch environments don't connect all the open output streams that some programs (like python) demand. If that's the problem, you can satisfy such programs, by connecting the error output stderr (stream 2) to the output stdout (stream 1), and redirecting them both together to /dev/null.

python /home/user/program.py > /dev/null 2>&1

Now, python can freely and happily write its error messages into the endless void that is /dev/null.


All times are GMT -5. The time now is 02:10 AM.