LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2011, 11:25 AM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Rep: Reputation: 53
Question on Linux file formats: A file is not a file.


If we navigate to /usr/share/application ;or where icons appear to be, the properties seem to be a bash command to launch the program symbolized by the icon. If you copy and past the symbol to gedit the Location is copied and pasted but if you drag it to gedit you get an extrapolated version of this summery.


This:
/usr/share/applications/gnome-sol.desktop (Copy and pasted)





Or this: (Draged)

Desktop Entry]
Name=AisleRiot Solitaire
Name[af]=AisleRiot-patience
Name[ar]=صولتار آيسل رايوت
Name[as]=Aisleriot সলিটেয়াৰ
Name[ast]=Solitariu AisleRiot
Name[az]=AisleRiot Solitaire
Name[bg]=Пасианси
Name[bn]=AisleRiot সলিটেয়ার
Comment[th]=เล่นเกมถอดไพ่สารพัดแบบ
Comment[tr]=Farkli iskambil falı oyunlarını oynayın
Comment[uk]=Дозволяє грати у багато різних пасьянсів
Comment[vi]=Chơi nhiều tṛ chơi solitaire khác nhau
Comment[xh]=Dlala imidlalo emininzi eyahlukeneyo ye-solitaire
Comment[zh_CN]=玩各种纸牌游戏
Comment[zh_HK]=玩不同類型的接龍遊戲
Comment[zh_TW]=玩不同類型的接龍遊戲
Exec=sol
Icon=gnome-aisleriot
Terminal=false
Type=Application
Categories=GNOME;GTK;Game;CardGame;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-games
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=2.30.1
StartupNotify=true
X-HildonDesk-ShowInToolbar=true
X-Osso-Service=org.gnome.Games.AisleRiot
X-Osso-Type=application/x-executable
X-Desktop-File-Install-Version=0.16


Any thoughts or Search terms that can partially explain this?

Thanks in advance!

Last edited by theKbStockpiler; 03-18-2011 at 11:27 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-18-2011, 11:44 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
When you copy an object, be it a regular file, an application or a folder, the URI of that object is stored in the clipboard. If you paste from a file manager (e.g. Nautilus) the object is copied, if you paste from a text editor, the URI is copied as plain text. On the other hand, when you drag and drop an object inside an application window, the object is managed by that application. Since gedit is a text editor, the object is considered a text file and gedit tries to open it as such.
 
2 members found this post helpful.
Old 03-18-2011, 12:34 PM   #3
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
Thanks for the Reply!

So should I assume that I need more than one application to view ALL of the data in the file separately? There is more data in the file obviously. If I used Emacs would it list everyting in binary? How do I display the code for the image of the Desktop icon in this file. Should I have bash open it with gimp? Nautilus does not open it as file and it behaves as a menu icon to open the app. Could the Archive Manager open it? I'm currently trying to educate myself in how init lauches interactive processes like gedit or example. Sorry for the rambling but this is core topic at the moment for me.

It just occurred to me that the images are part of a nautilus file and not /usr/shar/application at all. Could this be right?

Thanks for the great explanation by the way.That would have taken forever if I could figure it out myself.

Last edited by theKbStockpiler; 03-18-2011 at 12:37 PM.
 
Old 03-18-2011, 01:42 PM   #4
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
The image nautilus is displaying is determined by this line in the file.
Code:
Icon=gnome-aisleriot
It's going to look in your icon theme for an icon named gnome-aisleriot to use.

.desktop files are a little special, and desktop environment's that adhere to freedesktop.org specs treat them as such.

Note also because they are treated differently, there is potential risk with them as well.
 
1 members found this post helpful.
Old 03-18-2011, 02:06 PM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Not sure about your requirement, but a launcher is an object which is managed by Gnome and the File Manager to display the specified icon and to trigger some process if clicked. Take a look at http://library.gnome.org/users/user-...nchers.html.en for some insight.

From a lower point of view it is simply a text file containing a list of key/value pairs. The file manager interprets these values and displays it accordingly. In other words a launcher is simply what you see if you open it with a text editor or if you print its content using cat in a terminal. A text file. The actual icon, whose name or path is specified by the Icon key is an image file placed in some default path. The program executed is an executable placed somewhere in your path. Each object is independent from the launcher: it just contains a reference to that object.

A complete description of the launcher properties is given here: http://library.gnome.org/devel/desktop-entry-spec/. Hope this is what you're looking for. Otherwise, please correct me.
 
1 members found this post helpful.
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What file formats ca i useon linux due to trying Exe untouched gamer Linux - Newbie 6 04-23-2009 09:07 AM
LXer: Linux tools to convert file formats LXer Syndicated Linux News 0 07-22-2008 01:40 PM
File Formats and Linux Distributions eating Linux - Newbie 4 01-28-2006 03:58 PM
Linux distributions and portable file formats eating Linux - Distributions 2 01-28-2006 08:19 AM
linux file formats name* arnekasper Mandriva 4 07-14-2005 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:42 AM.

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
Open Source Consulting | Domain Registration