Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I move and resize the xfce4-terminal by command line?

The problem is that the command echo -ne '\e[3;0;0t' does not re-position my xfce4-terminal and has no apparent affect. man xfce4-terminal and other answers suggest it should.

xfce4-terminal emulates the xterm application developed by the X Consortium. In turn, the xterm application emulates the DEC VT102 terminal and also supports the DEC VT220 escape sequences.

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

http://rtfm.etla.org/xterm/ctlseq.html

The goal is to write a script that creates a few terminals and sets up my working environment without needing to click and resize my terminals to my comfort.

What does work is echo -ne '\e[8;40;80t' which the causes the terminal to resize correctly. So why not moving the window?


Other information that I am unsure may affect anything:

I have tried other numbers such as the sequence '\e[3;100;100t' but nothing seems to relocate the terminal window.

I am actually running ubuntu and installed and launch with xfce4 after unity started having issues from an update.

xfce4-terminal 0.6.3 (Xfce 4.10)

share|improve this question
    
xfce4-terminal supports the --geometry option, you can use it like this unix.stackexchange.com/questions/48984/… – TuKsn Jul 21 '14 at 13:10
    
@Tuknutx This is a good solution, thank you. – fruse Jul 21 '14 at 13:42
    
Try wmctrl, can be found in repos. – mreq Sep 18 '14 at 9:29

The man page for xfce4-terminal specifies using the --geometry option to set the size and placement of a terminal.

This option takes "the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and location for this application's main window." Refer to the "Geometry Specifications" section of the man page for X (man X).

Here are several examples of xterm placement:

  1. short and wide left-hand side: xfce4-terminal --geometry 140x20+50+50

  2. lower left-hand corner: xfce4-terminal --geometry 100x40+50+500

  3. upper right-hand corner: xfce4-terminal --geometry 100x40+1500+50
  4. short and wide right hand side: xfce4-terminal --geometry 140x20+1500+500

How to make this setting permanent:

"copy the terminal launcher (terminal's .desktop file) from /usr/share/applications/ to ~/.local/share/applications/ and edit the Exec field accordingly" as mentioned in the answer here.

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.