ERD Posted May 27, 2005 Report Share Posted May 27, 2005 hi, im sorry to be sucha P.I.T.A. on this, but i just cant get it done. i need to know wich file sets the $BROWSER variable on start up, i know this is done somwhere allready because if i type: echo $BROWSER i get: /usr/bin/www-browser i know i could add my own line to some startup script like .bash_profile or something, but i need to know where its ALLREADY set, ibe looked at dozens of files in etc and in $HOME, but i cant find it! so, does anyone know in wich file madrake sets the $BROWSER variable? so i can edit it to point somewhere else instead of /usr/bin/www-browser? another solution i can think of is: is there an ultility in linux mandrake that allows me to "scan" all files in a given directory for one that contains some specific text? so that i could for example do a search for all files in /etc looking for one whos contents include the word $BROWSER? once again, im sorry to bother so much with this, but i really need to get it fixed [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ERD Posted May 28, 2005 Author Report Share Posted May 28, 2005 if i edited rc.local and point $BROWSER to firefix there, it got un-set by some other script and pointed to /usr/bin/web-browser so i edited web-browser to use firefox, an viola! :) Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted May 28, 2005 Report Share Posted May 28, 2005 The 'correct' way to do this is in gnome-control-center -> Preferred Applications Quote Link to comment Share on other sites More sharing options...
AussieJohn Posted May 28, 2005 Report Share Posted May 28, 2005 Hi Steve. What about KDE huh. Cheers. John. Quote Link to comment Share on other sites More sharing options...
adamw Posted May 28, 2005 Report Share Posted May 28, 2005 KDE has something similar. Of course, they work completely differently. You'd be amazed how much hacking has to be done behind the scenes just to make it so that browser preferences can be set somewhat universally. That's why we have the web-browser abstraction... Quote Link to comment Share on other sites More sharing options...
jboy Posted May 30, 2005 Report Share Posted May 30, 2005 (edited) Is there a ultility in linux mandrake that allows me to "scan" all files in a given directory for one that contains some specific text? Here are three options I am aware of: (1) The 'find' command along with 'grep' can be very useful for this. For example, the following command displays all lines containing 'www-browser' in /etc and its subdirectories and displays the filename on the preceding output line: find /etc -name "*" -type f -exec ls -a {} \; -exec grep -i www-browser {} \; | grep -B1 -i www-browser An example of a couple lines of output is: /etc/X11/Xsession BROWSER=`which www-browser 2> /dev/null` -- /etc/gconf/schemas/desktop_gnome_url_handlers.schemas <default>www-browser %s</default> -- There might be some other, easier, and better ways to do this, but this is one I've used and it works nicely. For example, the following is simpler, but I don't like the output format compared to the above: grep -iHnr www-browser /etc Also, there are two very nice gui search utilities you might want to check into: (2) gnome-search-tool: Click on 'Show more options' and one of the 'Available Options' is 'Contains the text'. (3) kfind: There is a 'Contents' tab where you can specify the text you want to search for, including options like case insenstive. Edited May 30, 2005 by jboy Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted June 1, 2005 Report Share Posted June 1, 2005 John: KDE Control Center -> Component Chooser -> Web Browser Note that GTK apps will honor the setting in Gnome Control Center and QT apps honor the KDE Control Center setting. :P Quote Link to comment Share on other sites More sharing options...
AussieJohn Posted June 4, 2005 Report Share Posted June 4, 2005 Thanks Steve. Nobody noticed the Clown emoticons. I was just having a fun dig. Or should I say ....Gotcha . Thanks for taking the effort to give a considered suggestion anyway. That I do respect. Cheers. John. Quote Link to comment Share on other sites More sharing options...
bvc Posted June 4, 2005 Report Share Posted June 4, 2005 The 'correct' way to do this is in gnome-control-center -> Preferred Applications <{POST_SNAPBACK}> depending on which distro and which gnome, that doesn't always work. If it doesn't, use the gconf-editor. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted June 5, 2005 Report Share Posted June 5, 2005 (edited) bvc: Is this it? John: I know. Hence the :P in my reply. :P Edited June 5, 2005 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
bvc Posted June 5, 2005 Report Share Posted June 5, 2005 yes, as you can see I have 2 set as $BROWSER This is in ubuntu where the Preferred Applications is the one that works. I don't know if the probs in the past have to do with a switch in how it is supposed to be done or not. Just that for months, on several distros, the gconf key had to be set for it to work. Quote Link to comment Share on other sites More sharing options...
AussieJohn Posted June 6, 2005 Report Share Posted June 6, 2005 Darn it Steve you got me. :D :D :D I will work out the subtleties of these emoticons one day. Cheers. John Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.