experchange > linux.setup

J.B. Wood (08-05-19, 02:10 PM)
Hello, everyone. I've been a long-time Fedora w/Gnome desktop user.
I'm currently using Fedora 29 and Gnome 3.30.2. Many versions ago
Fedora/Gnome had a "greeter" capability to display a GUI text banner
along with the user(s) logon name/passwd prompt(s). For console logins
using the /etc/issue accomplishes this but then requires the user to use
startx to launch the GUI. (In Windows 10, the text warning banner is
easily accomplished via a few registry entries.)

Does anyone know of a technique to accomplish a GUI Fedora warning
banner (e.g. "Use of this computer is restricted to...")? Thanks for
your time and comment. Sincerely,
Robert Heller (08-05-19, 05:35 PM)
At Mon, 5 Aug 2019 08:10:43 -0400 "J.B. Wood" <arl_123234> wrote:

> Hello, everyone. I've been a long-time Fedora w/Gnome desktop user.
> I'm currently using Fedora 29 and Gnome 3.30.2. Many versions ago
> Fedora/Gnome had a "greeter" capability to display a GUI text banner
> along with the user(s) logon name/passwd prompt(s). For console logins
> using the /etc/issue accomplishes this but then requires the user to use
> startx to launch the GUI. (In Windows 10, the text warning banner is
> easily accomplished via a few registry entries.)
> Does anyone know of a technique to accomplish a GUI Fedora warning
> banner (e.g. "Use of this computer is restricted to...")? Thanks for
> your time and comment. Sincerely,


Look at /etc/gdm3/greeter.dconf-defaults

You configure the greeter.dconf using the dconf editor.
J.B. Wood (08-05-19, 06:06 PM)
On 8/5/19 11:35 AM, Robert Heller wrote:
> Look at /etc/gdm3/greeter.dconf-defaults
> You configure the greeter.dconf using the dconf editor.


Thanks for the prompt reply, Robert. I don't see a "gdm3" directory in
/etc, only a "gdm" directory and there is no greeter.dconf-defaults file
there. This file does exist in /usr/share/gdm, however. Sincerely,
Eli the Bearded (08-05-19, 08:36 PM)
In comp.os.linux.misc, J.B. Wood <arl_123234> wrote:
> Thanks for the prompt reply, Robert. I don't see a "gdm3" directory in
> /etc, only a "gdm" directory and there is no greeter.dconf-defaults file
> there. This file does exist in /usr/share/gdm, however. Sincerely,


So you've got /etc/issue for text mode console and greeter.dconf for gui
mode console, whatcha gonna do for ssh logins?

Answer: use the Banner setting in /etc/ssh/sshd_config. It takes a
filename, and the contents of that will be shown before login.

Elijah
------
considers it a fun novelty but not really useful
Robert Heller (08-05-19, 09:17 PM)
At Mon, 5 Aug 2019 12:06:13 -0400 "J.B. Wood" <arl_123234> wrote:

> On 8/5/19 11:35 AM, Robert Heller wrote:
> > Look at /etc/gdm3/greeter.dconf-defaults
> > You configure the greeter.dconf using the dconf editor.

> Thanks for the prompt reply, Robert. I don't see a "gdm3" directory in
> /etc, only a "gdm" directory and there is no greeter.dconf-defaults file
> there. This file does exist in /usr/share/gdm, however. Sincerely,


OK, Ubuntu 18.04 != Fedora 29 :-). Different distros... But that would be the
file to mess with. (Actually you need to munge it into the DConf db -- there
is babble in the man pages for that...)
David W. Hodgins (08-05-19, 10:34 PM)
On Mon, 05 Aug 2019 14:36:34 -0400, Eli the Bearded <*> wrote:

> Answer: use the Banner setting in /etc/ssh/sshd_config. It takes a
> filename, and the contents of that will be shown before login.


Interesting idea, in that I could put escape codes in the file shown
that would change the foreground and/or background colours with different
ones on different systems, however it would have the problem of leaving
those colours set on exiting from the ssh session, as there is no option
to display a file on exiting.

I normally leave a konsole session open at all times. As this is the first
time I've made this mistake in at least a decade, I've decided to just get
into the habit of closing all konsole sessions, when not currently in use.
In this case, I'd closed the wrong konsole session (a localhost one, instead
of the one ssh connected), so closing both would have prevented the problem.

