This was reported on the Arch Linux bugtracker but it's an upstream issue, so I'm reporting it here. I think appeared by the xinit git tag xinit-1.3.4 . I think would've been introduced by commit http://cgit.freedesktop.org/xorg/app/xinit/commit/?id=44915d6953076849b69a017f6fc8234b0f254362 . --- https://projects.archlinux.org/svntogit/packages.git/tree/trunk/git-upstream-fixes.patch?h=packages/xorg-xinit#n378 + tty_num=$(echo "$tty" | grep -oE '[0-9]+$') If GREP_OPTIONS has color=always set, then this uses coloured grep output, meaning $tty_num carries colour information in `vtarg="vt$tty_num"`. To resolve: - tty_num=$(echo "$tty" | grep -oE '[0-9]+$') + tty_num=$(echo "$tty" | grep --color=never -oE '[0-9]+$') --- Some people reported a problem on the Arch Linux Forum: https://bbs.archlinux.org/viewtopic.php?id=186382 While it's not yet entirely sure that it's due to this issue I think it may well be. An error that was posted there contains: ~~~ Command line argument number 4 contains unprintable characters ~~~ Thanks
The Arch bugreport: https://bugs.archlinux.org/task/41776
--color=never is not portable to all OS'es we support. Perhaps we should just unset GREP_OPTIONS instead? (Though perhaps that doesn't matter since the grep usage is inside of an #ifdef __linux__ block in the xinit script.)
Unsetting seems viable to me as well. Maybe I can do some more testing tomorrow. Thanks
Hi, Just tuning in to this bug report. TBH my initial gut instinct to this is to close it as NOTABUG. If you set GREP_OPTIONS to color=always then you deserve all the problems you get because of that. Just do not do that, it will likely break tons and tons of scripts everywhere. grep output is not supposed to be in color when run in a pipe, forcing it to be in color in that case is just plain stupid. Regards, Hans
Ok, I just tested and setting GREP_OPTIONS to --color=always effectively leads to exactly the error message I posted above and hinders X from starting. Now, as to whether this should be considered a bug or not, this is of course somehow up to you (developers) to decide. To clarify, I was not affected by this, but was trying to help someone who posted on our Arch forum. We (people trying to help others on the forum) are just affected by this in the way that we get problems posted on the forum, with an error message, as posted above, and we're trying to figure out what's wrong... Of course we are glad if potential issues can be prevented from happening at all, as far as possible or meaningful. Freely: "Everything that can fail, will fail." OTOH we may all benefit from such issues by learning. Regards & Thanks
GREP_OPTIONS has been deprecated by grep upstream.
Perhaps grep could be dropped entirely and instead do: tty_num=${tty#/dev/tty}
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xinit/issues/6.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.