From ce04297c0f52cbff119aa0bfad6084ed3a803a3f Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 24 Jun 2012 07:45:22 +0000 Subject: [PATCH] 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. --- inxi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 9a6f376..a81dea7 100755 --- a/inxi +++ b/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