New version, tarball. Very small update, added sddm id to dm detecfion. Because Arch linux,

at least on the system I got data from, is not using .pid/.lock extensions, but other systems
are, I'm adding sddm AND sddm.pid detection. This required changing the id to use explicit -f
for test, not the previous -e, which will force only files, not directories, to trigger yes case.

No other changes, but it's worth updating to this because distros may start using sddm in the not so
distant future, it's beta currently though.
This commit is contained in:
inxi-svn 2014-11-04 03:29:21 +00:00
parent 98ff2da9dc
commit ff7968377a
2 changed files with 24 additions and 5 deletions

11
inxi
View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.2.15 #### Version: 2.2.16
#### Date: 2014-10-12 #### Date: 2014-11-03
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -4856,8 +4856,9 @@ get_de_gtk_data()
get_display_manager() get_display_manager()
{ {
eval $LOGFS eval $LOGFS
# ldm - LTSP display manager # ldm - LTSP display manager. Note that sddm does not appear to have a .pid extension in Arch
local dm_id_list='entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid lightdm.pid lxdm.pid mdm.pid nodm.pid slim.lock tint2.pid wdm.pid xdm.pid' # note: to avoid positives with directories, test for -f explicitly, not -e
local dm_id_list='entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid lightdm.pid lxdm.pid mdm.pid nodm.pid sddm.pid sddm slim.lock tint2.pid wdm.pid xdm.pid'
local dm_id='' dm='' separator='' local dm_id='' dm='' separator=''
# note we don't need to filter grep if we do it this way # note we don't need to filter grep if we do it this way
local x_is_running=$( grep '/usr.*/X' <<< "$Ps_aux_Data" | grep -iv '/Xprt' ) local x_is_running=$( grep '/usr.*/X' <<< "$Ps_aux_Data" | grep -iv '/Xprt' )
@ -4865,7 +4866,7 @@ get_display_manager()
for dm_id in $dm_id_list for dm_id in $dm_id_list
do do
# note: ${dm_id%.*}/$dm_id will create a dir name out of the dm id, then test if pid is in that # note: ${dm_id%.*}/$dm_id will create a dir name out of the dm id, then test if pid is in that
if [[ -e /run/$dm_id || -e /run/${dm_id%.*}/$dm_id || -e /var/run/$dm_id ]];then if [[ -f /run/$dm_id || -f /run/${dm_id%.*}/$dm_id || -f /var/run/$dm_id ]];then
# just on the off chance that two dms are running, good info to have in that case, if possible # just on the off chance that two dms are running, good info to have in that case, if possible
dm=$dm$separator${dm_id%.*} dm=$dm$separator${dm_id%.*}
separator=',' separator=','

View file

@ -1,3 +1,21 @@
=====================================================================================
Version: 2.2.16
Patch Version: 00
Script Date: 2014-11-03
-----------------------------------
Changes:
-----------------------------------
New version, tarball. Very small update, added sddm id to dm detecfion. Because Arch linux,
at least on the system I got data from, is not using .pid/.lock extensions, but other systems
are, I'm adding sddm AND sddm.pid detection. This required changing the id to use explicit -f
for test, not the previous -e, which will force only files, not directories, to trigger yes case.
No other changes, but it's worth updating to this because distros may start using sddm in the not so
distant future, it's beta currently though.
-----------------------------------
-- Harald Hope - Mon, 03 Nov 2014 19:26:22 -0800
===================================================================================== =====================================================================================
Version: 2.2.15 Version: 2.2.15
Patch Version: 00 Patch Version: 00