At boot/login two apps are launched in my system, and I need to control their positions on the screen.

I have installed compizconfig-settings-manager and found the Place Window option. But there my ignorance is too great to continue.

I have searched here, but unfortunately the tips and hints stop about where I also end up. 17.04 How to set default window screen position is a typical example.

My questions:
1. Which of the three alternatives should I use?
2. How do I define which window I want to position?
3. How do I calculate X and Y coordinates? Is (0,0) the upper left? How calculate coordinates for a window to be positioned in the lower right of my screen?

The reason for this three-fold question is the delicasy of my system; I dare not use trail-and-error on it.

  • 2
    house rules ask folks to limit the scope of a question; asking for three things in a question is daunting, and often that's the find of question folks don't invest their (volunteer) time in answering. How about breaking this down into three questions by clicking on edit, removing two questions, and then making them into questions of their own?
    – K7AAY
    Oct 9, 2019 at 15:49
  • 1
    And by "At boot/login two applications/windows are launched" do you mean you've set two applications to run via autostart?
    – DK Bose
    Oct 9, 2019 at 15:53
  • 1
    And read up about xwininfo and wmctrl including wmctrl -lG.
    – DK Bose
    Oct 9, 2019 at 15:54
  • askubuntu.com/help/dont-ask What types of questions should I avoid asking? ...Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much.
    – K7AAY
    Oct 9, 2019 at 16:04
  • 1
    At boot or login two applications are autostarted.
    – jason
    Oct 9, 2019 at 16:13

2 Answers 2

  1. .

A) How do I calculate X and Y coordinates?
Start from 0,0 (upper left) and move the desire number of pixels across for the first starting coordinate, then down for the second starting coordinate.

B) Is (0,0) the upper left?

C) How (to) calculate coordinates for a window to be positioned in the lower right of my screen?
Your screen resolution minus one is the bottom right; if your screen is set to 1920x1280 then bottom right is (1919,1279). Subtract the size of the desired window from that value for the start coordinates; for example, if you want a 320x180 window positioned at bottom right, it would start at ((1919-320),(1279-180)) or (1599,1099). Don't forget, if you use a bottom panel, to offset for its height as well.

  • 1
    This answer is what I needed for understanding the screen -coordinate system. Thanks.
    – jason
    Oct 9, 2019 at 16:12

In a thread on LinuxQuestions.org, Fixed Windows Placemnet Using CompizConfig I found a working howto. See the question by CVAlkan. It answered all my questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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