LinHES Forums
http://forums.linhes.org/

Reset Terminal Screen size
http://forums.linhes.org/viewtopic.php?f=5&t=25560
Page 1 of 1

Author:  Girkers [ Tue Dec 03, 2019 6:47 am ]
Post subject:  Reset Terminal Screen size

When I open up a terminal screen on my FE using ALT + X it fills the whole screen and when I type in the terminal i cannot see the writing as it is off the screen.

Does anyone know how to reset the terminal window size?

Cheers

Author:  welner [ Tue Dec 03, 2019 3:37 pm ]
Post subject:  Re: Reset Terminal Screen size

if you have the xterm widow up, you can try typing

Code:
resize -s 50 50


this will resize the window to 50x50. you can change to suite your needs, and hopefully you will be able to find a window border that you can drag.

somewhere in the mythtv setup, there should be a setting for this keybinding and the command, which is most likely simply "xterm". my box is currently recording, so i can't give you an exact location on this setting.

be that as it may, you should be able to change the command from "xterm" to add the "geometry" argument

updating the "xterm" command to something like:

Code:
xterm -geometry 125x125-10+10


the first two numbers are the size of the window, and the last two will allow you to place the window at a specific location on the screen

Author:  welner [ Tue Dec 03, 2019 3:49 pm ]
Post subject:  Re: Reset Terminal Screen size

correction...it appears that the keybinding for xterm is located in /home/mythtv/.keylaunchrc

on my system, the relevant entry for xterm is

Code:
key=..*x:/usr/LH/bin/tvterm.sh


/usr/LH/bin/tvterm.sh does xdpyinfo to figure out the geometry and then set the xterm size. that must be failing in your case. i'd suggest editing the script to dump out the xdpyinfo to see what it is doing

Author:  Girkers [ Tue Dec 10, 2019 3:40 am ]
Post subject:  Re: Reset Terminal Screen size

This is what I have in the script pointed out:

Code:
#!/bin/bash
#
# Create a terminal with a font that mostly fills the width of the screen.

width=$(echo $(xdpyinfo | grep dimensions:) | cut -d' ' -f2 | cut -dx -f1)

echo $width > /tmp/width.txt

if [ -z "$width" ] ; then
  width=1024
fi

if [ $width -ge 1920 ] ; then
  fontsize=24
elif [ $width -ge 1440 ] ; then
  fontsize=21
elif [ $width -ge 1280 ] ; then
  fontsize=18
elif [ $width -ge 1024 ] ; then
  fontsize=14
elif [ $width -ge 800 ] ; then
  fontsize=11
elif [ $width -ge 640 ] ; then
  fontsize=8
fi

xterm -fa 'DejaVu Sans Mono' -fs $fontsize


There is nothing to do with geometry so I don't know where it is getting it from. I checked in the file /usr/share/applications/xterm.desktop and again nothing in there:
Comment at top of file removed for brevity.

Code:
[Desktop Entry]
Name=XTerm
#GenericName=Terminal
Comment=standard terminal emulator for the X window system
Exec=xterm
Terminal=false
Type=Application
Encoding=UTF-8
Icon=xterm-color_48x48
Categories=System;TerminalEmulator;
Keywords=shell;prompt;command;commandline;cmd;


I checked and found that the width is being detected correctly as 1920 but all that does is set the font size, even if I set that manually it doesn't change where the window appears.

For the moment with your help I have set it manually to open where I want it.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/