LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 09-01-2009, 10:17 AM   #1
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,845
Blog Entries: 6
Thanked: 226
[WORKED AROUND] Xfce Help not displayed when Opera is default web browser


[Log in to get rid of this advertisement]
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
linux catkin is offline  
Tag This Post , ,
Reply With Quote
Old 09-02-2009, 03:04 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 2,876
Thanked: 267
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.
linuxgentoo i92guboj is online now     Reply With Quote
Old 09-02-2009, 04:27 AM   #3
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,845
Blog Entries: 6
Thanked: 226

Original Poster
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\).
linux catkin is offline     Reply With Quote
Old 09-02-2009, 04:42 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 2,876
Thanked: 267
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.
linuxgentoo i92guboj is online now     Reply With Quote
Old 09-02-2009, 03:47 PM   #5
catkin
Senior Member
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Slackware 13.0
Posts: 1,845
Blog Entries: 6
Thanked: 226

Original Poster
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!
linux catkin is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 05:47 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration