0

Use case: I want to put into a tabletop a new LCD screen to replace a CRT tube, but the screens are bigger than the hole (31x31cm, this means 1:1 ratio while the screen has a 16:9 aspect and is bigger). To show a good pic, the region for screen drawing needs to be set.

Image example: Screen wireframe

Question: How can I set on a 16:9 monitor (eg. 1920x1080) set a 1:1 display canvas for fullscreen applications (eg. 800x800) with a given size and place it where I need it giving the space with x and y (eg, 450x160)?

miny1997
  • 128
  • 5

2 Answers2

1

xrandr mandatory?

(sorry, cant comment yet on this site -rep-, will delete respective parts or convert into a comment once I can. ETA: This partial answer was written in reply to a version of the question which explicity had xrandr in the headline.)

You are asking about using xrandr for the purpose of your question. Could you add some information whether xrandr is your only option and what are criteria that determine this decision, or that may OTOH add complexity to the task that needs to be taken into account? Such as the overall solution having to meet certain starting or operational conditions (no user interaction from electrical plug-in to showing content, etc.)

If it must be xrandr you may have to look into adapting modelines to use part of the screen, or search for a post on that. I'd imagine starting with looking into not filling the screen then doing a right shift and a vertical shift by modifying. Disclaimer: I have not verified any of this so far, just trying to inform an answer.

If xrandr is dispensable, you may be able to find a (possibly unattended-bootup) set-up that simply opens an undecorated window the size of your physical viewport on a black background and let the system display whatever content you wish in that.

  • It isn't a requirement, it is the tool I work with right now. If you can tell me how to do it by xorg.conf or whatever else, tell me. As I use software that goes fullscreen, a system-wide solution needs to be applied. Another requirement is that it works without any interaction from a mouse or keyboard. – miny1997 Jun 12 '20 at 00:09
  • could you add that into your question? I don't have a working answer at hand right now from the back of my head and it might make others more likely to go from it. – somebody_other Jun 12 '20 at 00:17
  • and, thinking of it, adapting your headline to the broader scope of the possible solution could attract useful ways of doing it, or ask another question (once you've established they're not already there with a working answer) or get an extension to an answer that gets close. – somebody_other Jun 12 '20 at 00:20
0

This answer shows how to calculate partial screen setups with xrandr. Somewhat also comes close to your purpose from another angle (Due to a broken monitor, I need to setup only the right half of my screen). I won't copy it here in full as it is on stack already.

Basically it uses the --transform option of xrandr, and shows the appropriate calculations.

(And if it's useful to you, don't forget to give credit to it, unlike the other asker who never bothered to accept the answer or inform why it didn't work for them :-))

ETA: Some more insight is given as "linked" or "related" on the page mentioned above. (of course, the "linked" items might be only the top ones and the "related" ones might be fully dynamic and change.) Anyway, one of these with another option is this Set Xorg to use only part of the screen.