vote up 4 vote down star

It's kind of annoying how some Ubuntu (GNOME, X Window System) programs start at the top left of my screen. Is there a way to make the program start in the center of the screen.

(Yeah I know it's a pretty trivial question but it is annoying ;-)

flag

Which window manager/desktop environment are you using? – Babu Jul 15 at 2:54

migrated from serverfault.com

3 Answers

vote up 9 vote down check

you can use x's geometry to set this.

depending on your x version it can vary.

the man page and it should explain the geometry options

xterm 80x24+nxn or similar.

link|flag
What does nxn do? – Lucas McCoy Jul 15 at 2:58
n would represent the number you want to set. – egorgry Jul 15 at 3:01
Thanks You So Much! – Lucas McCoy Jul 15 at 3:03
Why is it so hard to find information about geometry using a man page? – Lucas McCoy Jul 15 at 3:05
'man X', search for "GEOMETRY SPECIFICATIONS". – Craig Sanders Jul 15 at 3:47
show 2 more comments
vote up 3 vote down

In gnome-terminal (ubuntu) the geometry specification is slightly different:

gnome-terminal --geometry=114x32+0+0

As ever the man pages are your friend:

man gnome-terminal
link|flag
vote up 1 vote down

most (probably all) window managers have configuration options that you can tweak to set where new windows are opened.

some examples:

openbox has a check-box "Center new windows when they are placed". that causes all new windows(*) to open in the centre of the screen.

sawfish is very flexible and programmable - you can set rules so that windows matching certain criteria are always centered, always opened in desktop 2, have a different frame style, and so.

i can't remember exactly what metacity is capable of...haven't used it for ages. i think it can centre windows by default.

(*) by default, that is. if they're opened with a specific geometry then that overrides the default.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.