wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Command to find out Linux desktop version? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Command to find out Linux desktop version?" Watch "Command to find out Linux desktop version?" New topic
Author

Command to find out Linux desktop version?

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
Hi all,

I am using Red Hat Linux 4.0. I want a command to know that I am usig Red Hat Linux 4.0. When I use the command,

uname -a

it gives the kernel version. But what is the command to find out the Linux Desktop Version i.e. I want a command that prints Red Hat Linux version 4.0

Thanks,
Guru
Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 272
I have found out one way.

cat /etc/redhat-release
This prints out the linux release.

But, I am looking for a command, because anyone can modify this file.


Thanks,
Guru
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
Hey Guru,

The /etc/redhat-release file should be owned by root, with only root having modify permissions. So I wouldn't worry too much about the file changing. If you think about it, this file was probably added for exactly the purpose you are describing. That is, there is no standard Linux command to get Distribution specific information.

Darrin


Life is good on the Ponderosa,<br />but mind where you step.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

It's true. Only root should be able to modify the /etc/redhat-release file. However, some releases of Oracle were known to check that file to see if the system was running an Oracle-supported release. Since Oracle doesn't support Fedora, people would temporarily modify the /etc/redhat-release file to make it present an Oracle-blessed release name while the installer ran if they wanted to play with Oracle on a Fedora box.

Some confusion here: The OS release is NOT the distro release, and neither of the above are "desktop" releases. The uname command lists the OS (kernel) release, the /etc/redhat-release file lists the Red Hat OS release (other vendors have their own ways of doing this). But the Desktop is ONLY available on machines running the X window system. There's no such thing as a command-line "desktop"; about the closes you'll get is a choice of shells.

Speaking of choices, when you log in via an X terminal, your login script will usually start up some sort of desktop. Most commonly, this is KDE or Gnome, but it can be other systems, such as Sawfish, especially for smaller systems where the heavy resource demands of a "fat" desktop like KDE or Gnome are too much.

The Desktop used is determined PER USER. That is, I may login and use KDE, someone else may be logged in from another X terminal using Gnome. Red Hat has a command named "switch-desktop" that allows the user to select which desktop to use. Each of these Desktop systems comes from a different project, so their release numbers are totally unrelated to each other or to the distro and kernel release numbers.

If you want to determine what version of Gnome is installed on a particular Red Hat or Fedora system, you can use the rpm command to return the version info on the gnome-desktop package. That will tell you what version of Gnome is installed in the rpm database.


Customer surveys are for companies who didn't pay proper attention to begin with.
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
You could also check the result of "rpm -q redhat-release", just in case the file was modified.
Just a thought!
[ July 05, 2007: Message edited by: Darrin Cartwright ]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

sometimes "issue" is used:

but just sometimes - and sometimes multiple Desktops are installed.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Command to find out Linux desktop version?