[aur-general] Why /etc/issue starts with invisible chars?

Roman Kyrylych roman.kyrylych at gmail.com
Fri Mar 21 04:00:26 EDT 2008

2008/3/21, Lyman <lymanrb at gmail.com>:
> Hi, all
>  I found this issue when I was trying Sysmonitor in the package
>  screenlets because Sysmonitor can not show my distribution name correctly.
>  At the beginning I thought that it was a bug of screenlets, however,
>  when I dug into its source code, I realized that it could be a "bug"
>  introduced by Archlinux because the /etc/issue starts with some
>  invisible chars.
>  Here's the hexdump of /etc/issue in Archlinux. It is obviously that the
>  first line in this file is not the distribution name.
>  00000000  1b 5b 48 1b 5b 32 4a 0a  41 72 63 68 20 4c 69 6e
>  |.[H.[2J.Arch Lin|
>  00000010  75 78 20 28 43 6f 72 65  20 44 75 6d 70 29 20 20  |ux (Core
>  Dump)  |
>  00000020  5c 72 20 20 28 5c 6e 29  20 28 5c 6c 29 0a 0a     |\r  (\n)
>  (\l)..|
>  I've checked other two distribution, CentOS and Ubuntu (that's all I
>  have at the moment), both of them presents the their name in the first line.
>  I guess most of the applications just use the first line in /etc/issue
>  as distribution name (so do screenlets). I think Archlinux should comply
>  with "Rule of Least Surprise" on this issue. If the invisible chars are
>  just for clearing screen, we can do that from the second line.

We already do. :-)
/etc/issue is *not* a way to check for distribution name. Apps that do
this are wrong.
Most distros have /etc/distroname-release files as well (that contain
the version, that's why it's empty in Arch).
Good written apps check for *existence* of /etc/arch-release file to
know whether they are on Arch Linux.
See virtualbox's installer for example how a check for distribution
should be made.

Roman Kyrylych (Роман Кирилич)

More information about the aur-general mailing list