Before You Post, Please Note...
-> Please Note: By Posting, you agree to submit the contents of your post to the Public Domain <- SEE: howto post to this blog
Showing posts with label editor. Show all posts
Showing posts with label editor. Show all posts
Sunday, January 14, 2007
changing defaultbrowser or texteditor
icons on the desktop and commands like "defaultbrowser" on the command line and in scripts rely on default scripts that call the utilities (such as the web browser and text editor) to open them. the thing is, "defaultbrowser" can be changed to any browser you have installed, as can defaulttexteditor.
being able to change the defaults is very useful when for instance, you're right clicking on a text file to open it, or opening a webpage.
1a. opening the file using the terminal:
enter the following:
leafpad /usr/local/bin/defaultbrowser &
or this:
leafpad /usr/local/bin/defaulttexteditor &
making sure there is a space after "leafpad" and a space before "&"
1b. opening the file using rox:
click the "home" icon on the desktop to run rox-filer, then the up arrow (or triangle) icon in the rox toolbar to go to the / directory. click the folder icons for /usr, local, and bin, then find the icon for defaultbrowser. right click, select and "open as text"
(note that you can drag most of these icons onto the desktop.)
2. editing the file:
it will look something like this:
#!/bin/sh
exec opera "$@"
"opera" may be "mozstart" in either case, whatever you type in a terminal to start your browser, for instance:
firefox
should work here as well. so the new file will be:
#!/bin/sh
exec firefox "$@"
save the file and close the editor, and that's it!
for defaulttexteditor:
same as for the browser- the part you should change will probably be geany, beaver, or leafpad. simply replace with the name of the one you want as default, or with the name of whatever alternative you have installed.
most default... scripts work this way. just remember to leave as much of the text intact as possible, only change the part you have to.
still another way:
pizzasgood has created a utility named defaults-wizard to handle defaultscripts like these. it's available at: http://murga-linux.com/puppy/viewtopic.php?t=13429
download this, restart ice window manager or jwm from the shutdown or logoff menu, open it from the menu and click the name of the file you want to change. use the file window to locate the program you want as default.
ktwi: grafpup 104, should work in most versions of grafpup and puppy 1.x, puppy 2.x
thanks to: rarsa, amish
Subscribe to:
Posts (Atom)