On Thu, 10 Oct 2019 11:01:58 +1100, Doug Laidlaw wrote:
Can you please give me the sig line that pulls in this info?
That is not a line. it is a few lines in a script usually executed
during login.
BitTwister gave it to me long ago, but I have lost it.
#!/bin/bash #***********************************************************************
#* gen_sig_file.sh - generate $HOME/.signature file Version 1.0
#*
#* Automatically overwrites $HOME/.signature on each login
#* with basic information about your setup.
#*
#* When you post to Usenet your Usenet client can append it to your
#* post which helps respondents to provide more detailed replies.
#*
#* You need to place the script somewhere in your $PATH environment.
#* echo $PATH to see possible locations.
#*
#* Save as gen_sig_file.sh
#* chmod +x gen_sig_file.sh
#*
#* Script Test Procedure:
#* gen_sig_file.sh
#* cat $HOME/.signature
#*
#* Install:
#* For all users:
#* cp gen_sig_file.sh /etc/profile.d
#* or put a link in /etc/profile.d back to gen_sig_file.sh
#* that everyone can read/execute.
#*
#* For a single user:
#* echo $PATH to see possible locations.
#*
#* put $HOME/wherever/gen_sig_file.sh location in user's shell's
#* startup script, for example ~/.bash_profile or ~/.bashrc
#*
#* Login test:
#* click up a terminal
#* su - $USER
#* cat $HOME/.signature
#*
#* Modify your Usenet client to add/append $HOME/.signature
#* to your posts and post a message in one of the Usenet test groups
#* to verify it works as desired.
#*
#***********************************************************************
Sig_fn=$HOME/.signature
DM=""
DISTRO=""
set $(lsb_release -d | grep Description)
if [ $# -gt 1 ] ; then
shift
DISTRO="$@"
fi
if [ -e /etc/sysconfig/desktop ] ; then
. /etc/sysconfig/desktop
dm="DM=$DISPLAYMANAGER"
fi
if [ -e /etc/release ] ; then
DISTRO=$(cat /etc/release)
fi
set -- $(systemctl status display-manager.service | grep PID:)
Greeter=$(echo $4 | tr -d '() ')
echo -en "-- \nRunning " > $Sig_fn
echo "$DISTRO " >> $Sig_fn
echo "$(uname -r) on $(uname -m) Greeter=$Greeter $DM DE=$XDG_SESSION_DESKTOP" >> $Sig_fn
#***********end gen_sig_file.sh ***************************
--- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
* Origin: A noiseless patient Spider (2:250/1@fidonet)