open terminal at user defined coordinates
-
wrote on 16 Jul 2023, 18:18 last edited by
I need to open terminal at user defined coordinates (usuing Ubuntu/newest Qt Creator)
Command below works fine for me, but It has no effect for terminal opened with Ctrl+R (run) from Qt creator
What should I insert to pro file to make below?
gnome-terminal --geometry 80x24+2720+0 -
Hi,
That's completely unrelated to your
.pro
file.Also, is it your application that triggers the appearance of the terminal or did you check the "Run in terminal" option of Qt Creator ?
-
Hi,
That's completely unrelated to your
.pro
file.Also, is it your application that triggers the appearance of the terminal or did you check the "Run in terminal" option of Qt Creator ?
wrote on 16 Jul 2023, 19:54 last edited by@SGaist yes, its checked on Run on terminal file
So how can I make qt creator open terminal in specific coordinate? -
@SGaist yes, its checked on Run on terminal file
So how can I make qt creator open terminal in specific coordinate?wrote on 16 Jul 2023, 20:17 last edited by@JacobNovitsky
Over 10 years ago Qt Creator: Run in TerminalUnder Tools-Options-Environment-General, change the terminal value from
x-terminal-emulator -e
to/usr/bin/xterm -e
. This did the trick for me.Does that option still exist, is that where the
gnome-terminal
command is specified? -
@JacobNovitsky
Over 10 years ago Qt Creator: Run in TerminalUnder Tools-Options-Environment-General, change the terminal value from
x-terminal-emulator -e
to/usr/bin/xterm -e
. This did the trick for me.Does that option still exist, is that where the
gnome-terminal
command is specified?wrote on 16 Jul 2023, 23:57 last edited byYes that option still exists. By default it will run a stub to launch a suitable terminal emulator for the desktop environment installed; in my case konsole. You can directly select a different terminal emulator if you wish. Provided the underlying terminal emulator takes the standard X11 geometry options (all the common options do IIRC) then you should be able to do this:
-
Yes that option still exists. By default it will run a stub to launch a suitable terminal emulator for the desktop environment installed; in my case konsole. You can directly select a different terminal emulator if you wish. Provided the underlying terminal emulator takes the standard X11 geometry options (all the common options do IIRC) then you should be able to do this:
wrote on 24 Jul 2023, 00:05 last edited by JacobNovitsky@ChrisW67 if I add -e (?flag), terminal will not be called
If use without -e flag -> it does nothing -
@ChrisW67 if I add -e (?flag), terminal will not be called
If use without -e flag -> it does nothingwrote on 24 Jul 2023, 01:33 last edited by@JacobNovitsky The command to execute your program after launching gnome-terminal is added by Qt Creator. following the
-e
or--command
flag. See the gnome-terminal man pageThe
--geometry
flag is a little vague. The size components are either in pixels or characters depending on the application. The man page does not shed any light on this and I do not have it to test.
Have you tried the command from a shell prompt?/usr/bin/gnome-terminal --geometry 80x24+2720+0 -e /bin/bash # or /usr/bin/gnome-terminal --geometry 800x600+2720+0 -e /bin/bash
You can also try it with a single hyphen before geometry rather than two. If the window cannot be placed 2720 pixels from the left of the screen then I would expect it will usually be moved somewhere it can fit.