[PLUG] Startup Applications Re: two rotated screens with xrandr

Tomas Kuchta tomas.kuchta.lists at gmail.com
Thu Aug 12 06:03:58 UTC 2021


You could do even better adding it to login manager. It would apply to
login screen as well as all other users

Tomas

On Wed, Aug 11, 2021, 23:34 Keith Lofstrom <keithl at kl-ic.com> wrote:

> In the August 9 email below, I called my xrandr script
> using .bashrc .
>
> Wrong, that also adds cruft to an ssh login from another
> computer.
>
> A better place to call this script is from Startup
> Applications Preferences.  For Gnome2 and Mate, that can
> be done by clicking down through the menu bar:
>
> MainMenu -> System -> Preferences -> Personal -> Startup Applications
>
> Then clicking the +Add button and browsing to the twoscreen
> shell script.
>
> That works, but must be added for every user logging in
> to my system via the desktop console.   For now, just
> keithl, and very rarely, root.  Postpandemic, others.
>
> Perhaps one of you can suggest a way to +Add the same
> script for all users when they login on the console.
> I made my change for Mate on a CentOS 7 system.  I will
> soon upgrade to Mate Ubuntu 20.04, which may have an
> "add this script for all users" method.
>
> Keith
>
> --------------
>
> On Mon, Aug 09, 2021 at 04:24:00PM -0700, Keith Lofstrom wrote:
> > This isn't a "problem", but an xrandr solution for a
> > problem with gnome desktop preferences.
> >
> > *** The problem:
> >
> > gnome "system/preferences/Hardware/Displays" rotates
> > paired screens improperly.
> >
> > ***  The setup:
> >
> > I have two ancient Planar 1910M monitors (1280x1024)
> > fed by a "two DVI port" video card.  The left monitor
> > is rotated left, the right monitor is rotated right,
> > so the skinny "tops" of the screens are side by side.
> >
> > ***  The problem in detail:
> >
> > When I use the gnome menu to rotate the displays, the
> > two patches of screen pixels are separated by a hidden
> > 256-pixel-wide undisplayed strip.  Dragging a window
> > between screens works, except that a strip in the
> > middle of the window is hidden.
> >
> > ***  The solution:
> >
> > After duckducking the intertubes, I found some ideas,
> > which became a three line script (~/bin/twoscreen) run
> > by .bashrc after login:
> >
> > -----------------------------------------------------------
> > #!/bin/bash
> > xrandr --output DVI-I-1 --rotate left  --pos 0x0           \
> >        --output DVI-I-2 --rotate right --right-of DVI-I-1
> > -----------------------------------------------------------
> >
> > The important part is the "--right-of DVI-I-1" for screen two.
> > The gnome "video game" doesn't offer a way to do this.
> >
> > Your screen names will vary;
> >
> > xrandr | grep connected
> >
> > ... in an xterm will tell you what your screens are.
> >
> > After rotating and joining, my screens are:
> >
> > DVI-I-1 connected primary 1024x1280+0+0 left (normal left inverted right
> x axis y axis) 380mm x 300mm
> > DVI-I-2 connected 1024x1280+1024+0 right (normal left inverted right x
> axis y axis) 380mm x 300mm
> >
> > Keith
> >
> > P.S. Full Disclosure:  I use the "mate" fork of gnome2.
> > Perhaps gnome3 joins screens automatically, but I avoid
> > it because of the Many Many Other Really STUPID Things
> > gnome3 does automatically, in the quest to turn a
> > production desktop into a handwaving video game for
> > knuckledragging morons.  Useless for spastic seniors.
> >
> > I can phrase that less diplomatically if requested, but
> > impressionable youths under 30 read this list.  Don't
> > get me started on text (mis)rendering by Way(ste)land.
> >
> > P.P.S. - get off my lawn.
> >
> > --
> > Keith Lofstrom          keithl at keithl.com
> >
>
> --
> Keith Lofstrom          keithl at keithl.com
>



More information about the PLUG mailing list