Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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")
share|improve this answer

You can call the terminal with --geometry=widthxheight

For example at command line:

gnome-terminal --geometry=40x10

will open a terminal window with the above size (40x10)

share|improve this answer

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.