Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there an authoritative way to get the GNOME version, as long as I have a working GNOME desktop (any version) running? Several of these suggestions don't work on my system, either because the executables and/or packages simply don't exist or the menu item isn't available.

share|improve this question
add comment

3 Answers

If you launch gnome-system-monitor it shows the version in the dialog:

% gnome-system-monitor

My aging Fedora 14 box

            ss of monitor dialog fedora

Ubuntu 12.04

             ss of monitor dialog ubuntu

share|improve this answer
add comment

Gnome 3 version is stored in this file:

/usr/share/gnome/gnome-version.xml

content (on my system):

<?xml version="1.0" encoding="UTF-8"?>
<gnome-version>
 <platform>3</platform>
 <minor>6</minor>
 <micro>2</micro>
 <distributor>Arch Linux</distributor>
 <date>2012-11-13</date>
</gnome-version>

The file is part of the package gnome-desktop.

Gnome developers use this file to get the DE version number and display it in various Gnome utilities like System Monitor, System Settings (aka gnome-control-center) etc.
So getting Gnome version "the official way" means parsing the said file and extracting platform, minor and micro values.

If you play with that file you can instantly see the results :)

enter image description here

In Gnome 2 the file in question is:

/usr/share/gnome-about/gnome-version.xml

(note that this file might be missing on some older Gnome 2 versions IIRC)


Note that commands like gnome-session --version, gnome-shell --version etc, report the right Gnome version only if they have the same version as gnome-desktop, which is not always the case.

share|improve this answer
add comment

Try gnome-session --version. There is a man page for it on my Debian (namely GNOME-SESSION(1)) but the --version option is not listed. Well, for me it says gnome-session 3.4.2.1.

You can run it in the console

DISPLAY=":0" gnome-session --version

(possibly having to change the display).

share|improve this answer
    
This reports 3.2.1, and gnome-system-monitor reports 3.4.2, so it doesn't look right. And my distro is fully up to date. –  l0b0 Apr 22 '13 at 5:33
    
See don_crissti's answer. On my system, /usr/share/gnome/gnome-version.xml has 3.4.2 in it. gnome-session --version reports 3.4.2. gnome-system-monitor reports 3.4.1. based on that and a rough morning I'd say gnome-system-monitor is junk. Further exploring shows that the gnome-system-monitor version (not the gnome version) is 3.4.1.... so that's what that's reporting. Further exploration in my package manager, shows that I have, even with an up-to-date system, a mixture of 3.4.0 (gnome-common), 3.4.1 (gnome-shell) and 3.4.2(gnome-desktop3, gnome-session etc.) components. –  SuperMagic Apr 22 '13 at 11:47
    
@SuperMagic: Those numbers are fairly consistent, although it is irritating not to be able to get a definite answer. My /usr/share/gnome/gnome-version.xml says 3.4.2, but gnome-session --version says 3.4.2.1 so that's sort of correct (?). Maybe the morale of all of this is that the version isn't holy; it is just a number. –  Emanuel Berg Apr 22 '13 at 22:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.