Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Fedora server that I want to spawn an interactive python script after the user logs on. This script will ask the user for various types of information for configuring the system or it will search for the previous config file and show them the predefined information. Originally I was going to put this in rc.local or make it run with init.d but that messed up the boot due to how the script is spawned. So I would like this script to run as soon as the user logs in to Gnome. I've searched around quite a bit and found this answer which appears to be exactly what I want, but it isn't working the way I want it to. Below is my entry.

[Desktop Entry]
GenericName=Script for initial configuration
Comment=I really want this to work

Whenever I login, nothing happens. So I then did a test to modified "" to just echo some text to a file and it worked fine. So it appears the portion that isn't working is the script popping open a terminal and waiting for the users input. Are there any additional options I need to add to make this work? I can confirm when I run /usr/local/bin/ from the CLI it works fine. I have also tried adding "StartupNotify=true" and still no luck.

Edit @John - I tried moving my Exec= to /usr/local/bin/myscript-test and this is what myscript-test contains.

xterm -e /usr/local/bin/

Yet again, when I just run the myscript-test it works fine. However when I put that in my autostart, nothing happens.

Edit 2 - I did a few more tests and it did start working but I had to remove Terminal=True before the xterm would pop. Thanks for your help.

share|improve this question
up vote 2 down vote accepted

This is just a guess, but it smells like the original "" simply launches the Python script. You don't have a terminal, so it doesn't know to open one. If this is the case, you need to explicitly start a terminal in, and launch the Python script inside that terminal. Something along the lines of "xterm -e " should do it (that was from an admittedly bad memory, and I don't have a man page available for xterm, so please don't try it verbatim).

share|improve this answer
Correction... it worked. Thank you. – Eric Nov 13 '12 at 15:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.