Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have added to sudo nano /etc/xdg/lxsession/LXDE/autostart

the line:

python /path/to/script.py

This launches script.py on boot. Which is what I want. However, I can't see the output from script.py about what it is doing. Autostart just runs it in the background. How can I get script.py to run in a terminal?

I'm using debian.

share|improve this question
    
run xterm -e python /path/to/script or check ~/.xsession-errors to see the output –  Ulrich Dangel Dec 21 '12 at 11:47
    
when I put xterm -e python /path/to/script in the autostart file, I get XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" –  Alexis K Dec 21 '12 at 12:00
    
does this mean I need to install xterm? If so, is there another possible way to do this without installing it? –  Alexis K Dec 21 '12 at 12:01
    
If you want to run it in a terminal you need to have a terminal installed. You can choose any terminal you like but it must support specifying the command to execute –  Ulrich Dangel Dec 21 '12 at 12:05
    
awesome. That worked. If you put it in the answer area, I can mark it as an answer. –  Alexis K Dec 21 '12 at 12:24
add comment

1 Answer

up vote 2 down vote accepted

You should see the output from your program in ~/.xsession-errors. If you want to run the command in a terminal itself you have to install a terminal which allows you to specify the command to be executed (most of them should support it), i.e. for xterm you can run:

xterm -e python /path/to/script

and place it in your autostart file.

share|improve this answer
add comment

Your Answer

 
discard

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.