Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.os.linux > #271

Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc

From "J.O. Aho" <user@example.net>
Newsgroups alt.comp.os.linux, alt.os.linux, uk.comp.os.linux
Subject Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc
Date 2018-10-01 21:50 +0200
Message-ID <g1fc3lFo52jU1@mid.individual.net> (permalink)
References <potnmf$15oq$1@gioia.aioe.org> <potsb2$1e8q$1@gioia.aioe.org>

Cross-posted to 3 groups.

Show all headers | View raw


On 10/1/18 9:25 PM, Java Jive wrote:

> As per subject, the usual methods of determining the distro don't give
> very useful info.  I can work out the release easily enough ...
> 
>     RELEASE="$(lsb_release -r -s | awk -F '.' '{print $1}')"
> 
> ... but differentiating between Ubuntu and, say, XUbuntu, is not easy,
> and this makes it very difficult to write a script that customises the
> login screen, etc:
> 
> XUbuntu 14 & 18:
> 
>     lsb_release -i -s
>     Ubuntu

As I don't use ubunt/xubuntu, but you could try with "lsb_release -d"
and see if you get a bit more information from there that you can
distinguish xubuntu from ubuntu, of course this string may look
completely different between releases/distros that it may be not
possible to make a simple sed/awk to get the data you want.


>     uname -a
>     (ubuntu again)
> 
>     cat /etc/*-release
>     (ubuntu again)
> 
>     cat /proc/version
>     (ubuntu again)

This should be the same as you do get with uname.


> Both Ubuntu in an Xfce session and XUbuntu have "About Xfce" in the main
> menu, so that's no good either.  XUbuntu 14 has a couple of XUbuntu
> entries in the menu, but they're not there on XUbuntu 18, so again that
> fails.
> 
> Er, what do I try now?

Look at the repository for the packages (apt), there should be one for
xubuntu specific packages which should be lacking for ubuntu.

-- 

 //Aho

Back to alt.comp.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Java Jive <java@evij.com.invalid> - 2018-10-01 19:06 +0100
  Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc William Unruh <unruh@invalid.ca> - 2018-10-01 18:27 +0000
  Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Java Jive <java@evij.com.invalid> - 2018-10-01 20:25 +0100
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Java Jive <java@evij.com.invalid> - 2018-10-01 20:42 +0100
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc "J.O. Aho" <user@example.net> - 2018-10-01 21:50 +0200
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Jasen Betts <jasen@xnet.co.nz> - 2018-10-01 19:51 +0000
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Theo <theom+news@chiark.greenend.org.uk> - 2018-10-02 10:25 +0100
      Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Martin Gregorie <martin@mydomain.invalid> - 2018-10-02 10:44 +0000
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc J G Miller <miller@yoyo.org> - 2018-12-28 22:04 +0000
      Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Eef Hartman <E.J.M.Hartman@gmail.com> - 2018-12-29 01:13 +0000
    Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc "Carlos E.R." <robin_listas@es.invalid> - 2018-12-29 03:54 +0100
      Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Martin Gregorie <martin@mydomain.invalid> - 2019-02-08 18:53 +0000
        Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Mike Easter <MikeE@ster.invalid> - 2019-02-08 11:20 -0800
          Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Mike Easter <MikeE@ster.invalid> - 2019-02-08 12:15 -0800
          Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Martin Gregorie <martin@mydomain.invalid> - 2019-02-08 20:54 +0000
            Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc Mike Easter <MikeE@ster.invalid> - 2019-02-08 13:02 -0800
        Re: How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc "Carlos E.R." <robin_listas@es.invalid> - 2019-02-09 05:43 +0100

csiph-web