Author Topic: Open terminal and run script on boot  (Read 585 times)

Offline shaggy-89

  • Newbie
  • *
  • Posts: 2
Open terminal and run script on boot
« on: January 20, 2014, 10:57:45 PM »
Hi all,
        I have a python script that i would like to run once the desktop has loaded. the terminal window it runs in needs to remain open so i can see the output.

here is the code i use to run python script

 python -m pagerprinter.pagerprinter -c pagerprinter.ini

so i have made an .sh script to run and have tried the following
-----------------------------------------------------------------------------------------------
#!/bin/bash
gnome-terminal -e "python -m pagerprinter.pagerprinter -c pagerprinter.ini"
------------------------------------------------------------------------------------------------
#!/bin/bash
python -m pagerprinter.pagerprinter -c pagerprinter.ini
------------------------------------------------------------------------------------------------

the .sh script runs fine when i click on it but when i put it in startup applications nothing shows on my desktop

i have also tried adding it to rc.local and cron -e but nothing


could someone point me in the right direction

cheers Shaggy


P.S newish to Ubuntu
 

Ubuntu Forums (Ubuntu Linux Support)

Open terminal and run script on boot
« on: January 20, 2014, 10:57:45 PM »

Offline edwardcullen

  • Newbie
  • *
  • Posts: 2
Re: Open terminal and run script on boot
« Reply #1 on: February 16, 2014, 07:23:40 PM »
hmmm even i am learning python i am just a rookie love the launguage but have you tried the script ___done() i mean i just learned the command turtle.done() which pauses the program so that we can see the graphics produced maybe some soft of that code is required. no offense i am just a rookie and new to this forum too.