• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Command to find out Linux desktop version?

 
Gurumurthy Ramamurthy
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sometimes "issue" is used:

but just sometimes - and sometimes multiple Desktops are installed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic