LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to change app for desktop config file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-app-for-desktop-config-file-129827/)

wayback 12-29-2003 01:29 PM

how to change app for desktop config file?
 
Using KDE, how do I change which application launches when a "desktop config" file/icon is double-clicked? Specifically, I want to change which browser is launched for a URL-type d.c. file. There must be a file somewhere that controls this, I just can't find it. (And, is it the same thing for Gnome?) TIA.

h/w 12-29-2003 02:05 PM

right-click on the icon - properties?

wayback 12-29-2003 02:09 PM

Tried right-click for Properties but that doesn't provide a way to change to app.

Tino27 12-29-2003 04:19 PM

Right-click on the desktop icon and select "Open With...". Typically I open them using a text editor or something like KWrite.

Once you have the .desktop file open, look for the line that begins with "exec=". This is the path and executable name to the application that will be launched. Save the changes to the file, exit the editor, and try double-clicking on the icon.

wayback 12-29-2003 07:30 PM

Thanks for suggestion - tried that, but (a) there was no line "exec=" already there, (b) when I added one it had no effect (e.g.: "exec=/usr/bin/mozilla", but it still brings up Galeon as the browser). Do your desktop config url files contain such a line?

Tino27 12-29-2003 08:17 PM

I suspect that what your are doing is simply creating a link to an actual HTML file on your desktop? And based on what you've said so far, you want to open some HTML files in one browser and some in a different browser? That's probably why you didn't see an "exec" line when you opened it up with a text editor. Those links aren't actually .desktop files, but actual links to real HTML files. If this is the case, then you are right, you wouldn't see an "exec" line. You would probably see the HTML source if you did this.

The only way that I can see to open some HTML docs in one browser and some in the other are to create what are called .desktop files, one for each doc you want to behave like this. So, for instance to open up /home/user1/doc1.html in Mozilla Firebird, you would create a file called doc1.desktop in a text editor and place the following code inside of it.

[Desktop Entry]
Exec=/home/user1/MozillaFirebird/MozillaFirebird /home/user1/doc1.html
Icon=/home/user1/MozillaFirebird/icons/mozicon50.xpm
MiniIcon=/home/user1/MozillaFirebird/icons/mozicon16.xpm
Name=Firebird 0.7
Name[en_US]=Firebird 0.7
Terminal=0
Type=Application

Some things to note...all the paths listed depend on where you've installed Firebird, obviously, as well as where the HTML document lives.

The Name and Name[en_US] fields are what are displayed under the icon on the desktop. The Icon and MiniIcon fields are what icon graphic is displayed on the desktop. Once you've got your Doc1.desktop file, copy it to your actual desktop. When you click it, it should open up Doc1.html inside of Firebird.

If there is an easier way to do this, perhaps someone else could suggest it.

wayback 12-30-2003 01:37 AM

No they're actual desktop config files (*.desktop), not links to html files, but they don't contain any "exec=" line. Also they're http urls, not to files on my machine, so I can't put in a line "exec=" that references another file on my machine. There must be a config file somewhere that determines what application gets invoked.


All times are GMT -5. The time now is 04:36 PM.