Monday, April 29, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4039  / 3 Years ago, sat, september 18, 2021, 3:34:30

I have a gnome-terminal profile created with "When the command exists: Hold the terminal open" set. How can I avoid the yellow message at the top of the gnome-terminal window that states "The child process exited normally with status 0."?



Below are the contents of the desktop entry I have pinned to the Unity launcher. File name: twitterText.desktop



[Desktop Entry]
Type=Application
Terminal=false
Icon=vinagre
Name=Text Twitter Timeline
Exec=/usr/bin/gnome-terminal --window-with-profile=Microblog --hide-menubar --command="/usr/bin/python /home/htplainf/twitterTimeline.py"


enter image description here


More From » gnome-terminal

 Answers
0

Basically, don't let the program you are running terminate!
That yellow line indicates that the command you called within gnome-terminal finished sucessfully. You can even hit "relaunch" to start the program (in this case, your command line twitter) again.



I would do the following: Since you are most likely interested in a continuous update of the twitter messages, run your program within the watch command. This way, you can even define the interval "twitterTimeline.py" is run again!



Change your twitterText.desktop into the following:



[Desktop Entry]
Type=Application
Terminal=false
Icon=vinagre
Name=Text Twitter Timeline
Exec=/usr/bin/gnome-terminal --window-with-profile=Microblog --hide-menubar --command="watch -t -n 60 '/usr/bin/python /home/htplainf/twitterTimeline.py'"


Have a look at the Exec command in the last line:



watch -t -n 60 '/usr/bin/python /home/htplainf/twitterTimeline.py'


-n 60 means that your python script is executed every 60 seconds. You can easily set a different interval. Also, have a look at man watch to discover its compete functionality!



By using watch, your command never stops, so you will not see the yellow message bar on top of gnome-terminal. And your tweets are updated!


[#36040] Sunday, September 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
memorrappin

Total Points: 325
Total Questions: 122
Total Answers: 100

Location: Armenia
Member since Sat, Sep 12, 2020
4 Years ago
;