Fedora Linux Support Community & Resources Center
  #16  
Old 30th July 2009, 11:18 AM
leadgolem Offline
Registered User
 
Join Date: Apr 2005
Location: Littleton, CO
Age: 30
Posts: 2,857
linuxfedorafirefox
A .desktop file is almost a shell script. It just has a special extension so it gets an icon etc... Please open a text editor, then browse to the .desktop file and open it, and post the contents.

It is likely fedora is just creating the launchers for your specific page with it's default web browser, firefox.
__________________
S.C.O.U.R.G.E. Heroes of lesser renown, contributor.
Reply With Quote
  #17  
Old 30th July 2009, 04:32 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Quote:
Originally Posted by leadgolem View Post
Please open a text editor, then browse to the .desktop file and open it, and post the contents.
Here is the contents of one of the launcher *.desktop files:
[START]

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=IWU Blackboard
Type=Link
Name[en_US]=IWU Blackboard
URL=http://blackboard.indwes.edu
Icon[en_US]=/usr/share/icons/hicolor/48x48/apps/opera.png
Icon=/d.Folder/Documents/Personal/Holdfile/MoreIcons/Internet.shortcut.ico

[END]
Okay; I put the [START] and [END] delimiters on there but I did it to show that there is a mandatory blank line first. I have discovered through trial and error that if you remove the <CR> character which starts the text file, it no longer works as a launcher. ;-)

You can see that I have hand-tailored the "Icon=" line to a specific Internet icon that I would like to have. This is the one that shows.

The "Icon[en_US]" line is new to me. Last time I looked at these files' contents, it had only one Icon line. Really, only the Name line had multiple entries for specific languages. I did not put that "Icon[en_US]" line in there, nor did I instruct GNOME to use the "opera.png" icon. So that suggests that since Opera was already chosen as the default browser, it went off and grabbed an icon from the Opera set.

Nevertheless, even with Opera already open, activating this launcher starts Firefox and opens the page in Firefox. (In Fedora 8, with Opera already open activating the launcher just opens the indicated URL in a new tab.)

Any ideas?

- Bill
Reply With Quote
  #18  
Old 30th July 2009, 04:45 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Okay ... more info ... and weird!

Okay, this gets more bizarre.

I tried creating a new launcher by hand on the Fedora 11 desktop. (The others had been copied from backup files.) Here are the contents:
[START]
#!/usr/bin/env xdg-open

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Link
Icon[en_US]=gnome-panel-launcher
Name[en_US]=Fedora Forums
URL=http://forums.fedoraforums.org
Comment[en_US]=test platform
Name=Fedora Forums
Comment=test platform
Icon=gnome-panel-launcher
[END]

Two points: notice the appearance of the "#!/usr/bin/env xdg-open" at the top. That did not used to be there. Also, notice that in haste I misspelled the URL. (It should be "fedoraforum" not "fedoraforums".)

I activate this launcher and it opens in Opera. Of course, it gives me an error there is no such URL. I go back and correct the spelling to "fedoraforum" (no 's') and try again. Then it launches Firefox and opens the page in Firefox!

I can duplicate this, with other launchers.

Whether the "#!/usr/bin/env xdg-open" line is present or not, does not change the outcome. If the URL is misspelled -- not a valid DNS entry -- it opens the error message in Opera. But if the URL is correct, it launches Firefox to open the page.

Now, any ideas?

- Bill
Reply With Quote
  #19  
Old 30th July 2009, 04:53 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
What is xdg-open

At this point I'm thinking there is some setting in "/usr/bin/env xdg-open" which is directing these launchers to Firefox. But it seems like something I could easily mess up my system over if I am not careful -- and I don't really know what I am doing.

Any guidance?

Any clues why misspelled DNS names go to Opera but valid ones go to Firefox? This is instantaneous ... the new window opens in Opera immediately.

- Bill
Reply With Quote
  #20  
Old 30th July 2009, 10:59 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
linuxkonqueror
/usr/bin/xdg-open has firefox. However, how badly this could or couldn't damage, I have no idea.

You could try copying the file (it's a shell script) to a backup, then subbing firefox with opera and seeing what happens--if worst came to worst, boot up into runlevel 3 and put back the backup script.
__________________
--
http://home.roadrunner.com/~computertaijutsu

Do NOT PM forum members with requests for technical support. Ask your questions on the forum.


"I don't know why there is the constant push to break any semblance of compatibility" --anon
Reply With Quote
  #21  
Old 31st July 2009, 08:34 AM
leadgolem Offline
Registered User
 
Join Date: Apr 2005
Location: Littleton, CO
Age: 30
Posts: 2,857
linuxfedorafirefox
As I do not know anything about the script being used I would just replace the url=line with an exec line calling opera explicitly. Something like..
Code:
Exec=opera http://forums.fedoraforum.org
You would have to do this for each launcher and mark the launchers as trusted. Your exec line should match the cli syntax for opera.
__________________
S.C.O.U.R.G.E. Heroes of lesser renown, contributor.
Reply With Quote
  #22  
Old 5th August 2009, 09:06 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Uninstalling Firefox

Quote:
Originally Posted by Min View Post
Maybe try installing and uninstalling firefox?
Okay; I uninstalled Firefox. With that gone, clicking on the desktop launcher opens the specified URL in Opera.

However, when I reinstall Firefox, it goes back to launching URLs in Firefox.

Recap: what we have here is:
1. GNOME default browser is set to Opera
2. /usr/bin/env xdg-open has "firefox" in only place -- a list of default browsers to try "when all else fails" ... and I have commented that out and replaced it with "opera"
3. When the URL is misspelled, the launcher opens in Opera. But when it is spelled correctly, it opens in Firefox, regardless of the above.
4. When Firefox is uninstalled, desktop launcher opens Opera. When Firefox is reinstalled, desktop launcher goes back to using Firefox, regardless of the above.

I think there must be a file in GNOME or Fedora that is directing URLs from the desktop launchers to Firefox, ignoring the "default browser" setting. Firefox confirms that it is not registered as the default browser.

But I surely cannot find that file. Does anybody have any ideas?

- Bill
Reply With Quote
  #23  
Old 6th August 2009, 02:04 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,119
linuxfedorafirefox
Quote:
Originally Posted by JWilliamCupp View Post
Well, that was a grand idea but it didn't pan out.

According to Opera help, that option is only possible on MS Windows platforms. According to Opera, in Linux GNOME and KDE, you use "set preferred application," which as already stated I did first of all.

According to Fedora help, there is no distinguishing between platforms. You go Edit -> Preferences -> Main and "check if Firefox is the default browser." However, on my Linux version, there is nowhere to do that in the Main panel of the Preferences dialog box.

Oh well. Anyone else have any ideas?

- Bill
Actually in Firefox that's in
Edit->Preferences -> Advanced -> General -> System Defaults
"Always check to see if Firefox is the default browser on startup"
Reply With Quote
  #24  
Old 7th August 2009, 05:05 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Workaround Developed

Well, folks, I have come up with a work-around.

As root, I went to /usr/bin and renamed the file "firefox" to "Firefox".

Then I made a link file named "firefox" which links to "opera" in that directory. Now, any part of the system which issues the command for firefox actually ends up launching Opera. This works, as far as getting the desktop launchers to open in Opera.

Additionally, I can edit each user's main menu Firefox entry to issue the command with the upper case 'F', so users can still choose either browser if they are working from the main menu.

I don't like this work-around because I know I am injecting an error into the system. However, until we can figure out what in Fedora makes Firefox the inescapable default, this will have to do. Who know what will happen when the next update to Firefox comes along.

For the record, I also make two other changes. In both /usr/bin/xdg-email and /usr/bin/xdg-open, I have modified the following line (see the second comment):

if [ x"$DE" = x"" ]; then
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
# inserted "opera:" into "BROWSER=htmlview:firefox:" 07AUG2009 by JWCupp
BROWSER=htmlview:opera:firefox:mozilla:netscape
fi
DE=generic
fi

I reason that eventually I'll figure out the real source of the Firefox default, and take out my "firefox -> opera" link work-around. When that happens, there's no reason why xdg shouldn't consider Opera one of the plausible browsers to try.

If anyone gets more insight into this, please post.

- Bill
Reply With Quote
  #25  
Old 8th August 2009, 03:00 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,119
linuxfedorafirefox
You're using Gnome so you might not be interested but this is very easy to do in KDE4:

System Tools -> Personal / Default Applications select Web Browser

and in the "Default Component" box check "Open http and https URLs in the following browser"
and type in "opera" or the absolute path to opera
Reply With Quote
  #26  
Old 11th August 2009, 12:14 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Didn't Help

Quote:
Originally Posted by marko View Post
You're using Gnome so you might not be interested but this is very easy to do in KDE4:

System Tools -> Personal / Default Applications select Web Browser

and in the "Default Component" box check "Open http and https URLs in the following browser"
and type in "opera" or the absolute path to opera
Yes, it is nearly identical in GNOME. Sorry; I tried that first and it doesn't help. For whatever reason, even though everything I can find that relates to which browser to use says Opera, Fedora 11/GNOME still opens URLs in Firefox.

I think it is a problem with Fedora 11 more than with GNOME. (Changing the Preferred Applications in GNOME worked in earlier versions of Fedora.)

- Bill
Reply With Quote
  #27  
Old 13th August 2009, 04:40 PM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
More Weird

Quote:
Originally Posted by JWilliamCupp View Post
As root, I went to /usr/bin and renamed the file "firefox" to "Firefox".

Then I made a link file named "firefox" which links to "opera" in that directory. Now, any part of the system which issues the command for firefox actually ends up launching Opera. This works, as far as getting the desktop launchers to open in Opera.
Okay... try to figure this out. Five days after I made the above change (lower case "firefox" is a link pointing to /usr/bin/opera and uppercase "Firefox" is the bin file running Firefox), we observe the desktop launchers once again opening Web URLS by launching Firefox, not Opera.

Today, I swapped the above workaround: now "Firefox" (uppercase) is a link pointing to /usr/bin/opera and "firefox" (lowercase) is the binary file for Firefox. Opera is now launched when a desktop launcher is clicked to activate a Web URL.

What gives? Any ideas? I will continue to update this thread.

- Bill
Reply With Quote
  #28  
Old 13th August 2009, 08:03 PM
Dead1nside Offline
Registered User
 
Join Date: Sep 2006
Location: UK, Bucks.
Posts: 354
linuxfedorafirefox
The 'Preferred Applications' under System is pretty rubbish. It doesn't appear to be dynamic, responding to what programs you have installed, even if they've got their own shortcuts under Applications. So for instance I cannot change my movie player to anything but Rhythmbox or Totem unless I find the executable's path and even then I think it's pretty random. I have VLC's path put in there but it still brings up Totem.

I know this is slightly related. I'm not having your problem, Firefox opens fine.
__________________
Thinkpad T400 - Smolt Profile || Thinkpad T61 - Smolt Profile || Thinkpad T41p - Smolt Profile.
Reply With Quote
  #29  
Old 14th August 2009, 03:58 AM
JWilliamCupp Offline
Registered User
 
Join Date: Apr 2006
Location: Indiana
Age: 56
Posts: 60
linuxopera
Quote:
Originally Posted by Dead1nside View Post
I know this is slightly related. I'm not having your problem, Firefox opens fine.
No, my problem is the opposite. Until I installed the link /usr/bin/firefox -> opera,
all of my URL's opened in Firefox. I want to open them in Opera but no matter how many different places I made the setting to use Opera as the default browser, it keeps opening them in Firefox.

Renaming the Firefox binary file and creating a link using the "firefox" name as a pointer to Opera worked -- at first.

Initially: firefox -> opera
Firefox (upper case 'F') renaming of genuine Firefox binary.
That worked for a couple of days. Then it quit working, and everything opened in Firefox again.

Now: Firefox -> opera
firefox (lower case 'f') renaming of genuine Firefox binary.
This is presently working.

What I can't figure out is:
(1) How does GNOME (Fedora?) know to launch Firefox for Web URL's? There must be a configuration setting somewhere that I don't know about.
(2) How does GNOME (Fedora?) figure out eventually the "new" name of the true Firefox binary in /usr/bin, and reconfigure so that whatever-it-is now uses the renamed binary file, so as to open everything in Firefox?

Does anyone know of other places I can look to find Web / html / URL configuration settings? Please read through the above post to see which all settings I have modified so far.

Thanks,

- Bill
Reply With Quote
Reply

Tags
default program, f11

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change preferred applications ? m.nassar Using Fedora 5 10th October 2009 06:34 PM
Setting preferred browser in gnome doesn't work. Fedora 9 kurtdriver Using Fedora 12 14th November 2008 05:06 PM
Preferred Applications piga Wibble 43 10th May 2008 10:10 PM
Setting preferred mutimedia applications steve1961 Using Fedora 2 21st September 2005 05:22 PM
Setting Preferred Applications TerranAce007 Using Fedora 3 20th February 2005 08:25 AM


Current GMT-time: 13:43 (Saturday, 20-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
...Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram