Author Topic: Setting the terminal position  (Read 1409 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Setting the terminal position
« on: June 12, 2018, 08:27:29 pm »
I have a script that I run from an exisitng terminal that changes, inter alia, the current terminal size.  But it would be nice also to reposition the terminal on the screen. 
I have found the command gnome-terminal --geometry COLSxROWS1+X+Y but this, as one might expect, opens a new terminal at the desired position. 

Is there a way to reposition the current terminal from within the script? 

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17819
  • Karma: 459
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Setting the terminal position
« Reply #1 on: June 13, 2018, 07:57:27 pm »
So you don't mean screen position, you mean terminal SIZE ?

You also haven't mentioned distro/version/architecture .. or desktop environment
« Last Edit: June 13, 2018, 07:59:34 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Keith

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Setting the terminal position
« Reply #2 on: June 13, 2018, 09:42:42 pm »
Sorry once more:  This is a Lenovo Thinkpad T500 running Ubuntu 16.04 in Classic View.

Err, no:  I mean the position of the terminal window on the screen. 
I can change the size of the current (only) working terminal window (resize -s rows cols) and I want to change its position, too.  i.e. automatically, within the script, rather than manually moving the terminal window with the mouse. 
This isn't important, of course - it's just for tidiness.  And laziness.  And fun. 
« Last Edit: June 13, 2018, 09:44:15 pm by Keith »

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17819
  • Karma: 459
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Setting the terminal position
« Reply #3 on: June 14, 2018, 01:06:11 am »
Ah I see .. but not that I know of :(
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Keith

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Setting the terminal position
« Reply #4 on: June 14, 2018, 12:45:44 pm »
Thanks anyway, Mark.    Sorry to have troubled you.

Keith

Offline Keith

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Setting the terminal position
« Reply #5 on: October 14, 2018, 06:40:50 pm »
The command wmctrl has the ability to specify both the size and position of the current terminal (or indeed, any window) on the screen. 
It works well.


 


SimplePortal 2.3.3 © 2008-2010, SimplePortal