LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-01-2009, 09:17 AM   #1
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
[WORKED AROUND] Xfce Help not displayed when Opera is default web browser


Hello

In case it helps anyone ...

In Xfce 4.6.1, with Opera 9.64 as the default web browser, Help from the Applications menu was not displayed with Opera giving error message "You tried to access the address http://'file///usr/share/xfce4/doc/C/index.html', which is currently unavailable". See the http: at the start of the URL; it should be file:///usr/share/xfce4/doc/C/index.html

ps showed the command being run to show help was /usr/lib/opera/9.64/opera -remote openURL('file:///usr/share/xfce4/doc/C/index.html',new-window)

Changing the default web browser from Opera to Firefox (3.5.2) solved the problem. Changed by Applications menu, Settings, "Xfce4 Settings", "Preferred Applications", "Web browser": "Mozilla Firefox".

In case someone wants to make Help work with Opera, the script that launches Help is /usr/bin/xfhelp4.

Best

Charles
 
Old 09-02-2009, 02:04 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I haven't xfce installed, but the secret lies for sure in /usr/bin/xfhelp4. If it's a shell script we could edit it to make it always use firefox or whatever browser you want it to use. However, I think that opera can open local URIs as well, so the problem might be that the URI needs to be parsed and corrected a bit.

Try to paste the script here and I'll do my best.
 
Old 09-02-2009, 03:27 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by i92guboj View Post
I haven't xfce installed, but the secret lies for sure in /usr/bin/xfhelp4. If it's a shell script we could edit it to make it always use firefox or whatever browser you want it to use. However, I think that opera can open local URIs as well, so the problem might be that the URI needs to be parsed and corrected a bit.

Try to paste the script here and I'll do my best.
Thank you for your kind offer but I'm OK with the workaround because Firefox is my preferred browser; I'd only configured Opera while running Gnome and Xfce simultaneously during the changeover (because Firefox got upset when run in two sessions).

Xfce has a preferred browser setting (Menu→Settings→"Xfce4 Settings"→ "Preferred Applications" then set "Web browser") so no need to modify /usr/bin/xfhelp4 for that.

You are right to say "opera can open local URIs as well"; when I tried pasting file:///usr/share/xfce4/doc/C/index.html into its address bar it worked OK.

Out of curiosity, I dug a bit deeper. The problem is not in /usr/bin/xfhelp4. That script only selects the URI and then calls /usr/bin/xfbrowser4 with the URI as the argument. /usr/bin/xfbrowser4 expects environment variable $BROWSER to be set (defaults otherwise) and then calls the browser with a browser-specific command line:
Code:
[snip]
if [ ! "x$1" = "x" ]; then
  case $1 in
      *://*) URL=$1;;
      *) URL="file://$1" ;;
  esac
fi

case $BROWSER in
    firefox*)
	$BROWSER -a firefox -remote openurl\($URL,new-window\) || \
		$BROWSER $URL
	;;
    communicator*|netscape|mozilla*|phoenix*|firebird*)
	$BROWSER -remote openurl\($URL,new-window\) || \
		$BROWSER $URL    
	;;
    opera*)
    	$BROWSER -remote openURL\($URL,new-window\) || \
		$BROWSER $URL
	;;
	exo-open)
	    $BROWSER --launch WebBrowser $URL
	;;
    *)
    	$BROWSER $URL
	;;
esac

[snip]
I guess the bug is in -remote openURL\($URL,new-window\).
 
Old 09-02-2009, 03:42 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Yes, so it seems. I think that even simply removing the opera*) section altogether would work, the general case *) should work for most browsers anyway. Certainly opera open local URIs ok by just doing "opera <localuri>". If you get the chance report it upstream, so they can fix it. It's quite trivial but I am sure that you are not the first one to be bothered by this bug, and you will surely not be the last one either.
 
Old 09-02-2009, 02:47 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by i92guboj View Post
Yes, so it seems. I think that even simply removing the opera*) section altogether would work, the general case *) should work for most browsers anyway. Certainly opera open local URIs ok by just doing "opera <localuri>". If you get the chance report it upstream, so they can fix it. It's quite trivial but I am sure that you are not the first one to be bothered by this bug, and you will surely not be the last one either.
Done. Xfce bugzilla 5724

The following command does work perfectly as you thought
Code:
opera file:///usr/share/xfce4/doc/C/index.html
Environment variable $BROWSER is not set, as I thought it might be, by setting Opera as the preferred browser in Xfce. Setting $BROWSER to opera is not a workaround because it results in two instances of Opera -- one showing Xfce Help and the other the default start page.

That leaves setting $BROWSER to anything not matched in the case statement as a workaround. export BROWSER='Internet Explorer' should do the trick!
 
  


Reply

Tags
help, opera, xfce4



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
How to set Opera as default web browser? seran Linux - Software 3 10-16-2010 10:14 AM
Making my default browser to opera in KDE ANU16 Linux - Software 3 12-10-2005 08:43 PM
How to set Opera as the default web browser seran Linux - Newbie 1 08-17-2004 06:25 AM
Change default browser to Opera graffitici Linux - Software 4 08-21-2003 03:39 AM
Opera as default Browser? Nicksan Linux - General 2 06-16-2003 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:01 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