Closed mremski closed 5 years ago
Confirmed this is working and committed.
In the future please open up a pull request instead of dumping the contents of a patch file into an issue. That makes it a ton easier to review/merge the changes without me having to manually copy text out of an issue, ensure the formatting did not get screwed up, and then do patch procedures by hand. GitHub handles all of that via the PR system.... ;-)
Describe the bug Typing "about" hangs for a long time and complains when it normally puts out the X config with: grep: /var/log/Xorg.0.0.log: No such file or directory
To Reproduce Steps to reproduce the behavior: Simply type in "about"
Expected behavior No hang, and info about X
Root cause is the DISPLAY variable and the cut command used at line 30 in /usr/local/bin/about. Previous versions of echo $DISPLAY would show :0 on a single display, but now show :0.0 so the command on line 30 sees 0.0 as "field 2" in the command. Changing the $(echo ${DISPLAY} | cut -d ":" -f 2) to $(echo ${DISPLAY} | cut -c 2) fixes it (NetMic2018 on Telegram posted this).
about also fails in a console (non-X session) and if run as root. X11 information should probably be gated by checking ${DISPLAY} being non zero length.
Patch for about: