Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify window size or row x xcols on command line? #41

Open
jonshouse1 opened this issue Jul 17, 2021 · 4 comments
Open

Specify window size or row x xcols on command line? #41

jonshouse1 opened this issue Jul 17, 2021 · 4 comments
Assignees
Milestone

Comments

@jonshouse1
Copy link

I cant seem to find a reliable way to specify the terminal size. Having flashed a board I use gtkterm to look at the serial output, but the lines are quite long. It adds an extra tedious step having to resize the window each time I start it. Does gtkterm have am option to specify the window or terminal size on the command line, if not then it would be great if it could be added.
Due to serial driver limitations I am compiling as a user but running gtkterm as root, I think this complicates the result.

@Jeija
Copy link
Collaborator

Jeija commented Jul 18, 2021

Technically, there should already be an option to configure the terminal size, namely the

term_rows	= 80
term_columns	= 25

configuration options in the loaded profile in .gtktermrc. However, it seems like these configuration options are currently broken, because the call to vte_terminal_set_size in term_config.c does not actually resize the terminal 🤔. I think the correct way to resolve this issue is to resolve the bug that causes these configuration options to not work.

@jonshouse1
Copy link
Author

PS A lot of people who use this code are calling it from scripts, for example I use esptool.py to flash a device then start the serial terminal for debug messages. My feeling it that users probably want to be able to override any stored defaults and just specify a size on the command line. I know "Gnome" this or "GTK" that, but the type of user using this is anger every day could do without half an hour of googling and fiddling with defaults and config files.

@Jeija
Copy link
Collaborator

Jeija commented Jul 18, 2021

I know, among other things, I use this terminal tool for ESP8266 and ESP32 programming as well.
To use GTKTerm together with scripts, I highly recommend using the SIGUSR1 and SIGUSR2 signals (https://github.com/Jeija/gtkterm#scriptability-with-signals) instead of launching gtkterm from the flash script. That way, you keep keep the GTKTerm window open, but let the script tell GTKTerm to close / open its port.
For example, I use the following script to flash an ESP32 with esp-idf:

killall -SIGUSR2 gtkterm # If running, tell GTKTerm to close serial port
idf.py app # Compile Firmware
idf.py -p /dev/ttyUSB1 flash # Flash firmware
killall -SIGUSR1 gtkterm # If running, tell GTKTerm to open serial port

@jonshouse1
Copy link
Author

jonshouse1 commented Jul 18, 2021

Thanks Jeija that iooks very useful :-)

I would still rather close the instance of the terminal (when not working with multiple monitors), re-flash and open a new one. Like you are I am using the esp-idf, a lonely experience maybe, you must be the other user not working with the Arduino IDE ;-)

@wvdakker wvdakker self-assigned this Aug 17, 2022
@wvdakker wvdakker added this to the 2.0 milestone Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants