4

I would like to resize a web browser to a specific size.

I have been trying to resize my window (testing wmctrl) using wmctrl but somehow is does not resize it, however the position works.

I tried:

wmctrl -r Taschenrechner -e "0,300,200,800,600"

I am doing the test using ubuntu 14.04 LTS.

Any idea why is this not working? What I am missing?

2 Answers 2

4

The window of gnome-calculator ("Taschenrechner" with German locals) is not resizeable. You can't resize it with the mouse either.

You can check that using xprop:

xprop|grep _NET_WM_ALLOWED_ACTIONS

For a gnome-calculator window hat prints

_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW

For a Terminal it's

_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW

Notice the missing _NET_WM_ACTION_RESIZE for gnome-calculator`

1

I was just resizing my windows - wmctrl was the last command I ran!

I ran:

wmctrl -r "Ubuntu Web Browser" -e 0,0,0,1280,720

and you ran:

wmctrl -r Taschenrechner -e "0,300,200,800,600"

My suggestion would be to lose the "" around the sizes, and (maybe) add quotes to the window name:

wmctrl -r "Taschenrechner" -e 0,300,200,800,600

Just realised your program is a calculator. I doubt you can resize it - I can move mine but not shrink it or enlarge it.

This is standard with most calculator applications (and I wish it wasn't).

You said your main project is a Web Browser - it should work with that.

2
  • Sir, you got it. The calculator could not be resized and changing " " helps. Thanks.
    – karlihnos
    Jun 24, 2015 at 10:20
  • Working in 2019
    – madprops
    Dec 13, 2019 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .