LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2014, 03:51 AM   #1
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
How to see the version information of an executable file in Linux through GUI?


Ubuntu 12.04.4 LTS
LXDE


I wish to see the version information of my created
executable when I right click on it.

I created a shortcut on the desktop (for the heck of it) by
right clicking and selecting "create shortcut".
That created a <name>.desktop file.

It contains:
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=excuse
Name[en_IN]=excuse
Exec=/usr/bin/bc
Comment[en_IN]=asdsadsad
StartupNotify=true
I added
Code:
Version=12
in it as shown here:
http://linuxcritic.wordpress.com/201...-desktop-file/

This didn't help. I right clicked it and could NOT see
anything related to version in its properties.

Which DE supports this feature?
 
Old 07-16-2014, 09:31 AM   #2
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 285

Rep: Reputation: 89
The desktop entry specification is here: http://standards.freedesktop.org/des...y-spec/latest/

In linux, you have to think in terms of package versions: The package manager of your distribution knows about each installed package's version. There is no standard way to store and retrieve version information. Some norms are there, like console programs dumping some info if you call them with "--version" or "--help" parameter. But that is the responsibility of the program.
 
1 members found this post helpful.
Old 07-16-2014, 10:02 AM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 855

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Version – specifies the version of the Desktop Entry Specification to which the .desktop file conforms (currently 1.0).
To that extent, it acts like a #! in a script to tell how to interpret the desktop file. IS ALL. Your program version (which I presume is what you want) is something else (as cepheus11 says in post #2). The other link mentioned by cepheus11 in post #2 is more exhaustive.

Of course you must have thought of the sneaky way by renaming your exe to have the version like MyApp-1.12 and so on.

OK
 
1 members found this post helpful.
Old 07-17-2014, 02:29 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by AnanthaP View Post
To that extent, it acts like a #! in a script to tell how to interpret the desktop file. IS ALL.
Thanks for making me understand what that version
actually stands for.

Quote:
Originally Posted by AnanthaP View Post
Of course you must have thought of the sneaky way by renaming your exe to have the version like MyApp-1.12 and so on.
OK
Nonsense.

All I tried was to change the value of the version key in the
.desktop configuration file.

Quote:
Originally Posted by cepheus11 View Post
The desktop entry specification is here: http://standards.freedesktop.org/des...y-spec/latest/

In linux, you have to think in terms of package versions: The package manager of your distribution knows about each installed package's version. There is no standard way to store and retrieve version information. Some norms are there, like console programs dumping some info if you call them with "--version" or "--help" parameter. But that is the responsibility of the program.
Thanks for the information.

So, do I have any choice for displaying version number
of my software through right click on exe?

This is exactly what I want to do on LINUX.
There is no .rc file on Linux, that is Windows specific, isn't it?

[Setting the Application Icon on Common Linux Desktops] info is quite helpful, IMO:
Quote:
Often, users do not use executable files directly, but instead launch applications by clicking icons on the desktop. These icons are representations of "desktop entry files" that contain a description of the application that includes information about its icon. Both desktop environments are able to retrieve the information in these files, and they use it to generate shortcuts to applications on the desktop, in the start menu, and on the panel.

Last edited by TheIndependentAquarius; 07-17-2014 at 03:11 AM.
 
Old 07-18-2014, 02:31 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Now it is clear that there is no explicit version showing
option list in the recognized desktop entry keys of www.freedesktop.org,
but they do have other field(s) there which can be used
to hold the version information.

One such field is GenericName.
This field gets listed as Description on
GNOME desktop environment.

So, if I add version info in this field as follows:

Code:
    [Desktop Entry]
    Encoding=UTF-8
    Type=Application
    Name=excuse
    Name[en_IN]=excuse
    Exec=/usr/bin/bc
    Comment[en_IN]=asdsadsad
    StartupNotify=true
    GenericName[en_IN]=Version 12.3
    Icon=/usr/share/lxpanel/images/capslock-off.png
It gets shown on the right click as follows:

Attachment 15938


So, in a nutshell, we have the option to store our executable
in /usr/bin/ where normal Linux executables are stored, and
then create its shortcut on the desktop or somewhere else.
Then we will be able to right click this shortcut and get
the version information.

Last edited by TheIndependentAquarius; 02-17-2015 at 12:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How may I get the information from the file and give to the executable file? hnasr2001 Red Hat 1 02-13-2013 11:26 PM
Cannot run C++ executable file from Ubuntu 10.10 GUI LaserGuided Linux - Newbie 10 04-18-2011 12:55 PM
how to add version information to an executable DEF. Programming 2 03-02-2010 05:45 AM
LXer: Embedding a File in an Executable, aka Hello World, Version 5967 LXer Syndicated Linux News 0 06-12-2008 11:11 PM
LXer: Practical Steganography Part-1: Hiding information in Binary Executable File LXer Syndicated Linux News 0 02-14-2008 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration