Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

IOT trap -- core dumped


devel / comp.lang.tcl / Discovery of displays on a multi-monitor system

SubjectAuthor
* Discovery of displays on a multi-monitor systemKeith Nash
+- Discovery of displays on a multi-monitor systemgreg
+- Discovery of displays on a multi-monitor systemsaitology9
+- Discovery of displays on a multi-monitor systemAndreas Leitgeb
+- Discovery of displays on a multi-monitor systemet99
`- Discovery of displays on a multi-monitor systemKeith Nash

1
Discovery of displays on a multi-monitor system

<zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12040&group=comp.lang.tcl#12040

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 19 Aug 2023 20:23:13 +0000
Date: Sat, 19 Aug 2023 21:23:13 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
From: k.j.nash@usa.net (Keith Nash)
Subject: Discovery of displays on a multi-monitor system
Newsgroups: comp.lang.tcl
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Lines: 11
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-u2RbXoaWmQMFo6OZp+Xy3kEMVckar+tclbdEZvoz2+MC6kS3hE5w9ffVk1hx3Y6+A+LH9cYYMsrUl7l!ypMoiQqUbQKfv0WlKFnjJqV0kDpgbBuja/rNnQVGBMmm863JRRdeyo2MH7JdfWPZzNnjGlIiUHxh!+a4E4BDYlukWGHvQxCiCeI2T9n8i
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Keith Nash - Sat, 19 Aug 2023 20:23 UTC

A new toplevel can be created on any available screen by using the
option -screen, e.g.

toplevel .foo -screen :1.0

Other per-screen operations use the option -displayof $WindowPath
to specify the screen.

Is there any command that returns a list of available screens?

Keith.

Re: Discovery of displays on a multi-monitor system

<3687ac1e-fa8c-434b-b1ac-0ad19a723649n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12048&group=comp.lang.tcl#12048

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:1809:b0:403:e963:ce3b with SMTP id t9-20020a05622a180900b00403e963ce3bmr31254qtc.5.1692558376906;
Sun, 20 Aug 2023 12:06:16 -0700 (PDT)
X-Received: by 2002:a17:902:e751:b0:1bf:702b:f208 with SMTP id
p17-20020a170902e75100b001bf702bf208mr1384646plf.11.1692558376556; Sun, 20
Aug 2023 12:06:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 20 Aug 2023 12:06:15 -0700 (PDT)
In-Reply-To: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.17; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.17
References: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3687ac1e-fa8c-434b-b1ac-0ad19a723649n@googlegroups.com>
Subject: Re: Discovery of displays on a multi-monitor system
From: gregor.ebbing@googlemail.com (greg)
Injection-Date: Sun, 20 Aug 2023 19:06:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1777
 by: greg - Sun, 20 Aug 2023 19:06 UTC

Keith Nash schrieb am Samstag, 19. August 2023 um 22:23:21 UTC+2:
> A new toplevel can be created on any available screen by using the
> option -screen, e.g.
>
> toplevel .foo -screen :1.0
>
> Other per-screen operations use the option -displayof $WindowPath
> to specify the screen.
>
> Is there any command that returns a list of available screens?
>
> Keith.

https://wiki.tcl-lang.org/page/Dual+or+Multiple+Monitors

the two procs Dualmonitor and is_dual_monitors didn't
do anything for me under Linux with two monitors

Re: Discovery of displays on a multi-monitor system

<ubtp46$1gqjm$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12049&group=comp.lang.tcl#12049

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Discovery of displays on a multi-monitor system
Date: Sun, 20 Aug 2023 15:21:39 -0400
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ubtp46$1gqjm$1@dont-email.me>
References: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 20 Aug 2023 19:21:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7338d2409030a088c3f996ef728c0bcf";
logging-data="1600118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18c+SNDgQeFFgGjQQgLBHzd"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:v6egyzKPPX1K7L6qNx2G4ZGy0B0=
In-Reply-To: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Content-Language: en-US
 by: saitology9 - Sun, 20 Aug 2023 19:21 UTC

On 8/19/2023 4:23 PM, Keith Nash wrote:
> A new toplevel can be created on any available screen by using the
> option -screen, e.g.
>
> toplevel .foo -screen :1.0
>
> Other per-screen operations use the option -displayof $WindowPath
> to specify the screen.
>
> Is there any command that returns a list of available screens?
>
> Keith.

Have you tried ":0.1" to specify the second local display option? You
may also want to check your xhost permissions.

Re: Discovery of displays on a multi-monitor system

<slrnue4v6j.2d3.avl@logic.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12053&group=comp.lang.tcl#12053

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: Discovery of displays on a multi-monitor system
Date: Sun, 20 Aug 2023 20:51:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <slrnue4v6j.2d3.avl@logic.at>
References: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Reply-To: avl@logic.at
Injection-Date: Sun, 20 Aug 2023 20:51:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c17ff21d059b0bbbee5a7c3e268b55be";
logging-data="1626798"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xUGNmFCLmfqD3fbLrpHI0"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ulUaiSDVLVXck0I8HKfiXIvI6dE=
 by: Andreas Leitgeb - Sun, 20 Aug 2023 20:51 UTC

Keith Nash <k.j.nash@usa.net> wrote:
> A new toplevel can be created on any available screen by using the
> option -screen, e.g.
> toplevel .foo -screen :1.0

Screens are an old concept from X11, where two monitors attached
to a single machine (usually via separate graphics-boards, as each
board usually only had a single port) and handled by the same
Xserver were handled separately as :0.0 and :0.1 (that was back
in last millennium)

Then, later (I think still last millennium) came (optional) Xinerama,
where these :0.0 and :0.1 were united to a single big screen, where
you could even have single windows extending across the monitor-
boundaries. Quite a "wow!" back then.

Nowadays, graphics-boards have multiple ports, and multiple
graphics-boards are usually treated together as some dynamic
screen-estate, which just grows or shrinks as further monitors
get connected or disconnected, or the laptop-lid opened or closed.

Since the time I have more than one monitor plugged to my machine
(like about 10 years now), I haven't seen any :0.1 anymore, but just
a single screen extending to all of them, and tools (e.g. arandr
or those monitor-settings dialogs) to arrange their relative layout
or switch to "mirroring" the same screen to all monitors.

Given that monitors can be put in quite peculiar relative layouts,
e.g. touching only in corners rather than along edges, it is probably
quite non-trivial to identify a specific monitor and the rectangle of
virtual big screen that it displays, at least for a simple application,
unless it assumes running locally and being able to ask system utilities
like xrandr for such information (on linux, no idea if windows has a
pendant). These things would fail, if running remotely - e.g. over an
ssh X-forwarding tunnel.

Re: Discovery of displays on a multi-monitor system

<ubtvjg$1hr88$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12054&group=comp.lang.tcl#12054

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et99@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: Discovery of displays on a multi-monitor system
Date: Sun, 20 Aug 2023 14:12:15 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <ubtvjg$1hr88$1@dont-email.me>
References: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 20 Aug 2023 21:12:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4a827bdda54e25664973f6d3bcf9df7c";
logging-data="1633544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ejFzpXALF40lBByFb/eho"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:cZtAV/IkziFxkdIeuzcRos0PL9Y=
Content-Language: en-US
In-Reply-To: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
 by: et99 - Sun, 20 Aug 2023 21:12 UTC

On 8/19/2023 1:23 PM, Keith Nash wrote:
> A new toplevel can be created on any available screen by using the option -screen, e.g.
>
> toplevel .foo -screen :1.0
>
> Other per-screen operations use the option -displayof $WindowPath
> to specify the screen.
>
> Is there any command that returns a list of available screens?
>
> Keith.

If all else fails:

On linux, I would [exec] xrandr, and on windows, twapi::get_multiple_display_monitor_info

And then I would use [wm geom .foo <position>] after getting .foo setup.

where you would construct <position> based on the screen coordinates returned by one of the above two.

Re: Discovery of displays on a multi-monitor system

<EUednW2H6fc-BH75nZ2dnZfqn_SdnZ2d@brightview.co.uk>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12059&group=comp.lang.tcl#12059

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 21 Aug 2023 17:06:43 +0000
Date: Mon, 21 Aug 2023 18:06:43 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
From: k.j.nash@usa.net (Keith Nash)
Subject: Re: Discovery of displays on a multi-monitor system
Newsgroups: comp.lang.tcl
References: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Content-Language: en-US
In-Reply-To: <zCqdnXMVa94vuXz5nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <EUednW2H6fc-BH75nZ2dnZfqn_SdnZ2d@brightview.co.uk>
Lines: 52
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-EHDYOfWpVil3ydhj2rQvxsd1MHTnV+S3E+2DYm/1sMItSnL8reCyEJZm/DO+6fd7QemipxIBy2LvJbn!itZw2LByUq8HKLoDuYiGghTM0B6NfST7kzZrRAX7QYD8yECy5RzyATT7Xd7p3GdQmBJ0bOWtmC5Z!roGVTBPNl26kc//8ykC0xQZSF63P
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Keith Nash - Mon, 21 Aug 2023 17:06 UTC

Thanks to everyone for the suggestions.

Yes, common practice nowadays is to join multiple displays into a single
large virtual display. This seems to be how Windows and X11 work by
default. On X11 a genuinely independent display can be created with VNC
or forwarded with SSH.

Tk has aimed for full compatibility with multiple independent displays
as far back as Tk 4.0, and I am trying to preserve this facility while
revising part of the Tk library.

As Andreas Leitgeb mentioned, :0.1 is seldom seen these days. However,
different independent displays are numbered :0.0, :1.0 etc. There is no
guarantee that the display of the root window is :0.0, or that the
increment is 1. X11 displays forwarded by ssh begin at :10.0.

Ideally I would like a command

tk screens

that returns a Tcl list of available screen identifiers.

On X11, the closest I've found so far is a short C program from
stackoverflow which reads the contents of directory /tmp/.X11-unix and
then calls Xlib commands to examine each socket file.

https://stackoverflow.com/questions/11367354/obtaining-list-of-all-xorg-displays

(The code requires modification so it also examines listeners on TCP
ports 6000 upwards.)

It is possible to do the same thing in a Tcl script, but without access
to Xlib functions it is necessary to either [exec xdpyinfo] which might
not be installed, or guess that the obsolescent screen identifier for
each display is ".0".

Keith.

On 19/08/2023 21:23, Keith Nash wrote:
> A new toplevel can be created on any available screen by using the
> option -screen, e.g.
>
> toplevel .foo -screen :1.0
>
> Other per-screen operations use the option -displayof $WindowPath
> to specify the screen.
>
> Is there any command that returns a list of available screens?
>
> Keith.


devel / comp.lang.tcl / Discovery of displays on a multi-monitor system

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor