[Lazarus] Determining OS

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Mon Aug 1 11:58:33 CEST 2011


Graeme Geldenhuys wrote:
> On 31 July 2011 23:10, Marco van de Voort wrote:>> Any distro worth using should support the LSB standards. With that>> being said, you can use the 'lsb_release' command to find out exactly>> what distribution and version is being used.>> Not installed by default on Fedora 15:
> 
> I did say "a distro worth using".  ;-) Just kidding.
> 
> But thanks to all that replied regarding the lsb command. Clearly thevarious Linux distros still need to work on "standardization".

Noting your earlier comments on both lsb_release and xdg-open, the first 
thing I'd say is that it strikes me that xdg-open is specifically a 
desktop-related program, i.e. it might not be installed on "headless" 
systems. Taking that into account, I thought it worth taking a closer 
look at a number of systems.

Slackware x86 8.1 with desktop: neither lsb_release nor xdg-open.

Slackware x86 13.37 with desktop: no lsb_release, does have xdg-open.

Debian armel Lenny headless: neither lsb_release nor xdg-open.

Debian armel Lenny with desktop: neither lsb_release nor xdg-open.

Debian armel Squeeze with desktop: has lsb_release, no xdg-open.

Debian mipsel Squeeze with desktop: has lsb_release, no xdg-open.

Debian zSeries Lenny with desktop: neither lsb_release nor xdg-open.

Debian x86 Lenny with desktop: neither lsb_release nor xdg-open.

Debian x86 Squeeze with desktop: both lsb_release and xdg-open.

Debian SPARC Etch with desktop: both lsb_release and xdg-open.

Debian SPARC Lenny with desktop: both lsb_release and xdg-open.

Solaris (8 and 10) have neither lsb_release nor xdg-open as standard. 
Same probably applies to BSD.

I find this particularly disappointing since I've used and recommended 
xdg-open in the past, on the assumption that since it had appeared in 
some distreax and versions it would fairly rapidly be adopted by all. 
Mea culpa.

Debian can be recognised by the presence of /etc/apt/sources.list, and 
any version that's likely to be encountered will have the release name 
in the URLs it contains (older ones referenced 'stable' etc.).

Can somebody confirm this for Ubuntu? Are there comparable files for 
other distreax?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list