mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
small tweak added, if by some weird chance there's more than one dm, shows all of them, in comma separated list.
This might help debug certain odd issues where a user might not know this is the case, or forgot, or something else weird.
This commit is contained in:
parent
3821e2a16e
commit
ce04297c0f
6
inxi
6
inxi
|
@ -3395,13 +3395,15 @@ get_display_manager()
|
|||
{
|
||||
eval $LOGFE
|
||||
local dm_id_list='entrance/entranced.pid gdm.pid gdm3.pid kdm.pid lightdm.pid lxdm.pid mdm.pid nodm.pid slim.lock wdm.pid xdm.pid'
|
||||
local dm_id='' dm=''
|
||||
local dm_id='' dm='' separator=''
|
||||
local x_is_running=$( ps aux | grep '/usr.*/X' | grep -Eivc '(grep|/Xprt)' )
|
||||
|
||||
for dm_id in $dm_id_list
|
||||
do
|
||||
if [[ -e /var/run/$dm_id || -e /run/$dm_id ]];then
|
||||
dm=$( basename $dm_id | cut -d '.' -f 1 )
|
||||
# just on the off chance that two dms are running, good info to have in that case, if possible
|
||||
dm=$dm$separator$( basename $dm_id | cut -d '.' -f 1 )
|
||||
separator=','
|
||||
fi
|
||||
done
|
||||
# might add this in, but the rate of new dm's makes it more likely it's an unknown dm, so
|
||||
|
|
Loading…
Reference in a new issue