also @ TechSpot: Mozilla developing Metro-specific Firefox for Windows 8
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > Software > The Alternative OS

Download Now:

Nautilus : How to add a custom command ?

Thread Tools Search this Thread
  #1  
Old 02-16-2004
Didou's Avatar
Bowtie extraordinair!
 
Location: Brussels, Belgium
Member since: Feb 2002, 5,895 posts
System specs
Nautilus : How to add a custom command ?

Here's what I want to do. I would like Nautilus to associate HTML files with Firefox.

So I go to "Hat Menu" -> Preferences -> File types and programs -> Documents -> World Wide Web -> HTML page

I then click on Custom & add the following line :

~/programfiles/firefox/firefox -remote 'openURL (%s, new-window)'

I would like %s to be replaced by the path & filename of the file that I've double-clicked on. If I leave it as is for the moment, Firefox opens up but loads www.hoovers.com instead.

PS. I use the remote parameter, because if I happen to have an instance of Firefox allready running, when I double click on an HTML file, I get a Profile Dialog box because Firefox cannot have two instances using the same profile ( unless someone can show me how ).
  #2  
Old 02-16-2004
Mictlantecuhtli's Avatar
TechSpot Special Forces
 
Location: Finland
Member since: Feb 2002, 4,886 posts
System specs
It works in KDE when I use %u instead of %s.

That www.hoovers.com thing is quite odd, it's like built-in adware, my Firefox went there too when I tried %s.
  #3  
Old 02-19-2004
Didou's Avatar
Bowtie extraordinair!
 
Location: Brussels, Belgium
Member since: Feb 2002, 5,895 posts
System specs
Issue resolved

It took a lot of fiddling but now I'm done.

create a file & add the following lines in it :

#!/bin/sh

# Modify the FIREFOX_HOME path
# to where your mozilla based
# browser is located
export FIREFOX_HOME=/opt/firebird-builds/current
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FIREFOX_HOME

# get URL to load
url=$1; [ -z $url ] && url=about:blank

# try xremote first
$FIREFOX_HOME/mozilla-xremote-client openURL\($url\) && exit 0

# if xremote failed, then launch the browser
exec $FIREFOX_HOME/MozillaFirebird $url


& then go to "Hat Menu" -> Preferences -> File types and programs -> Documents -> World Wide Web -> HTML page

Click on Custom & direct it to the script you've just created ( do a chmod 777 on that file just in case ). Do not, I reapet do not add %s.

Next up is getting thunderbird to work with that script.
  #4  
Old 05-26-2004
Didou's Avatar
Bowtie extraordinair!
 
Location: Brussels, Belgium
Member since: Feb 2002, 5,895 posts
System specs
I'm really keeping an eye on Fedora & it seems one of the problems I had with RHL 9 has been taken care of in FC2.

Taken from -> Firefox and Thunderbird for FC2
Quote:
Fedora Extras has published today firefox and thunderbird packages for FC1 and FC2. These packages have been heavily patched and polished to integrate nicely into the Preferred Applications framework of FC2. This means that you can go into the Preferences -> Preferred Applications chooser, select Firefox & Thunderbird, and the GNOME desktop should fully honor your choice of browser and mail client when clicking hyperlinks in various programs of FC2.

http://www.fedora.us/wiki/FedoraHOWTO
Please follow the directions on this page if you do not already use Fedora Extras. Report problems of firefox & thunderbird to bugzilla.fedora.us.

http://togami.com/~warren/archive/2004/foxbird.sh
FC1 users can also use firefox & thunderbird from the Fedora Extras stable repository, but unfortunately the Preferred Applications framework in FC1 is a bit broken. As a workaround you can run this script as your non-root user to set your profile to use these two applications.

Warren Togami
wtogami redhat com
Closed Thread

Similar Topics
Topic Replies Forum
Command Prompt Windows - How to open and copy/paste to command prompt windows 0 Windows OS
Custom PC 2 Other Hardware
Command the power of the command line 3 The Alternative OS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 08:19 AM.