[plug] Controlling the initial geometry of a program under X

Peter Wright pete at akira.apana.org.au
Thu Apr 11 18:17:11 WST 2002


Hi Dave,

On Thu, Apr 11, 2002 at 05:45:42PM +0800, David Buddrige wrote:
> I've got a laptop on which I am running Debian GNU/Linux. However the
> screen is only capable of having 640 x 480 resolution.

Ahhh, a familiar story. :)

> The problem that I am having is that when emacs starts up, its window is
> bigger than my screen, such that I cannot access the edge of the window
> to size it.

What I'd probably suggest first off is to use a different window manager.
Ratpoison (http://ratpoison.sf.net/) and evilwm (http://evilwm.sf.net/)
simply don't have this sort of problem, and they're very efficient with
screen real estate too - which is very good on a small screen. evilwm is my
current favourite WM as it mixes minimalism with usability so very nicely.

In evilwm, hold down alt and drag with the middle mouse button (starting
anywhere inside any window) to resize the that window. Similarly, alt and
left mouse button drag will move the window.

These two tricks also work in fluxbox (http://fluxbox.sf.net/) if you'd
like a more "normal" window manager.

Similarly, in evilwm, control-alt-x will maximise/minimise the current
window to your desktop area.

> What I would really like to do is to adjust the X settings somehow so
> that the window for emacs was a particular size/position that is roughly
> central on my screen.  I've been searching google groups, but have not
> been able to figure this one out... is someone able to enlighten me? 

You need to have a look at the X(1) man page, but to make it easy for you:

$ xemacs -geometry 640x480+0+0

or, for a slightly smaller window with a 5-pixel border between the edge of
window and edge of screen:

$ xemacs -geometry 630x470+5+5

Get the idea? It's pretty straightforward really - once you know about it.:)

> thanks heaps in advance. 8-) 
> David Buddrige.

Give ratpoison a go though, you might find you quite like it. The ratpoison
developers are emacs fans too. :)

Pete.
-- 
http://akira.apana.org.au/~pete/
Old programmers never die, they just become managers.



More information about the plug mailing list