Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 2868  / 2 Years ago, wed, december 15, 2021, 1:36:53

The .desktop file opens a python script in the terminal. (with 'Exec' and Terminal = true). Could any other parameters be included so as to open the gnome-terminal in a specific profile or a particular window size?


More From » scripts

 Answers
2

In this case, it is not necessary to use Terminal=true in your .desktop file. To open your python script in gnome-terminal with a specific profile or a particular window size you can use:



Exec=gnome-terminal --profile=Profile_name --geometry=widthxheight -e '/path/to/script.py'


You have more other options if you look at man gnome-terminal.



Also, be sure that you have this two lines at the end of your python script if you want to keep the terminal open after the execution of the script is finished:



import os            # Use this line only if you have not already imported the os module
os.system("$SHELL")

[#29736] Friday, December 17, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ditery

Total Points: 9
Total Questions: 116
Total Answers: 119

Location: Grenada
Member since Sun, Dec 20, 2020
3 Years ago
;