LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   executable programs (https://www.linuxquestions.org/questions/linux-newbie-8/executable-programs-312681/)

petezilla 04-13-2005 03:16 AM

executable programs
 
Hello, I'm trying to get a program that I installed to have an assigned command to run it.....in other words I can open it through a terminal with "/root/.firefox/firefox" but since I didnt install it from a package it doesnt just run from the command "firefox". There is an executable file in there, and i tried copying it to /usr/bin but it didnt make a difference. I'd appreciate if anybody can help me if they know what im talking about.

The reason why is so I can put it into Gaim as my default browser to open links, it needs a command like: "firefox -e %s" (%s insterts the link adress) but that wont work, and neither will "/root/.firefox/firefox %s" which is the command i use to run it in terminal.

masand 04-13-2005 03:39 AM

instead of copying tha fule make a symlink from that location

like i have firefox in /plugins/firefox-installer so i run this

ln -s /plugins/firefox-installer/firefox /usr/bin/firefox

regards

heema 04-13-2005 03:46 AM

you could make a simple script

Code:

#!/bin/bash

/root/.firefox/firefox

and call it myfirefox.sh

then make it executable by typing : chmod a+x myfirefox.sh

then copy it to /usr/bin

then add
alias myfirefox="/usr/bin/myfirefox.sh"

to your $HOME/.bashrc

now when you type myfirefox in the terminal it will launch your script ;)

petezilla 04-13-2005 04:08 AM

Quote:

Originally posted by masand
instead of copying tha fule make a symlink from that location

like i have firefox in /plugins/firefox-installer so i run this

ln -s /plugins/firefox-installer/firefox /usr/bin/firefox

regards

thank you very much sir, this did just the trick :D

masand 04-13-2005 01:53 PM

Quote:

Originally posted by petezilla
thank you very much sir, this did just the trick :D
glad that it worked

petezilla 04-13-2005 05:09 PM

Darn, okay so that worked.....now there's another problem. Now Gaim won't use my command "firefox %s" as command for Gaim to open links in Firefox......i opened up the debug window so I could see the command it used for Opera, which was "opera -newpage %s" and then I checked in terminal and in the KDE application launcher if the command "firefox http://www.somewebpage.com" would open that page up in firefox, and it did. So I dont think that im missing any arguments for that command. Why wont Gaim use that command to open links? Ironically, this is why I wanted to assign a command to firefox in the first place. Thanks to anybody who can help.

PTrenholme 04-13-2005 06:36 PM

As a quick syntax check, open a terminal and type
Code:

$ firefox --help
to get the list of Firefox command line options. Note that "-e" is not a valid option.


All times are GMT -5. The time now is 07:25 PM.