Regards, Dave Hodgins
Robert Heller (08-05-19, 10:47 PM)
At Mon, 05 Aug 2019 16:34:15 -0400 "David W. Hodgins" <dwhodgins> wrote:

> On Mon, 05 Aug 2019 14:36:34 -0400, Eli the Bearded <*> wrote:
> Interesting idea, in that I could put escape codes in the file shown
> that would change the foreground and/or background colours with different
> ones on different systems, however it would have the problem of leaving
> those colours set on exiting from the ssh session, as there is no option
> to display a file on exiting.


Assumes the users are using "color" terminals, etc. Not really a good idea
*unless* you are sure of what hardware and software your users are using.
Generally, this is a really *bad* idea.
[..]
David W. Hodgins (08-05-19, 11:36 PM)
On Mon, 05 Aug 2019 16:47:27 -0400, Robert Heller <heller> wrote:

> Assumes the users are using "color" terminals, etc. Not really a good idea
> *unless* you are sure of what hardware and software your users are using.
> Generally, this is a really *bad* idea.


All of the computers involved are on my local lan, and I'm the only user.
They are all running versions of Mageia linux. Some Mageia 6, some Mageia 7,
with a mix of i586 and x86_64 installs. I'm on the qa team for Mageia, so
it's handy to have them all available for testing things such as kernel
updates that have to be tested both on real hardware, and in virtualbox and
xen guests.

Regards, Dave Hodgins
Eli the Bearded (08-06-19, 01:02 AM)
In comp.os.linux.misc, David W. Hodgins <dwhodgins> wrote:
> On Mon, 05 Aug 2019 14:36:34 -0400, Eli the Bearded <*> wrote:
> Interesting idea, in that I could put escape codes in the file shown
> that would change the foreground and/or background colours with different
> ones on different systems, however it would have the problem of leaving
> those colours set on exiting from the ssh session, as there is no option
> to display a file on exiting.


Escape codes for a terminal when you don't know what the terminal is is
bad form. How hard, really, is a just a plain text message about who can
use the machine?

If you want to change colors on login / exit, consider using .login /
..logout controls; those files will be able to access terminal type. But
..logout won't run on a connection that just dies, and .profile outputing
text for non-interactive logins will break, eg, scp. The sshd Banner
method will be printed for scp (and will not break scp).

In sh like shells, you can use code like this for only setting things
during interactive sessions:

case "$-" in *i*) # only run on interactive shells
case "$TERM" in
*xterm*) : xterm settings ;;
linux) : console settings ;;
tvi925) : TeleVideo 925 settings ;;
*) : fallback terminal settings -- probably best none ;;
esac # case "$TERM"
;; esac

> I normally leave a konsole session open at all times. As this is the first
> time I've made this mistake in at least a decade, I've decided to just get
> into the habit of closing all konsole sessions, when not currently in use.


Not sure how konsole relates to my suggesion.

Elijah
------
"console" is being (faking) right in front of the computer as opposed to remote
Bit Twister (08-06-19, 02:26 AM)
On Mon, 05 Aug 2019 16:34:15 -0400, David W. Hodgins wrote:
> On Mon, 05 Aug 2019 14:36:34 -0400, Eli the Bearded <*> wrote:
> Interesting idea, in that I could put escape codes in the file shown
> that would change the foreground and/or background colours with different
> ones on different systems, however it would have the problem of leaving
> those colours set on exiting from the ssh session, as there is no option
> to display a file on exiting.


Use ~/.bash_logout to do whatever you like at that point. I test the
environment variable SSH_CLIENT to make decisions about what to do
during log in/out.
J.B. Wood (08-06-19, 12:39 PM)
On 8/5/19 2:36 PM, Eli the Bearded wrote:

> So you've got /etc/issue for text mode console and greeter.dconf for gui
> mode console, whatcha gonna do for ssh logins?
> Answer: use the Banner setting in /etc/ssh/sshd_config. It takes a
> filename, and the contents of that will be shown before login.
> Elijah
> ------
> considers it a fun novelty but not really useful


Hello, and yes, I've been aware of that and am configured as such.
Sincerely,
Similar Threads