Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.linux > #267 > unrolled thread
| Started by | Java Jive <java@evij.com.invalid> |
|---|---|
| First post | 2018-10-01 19:06 +0100 |
| Last post | 2019-02-09 05:43 +0100 |
| Articles | 17 — 10 participants |
Back to article view | Back to alt.comp.os.linux
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
| From | Java Jive <java@evij.com.invalid> |
|---|---|
| Date | 2018-10-01 19:06 +0100 |
| Subject | How, in a script, to differentiate between Ubuntu and XUbuntu, LUbuntu, etc |
| Message-ID | <potnmf$15oq$1@gioia.aioe.org> |
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:
XUbuntu 14 & 18:
lsb_release -i -s
Ubuntu
uname -a
(ubuntu again)
cat /etc/*-release
(ubuntu again)
cat /proc/version
(ubuntu again)
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?
[toc] | [next] | [standalone]
| From | William Unruh <unruh@invalid.ca> |
|---|---|
| Date | 2018-10-01 18:27 +0000 |
| Message-ID | <pototj$lcd$1@dont-email.me> |
| In reply to | #267 |
On 2018-10-01, Java Jive <java@evij.com.invalid> 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:
>
> XUbuntu 14 & 18:
>
> lsb_release -i -s
> Ubuntu
>
> uname -a
> (ubuntu again)
>
> cat /etc/*-release
> (ubuntu again)
>
> cat /proc/version
> (ubuntu again)
>
> 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?
Perhaps if you told us why you care-- why you do not just treat them as
the same-- someone might be able to give more useful advice.
[toc] | [prev] | [next] | [standalone]
| From | Java Jive <java@evij.com.invalid> |
|---|---|
| Date | 2018-10-01 20:25 +0100 |
| Message-ID | <potsb2$1e8q$1@gioia.aioe.org> |
| In reply to | #267 |
Sorry, meant to post this to a different Linux group, and cross-post it
to another, but having posted it here, might as well continue.
Apologies for those who see this twice ...
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
uname -a
(ubuntu again)
cat /etc/*-release
(ubuntu again)
cat /proc/version
(ubuntu again)
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?
[toc] | [prev] | [next] | [standalone]
| From | Java Jive <java@evij.com.invalid> |
|---|---|
| Date | 2018-10-01 20:42 +0100 |
| Message-ID | <pottac$1g3b$1@gioia.aioe.org> |
| In reply to | #269 |
On 01/10/2018 20:25, 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:
This seems to work:
DISTRO="$(grep -i cdrom /etc/apt/sources.list | sed -r
's~^#deb\s+cdrom:\[([A-Za-z]+)\s+.*$~\1~')"
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2018-10-01 21:50 +0200 |
| Message-ID | <g1fc3lFo52jU1@mid.individual.net> |
| In reply to | #269 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2018-10-01 19:51 +0000 |
| Message-ID | <pottr6$mp9$2@gonzo.alcatraz> |
| In reply to | #269 |
On 2018-10-01, Java Jive <java@evij.com.invalid> wrote:
> Sorry, meant to post this to a different Linux group, and cross-post it
> to another, but having posted it here, might as well continue.
> Apologies for those who see this twice ...
>
> 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}')"
Yeah they are all re-badged ubuntu.
There's probably something in /etc/alternatives (look at where the
links point, of course this is reconfigurable)
readlink /etc/alternatives/x-session-manager
might be a good start.
Or you could look for comments (or entries for physical media) at the head of /etc/apt/sources-list
--
ت
[toc] | [prev] | [next] | [standalone]
| From | Theo <theom+news@chiark.greenend.org.uk> |
|---|---|
| Date | 2018-10-02 10:25 +0100 |
| Message-ID | <scl*F5m7w@news.chiark.greenend.org.uk> |
| In reply to | #269 |
In uk.comp.os.linux Java Jive <java@evij.com.invalid> wrote: > 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. Look for the presence of ubuntu-desktop, xubuntu-desktop, kubuntu-desktop, etc packages. Since it's all the same distro underneath, the user is free to install multiple desktops on the same machine so you might have more than one. If you don't, it indicates what system was originally installed. But each 'spin' is mostly about setting the list of default installed packages, so a system can drift away from that list over time. Theo
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2018-10-02 10:44 +0000 |
| Message-ID | <povi76$22b$1@news.albasani.net> |
| In reply to | #273 |
On Tue, 02 Oct 2018 10:25:18 +0100, Theo wrote: > In uk.comp.os.linux Java Jive <java@evij.com.invalid> wrote: >> 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. > > Look for the presence of ubuntu-desktop, xubuntu-desktop, > kubuntu-desktop, etc packages. > > Since it's all the same distro underneath, the user is free to install > multiple desktops on the same machine so you might have more than one. > If you don't, it indicates what system was originally installed. But > each 'spin' is mostly about setting the list of default installed > packages, so a system can drift away from that list over time. > The main differences I've noticed are the maintenance package (apt vs dnf) and the archive format used. It would be nice if there was a bit more commonality between desktops, though, especially when you look at the shedload of similar packages each of them seems to want to clutter your filing system with <cough>..<cough> kde <cough> -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | J G Miller <miller@yoyo.org> |
|---|---|
| Date | 2018-12-28 22:04 +0000 |
| Message-ID | <q066km$to8$1@dont-email.me> |
| In reply to | #269 |
On Monday, October 1st, 2018, at 20:25:22h +0100, Java Jive wrote: > ... but differentiating between Ubuntu and, say, XUbuntu, is not easy, Indeed not, because they are both Ubuntu and the real difference is between which desktop (window manager + associated widget related packages) are installed. However, the packagers of the different flavors usually go to a lot of trouble in identifying their particular flavor for the grub menu (because if you have various GNU/Linux flavors installed you need to be able to easily see which one is Gnome, KDE, XFCE, Edubuntu, Mint, 32bit or 64 bit you are selecting to boot) so you could check the menuentry items in /boot/grub/grub.cfg for specific identifiers. Do not forget that grub.cfg is actually created from the various components in /etc/grub.d/* when grub-update is run, so it could be useful to look at the scripts, particularly 10_linux or any earlier numbered one specific to ubuntu (or flavor thereof) there to get an idea of how to uniquely identify the system flavor.
[toc] | [prev] | [next] | [standalone]
| From | Eef Hartman <E.J.M.Hartman@gmail.com> |
|---|---|
| Date | 2018-12-29 01:13 +0000 |
| Message-ID | <5c26ca1f$0$22362$e4fe514c@news.xs4all.nl> |
| In reply to | #314 |
In alt.comp.os.linux J G Miller <miller@yoyo.org> wrote: > On Monday, October 1st, 2018, at 20:25:22h +0100, Java Jive wrote: >> ... but differentiating between Ubuntu and, say, XUbuntu, is not easy, > > Indeed not, because they are both Ubuntu and the real difference is > between which desktop (window manager + associated widget related > packages) are installed. As the _default_ DE, it is well possible to install multiple DE's. I.e. on my system I'v got xfce as default but kde as fall-back. In fact I use the Kde Display Manager (kdm) to start either of them, the default being set in the file $HOME/.dmrc
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2018-12-29 03:54 +0100 |
| Message-ID | <c84jff-f6d.ln1@Telcontar.valinor> |
| In reply to | #269 |
On 01/10/2018 21.25, Java Jive wrote: > Sorry, meant to post this to a different Linux group, and cross-post it > to another, but having posted it here, might as well continue. Apologies > for those who see this twice ... > > As per subject, the usual methods of determining the distro don't give > very useful info. I can work out the release easily enough ... > ... > cat /etc/*-release > (ubuntu again) This is the cross-distribution current method, parsing /etc/os-release. If all those *buntu flavours yield the same result, it is because they are intended to be the same distribution. What desktop they use by default is irrelevant. -- Cheers, Carlos.
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2019-02-08 18:53 +0000 |
| Message-ID | <q3kj74$v13$1@news.albasani.net> |
| In reply to | #316 |
On Sat, 29 Dec 2018 03:54:36 +0100, Carlos E.R. wrote: > This is the cross-distribution current method, parsing /etc/os-release. > If all those *buntu flavours yield the same result, it is because they > are intended to be the same distribution. What desktop they use by > default is irrelevant. Does parsing /proc/version do any better? It looks potentially useful for Fedora, where it shows the Fedora version and build as well as the kernel version, so probably distinguishes it from RHEL, but totally useless for RaspberryPi, where it only shows the kernel version. FWIW both also identify the gcc version . -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | Mike Easter <MikeE@ster.invalid> |
|---|---|
| Date | 2019-02-08 11:20 -0800 |
| Message-ID | <gc6332FhroU1@mid.individual.net> |
| In reply to | #334 |
Martin Gregorie wrote: > Carlos E.R. wrote: > >> This is the cross-distribution current method, parsing /etc/os-release. >> If all those *buntu flavours yield the same result, it is because they >> are intended to be the same distribution. What desktop they use by >> default is irrelevant. > > Does parsing /proc/version do any better? > > It looks potentially useful for Fedora, where it shows the Fedora version > and build as well as the kernel version, so probably distinguishes it > from RHEL, but totally useless for RaspberryPi, where it only shows the > kernel version. > > FWIW both also identify the gcc version . > You could dissect/examine/parse the inxi script to see what its System option inxi -S ... uses. Eg Mint 19.1 Cinnamon: $ inxi -S System: Host: mint Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: Cinnamon 4.0.8 Distro: Linux Mint 19.1 Tessa https://github.com/smxi/inxi -- Mike Easter
[toc] | [prev] | [next] | [standalone]
| From | Mike Easter <MikeE@ster.invalid> |
|---|---|
| Date | 2019-02-08 12:15 -0800 |
| Message-ID | <gc66a5F16rqU1@mid.individual.net> |
| In reply to | #335 |
Mike Easter wrote:
> You could dissect/examine/parse the inxi script to see what its System
> option
>
> inxi -S
>
> ... uses.
Ub 18.04.1 Mate
$ inxi -S
System: Host: ubuntu-mate Kernel: 4.15.0-29-generic x86_64 bits: 64
Desktop: MATE 1.20.1 Distro: Ubuntu 18.04.1 LTS
--
Mike Easter
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2019-02-08 20:54 +0000 |
| Message-ID | <q3kqao$obp$3@news.albasani.net> |
| In reply to | #335 |
On Fri, 08 Feb 2019 11:20:01 -0800, Mike Easter wrote: > Martin Gregorie wrote: >> Carlos E.R. wrote: >> >>> This is the cross-distribution current method, parsing >>> /etc/os-release. >>> If all those *buntu flavours yield the same result, it is because they >>> are intended to be the same distribution. What desktop they use by >>> default is irrelevant. >> >> Does parsing /proc/version do any better? >> >> It looks potentially useful for Fedora, where it shows the Fedora >> version and build as well as the kernel version, so probably >> distinguishes it from RHEL, but totally useless for RaspberryPi, where >> it only shows the kernel version. >> >> FWIW both also identify the gcc version . >> > You could dissect/examine/parse the inxi script to see what its System > option > > inxi -S > > ... uses. Eg Mint 19.1 Cinnamon: > > $ inxi -S System: > Host: mint Kernel: 4.15.0-20-generic x86_64 bits: 64 Desktop: > Cinnamon 4.0.8 Distro: Linux Mint 19.1 Tessa > > Its a supported package, 'inxi', for Fedora systems. Installed. Looks good. -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | Mike Easter <MikeE@ster.invalid> |
|---|---|
| Date | 2019-02-08 13:02 -0800 |
| Message-ID | <gc693cF1r1aU1@mid.individual.net> |
| In reply to | #337 |
Martin Gregorie wrote: > Mike Easter wrote: > >> You could dissect/examine/parse the inxi script to see what its System >> option >> >> inxi -S >> >> ... uses. >> > Its a supported package, 'inxi', for Fedora systems. Installed. Looks > good. > I LUV inxi. Troubleshooting network inxi -Nni ... even gives the WAN IP. Of course you could also get that with curl icanhazip.com Check out whatall inxi -h offers. -- Mike Easter
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2019-02-09 05:43 +0100 |
| Message-ID | <5d22jf-ejs.ln1@Telcontar.valinor> |
| In reply to | #334 |
On 08/02/2019 19.53, Martin Gregorie wrote: > On Sat, 29 Dec 2018 03:54:36 +0100, Carlos E.R. wrote: > >> This is the cross-distribution current method, parsing /etc/os-release. >> If all those *buntu flavours yield the same result, it is because they >> are intended to be the same distribution. What desktop they use by >> default is irrelevant. > > Does parsing /proc/version do any better? > > It looks potentially useful for Fedora, where it shows the Fedora version > and build as well as the kernel version, so probably distinguishes it > from RHEL, but totally useless for RaspberryPi, where it only shows the > kernel version. > > FWIW both also identify the gcc version . On openSUSE it only displays kernel version, in detail: Linux version 4.12.14-lp150.12.45-default (geeko@buildhost) (gcc version 7.3.1 20180323 [gcc-7-branch revision 258812] (SUSE Linux) ) #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) That it says "SUSE Linux" only means that the kernel says so. It may be about the machine where the kernel was compiled. -- Cheers, Carlos.
[toc] | [prev] | [standalone]
Back to top | Article view | alt.comp.os.linux
csiph-web