You are not logged in.

#21 2016-09-06 08:51:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,560
Website

Re: [DONE] RFT: notify-broadcast

Thanks! All this help is much appreciated.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#22 2016-09-06 11:07:14

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

Re: [DONE] RFT: notify-broadcast

HoaS wrote:

As an aside, is there a special trick for creating new users in BunsenLabs?

Several, options include:
change the SKEL= key in adduser.conf and manually edit the nitrogen config and gtk bookmarks
Make a copy of adduser.conf moify to suit your taste (skel, extragroups by default, whatever) and point adduser at it with the -c /path/to/my/conf/my.conf then edit as above
or
Use adduser in default mode login on a tty, and execute  /usr/lib/bunsen/configs/bl-user-setup before you startx (no subsequent editing)

None of which needs doing if you're using LightDM since that calls the above script post authentication and pre logon.

Basically if it hasn't previously done so bl-user-setup copies the bunsen skel over what adduser or useradd -m put in ~/ and seds through the nitrogen and gtk bookmark config files .


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#23 2016-09-06 18:10:08

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: [DONE] RFT: notify-broadcast

empty@TheLab:~$ w -hs
test1    tty1                       3:14  xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :1 vt1 -auth /tmp/serverauth.tbSIpBSGxH
empty    :0       :0               ?xdm?  /usr/bin/openbox --startup /usr/lib/x86_64-linux-gnu/openbox-autostart OPENBOX
test2    tty2                       3:00  xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :2 vt2 -auth /tmp/serverauth.tZQ723g0ke
test3    tty3                       2:49  xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :3 vt3 -auth /tmp/serverauth.YCwIDgWp2y
empty    pts/0    :0                2.00s w -hs
empty@TheLab:~$ for i in $(loginctl --no-legend list-sessions | awk '{print $1}');do loginctl show-session -p Name -p Active -p Remote -p Type -p Display "$i";echo '-----';done
Name=lightdm
Display=:0
Remote=no
Type=x11
Active=no
-----
Name=empty
Display=:0
Remote=no
Type=x11
Active=yes
-----
Name=test1
Display=
Remote=no
Type=tty
Active=no
-----
Name=test2
Display=
Remote=no
Type=tty
Active=no
-----
Name=test3
Display=
Remote=no
Type=tty
Active=no
-----
empty@TheLab:~$

@B_B: thanks for the detailed explanation, that certainly clears things up for me smile

Offline

#24 2016-09-07 05:39:02

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,560
Website

Re: [DONE] RFT: notify-broadcast

@HoaS thank you very much for bearing with me here.
I think we've established, pretty much, that neither 'w -hs' nor loginctl are going to find all the active X sessions for us.

I've only got one physical display screen, but right now am logged in via LightDM and another user tester is logged in via tty2 then ran startx, so two X sessions are running. 'hw -hs only shows a display number for tester if she has a terminal emulator window open!

(tester has no terminal emulator)

john@bunsen1:~$ w -hs
john     :0       :0               ?xdm?  /usr/bin/openbox --startup /usr/lib/x86_64-
tester    tty2                       3:03  xinit /etc/X11/xinit/xinitrc -- /etc/X11/xi
john     pts/0    :0                3.00s w -hs

(tester opens terminal, and the display number :1 becomes available)

john@bunsen1:~$ w -hs
john     :0       :0               ?xdm?  /usr/bin/openbox --startup /usr/lib/x86_64-
tester    tty2                       5:36  xinit /etc/X11/xinit/xinitrc -- /etc/X11/xi
john     pts/0    :0                1.00s w -hs
taeko    pts/1    :1               36.00s bash

In both cases loginctl shows tester as on a tty session, not active:

Name=tester
Display=
Remote=no
Type=tty
Active=no

This is consistent with the results you got, but not helpful neutral
Neither approach gives us a display number for a startx session with no terminal window open.

This script worked, because there were terminal emulator windows open, I guess.
Back to the discussion thread (I have a different idea)...

Thanks to everyone who helped here - I'll be back with a different version of notify-broadcast in due course, and a new thread.

/DONE


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB