Jump to content

setting $BROWSER (again) [solved]


Recommended Posts

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]

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 by jboy
Link to comment
Share on other sites

Thanks Steve. Nobody noticed the Clown emoticons. I was just having a fun dig. Or should I say ....Gotcha . :jester:

 

Thanks for taking the effort to give a considered suggestion anyway. That I do respect. :thumbs:

 

Cheers. John.

Link to comment
Share on other sites

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.

post-36-1117950757_thumb.jpg

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...