From 8de553f038aaea7d26cc726016e94e6566e76a6e Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 14 Jun 2013 19:04:34 +0000 Subject: [PATCH] Branch one: testing a small fix to enable turning off x check for fringe user cases, headless servers only --- inxi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 10abccd..883813e 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### Version: 1.9.8 #### Date: June 14 2013 -#### Patch Number: 00-b1 +#### Patch Number: 02-b1 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -247,6 +247,9 @@ A_X_DATA='' # -U and -! testing/advanced update options, as well as removing the -U help menu item B_ALLOW_UPDATE='true' B_ALLOW_WEATHER='true' +# this handles a fringe case where $DISPLAY is not null even though out of X, for headless +# server use only, change in inxi.conf file to 'false' +B_DO_X_CHECK='true' ## standard boolean flags ## B_BSD_RAID='false' B_COLOR_SCHEME_SET='false' @@ -679,7 +682,7 @@ main() color_scheme=$VIRT_TERM_COLOR_SCHEME fi else - if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $DISPLAY ]];then + if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $B_RUNNING_IN_X ]];then color_scheme=$IRC_X_TERM_COLOR_SCHEME elif [[ -n $IRC_CONS_COLOR_SCHEME && -z $DISPLAY ]];then color_scheme=$IRC_CONS_COLOR_SCHEME @@ -799,7 +802,7 @@ initialize_data() B_SCSI_FILE='true' fi - if [[ -n $DISPLAY ]];then + if [[ -n $DISPLAY && $B_DO_X_CHECK == 'true' ]];then B_SHOW_X_DATA='true' B_RUNNING_IN_X='true' fi