firefox
a free and open source web browser from Mozilla
Synopsis
firefox
[OPTIONS] [url]
add an example, a script, a trick and tips
examples
source
Limit CPU usage for flash in Firefox?
I install NoScript on every system with Firefox, which blocks
Flash along with Java and Javascript until I allow it from
particular sites. This cuts down on sites loading flash widgets
for something ridiculous like their site banner, or
advertisements that are sneaky and hiding.
It also has the added benefit of security. Yes, its a pain to
whitelist sites you trust, and you really must be
careful of what you're going to allow; whitelisting everything
defeats the purpose of the plugin. Security and convenience are
mutually exclusive, anyway.
source
function firefox {
apt-get install -y firefox
}
source
How to install the real Firefox on Debian?
First, you need to remove the existing Iceweasel package (I think
you can use aptitude
as well):
apt-get remove iceweasel
Then, download the
latest Linux build of Firefox directly from Mozilla. Extract
the files, and navigate to that folder, and run it. If you want,
make an icon on your desktop. You can also make a link to the
binary in /usr/bin/firefox
to make it easier to
launch.
If you want a package-based one, you can use Linux Mint's Debian package repo. To do this, add
the following line to your /etc/apt/sources.list
file:
deb http://packages.linuxmint.com debian import
And add the GPG key for that repo. Then, just run:
apt-get update
apt-get install firefox
And you should be good to go!
The default install is German, to install in any other language,
you can manually run:
apt-get install firefox-l10n-en-us
Or use firefox-l10n-en-gb
for British English.
source
Make Firefox use the favicon as window icon under Linux
One option is using Mozilla Prism firefox extension which allows you
to run a webpage in its own dedicated window. It will use the
favicon for the browser window icon.
source
How can I register a custom protocol with xdg?
At least in Fedora 13 and various Debian-based distros
xdg-open opens all URLs that don't have a
file:// scheme in a browser if it doesn't run in a
supported desktop environment. The way it tries to detect which
browser to use depends on the distribution.
As xdg-open is just a shell script you can easily adapt
it to your needs.
source
Abort drag-and-drop from a busy program
In most operating systems or window systems you can abort a mouse
drag handler by pressing the Escape button. And sometimes you can
cancel the even by finding or using a "drag
cancel" target like Mac os's top menu. For example in most
Windows you will notice cursor changes to circle with line
through it, like a classic No Smoking sign or No Diving type of
sign in the real world ;)
In the case of OP, they are using GNOME / Firefox:
In Gnome, in most cases hitting escape key before
letting go of mouse button will (should) cancel the drag/drop
event. It is even part of their dev guidelines:
http://developer.gnome.org/hig-book/3.2/input-mouse.html.en#drag-drop-override
Allow all mouse operations to be cancelled before their
completion. Pressing the Esc key should cancel any mouse
operation in progress, such as dragging and dropping a file in
a file manager, or drawing a shape in a drawing application.
and..
Allow the user to cancel a drag and drop operation by all of
these methods:
- pressing Esc before releasing the mouse button dropping the
object
- back on its original location performing a query drag and
selecting
- Cancel on the pop-up menu (see Section 10.1.3.1.2 ? Query
Drag)
- dropping the object on an invalid drop target.
I am sure it is the same in KDE from doing a few searches
On Mozilla dev's Drop Event
drop The drop event is fired on the element
where the drop was occured at the end of the drag operation. A
listener would be responsible for retrieving the data being
dragged and inserting it at the drop location. This event will
only fire if a drop is desired. It will not fire if the user
cancelled the drag operation, for example by pressing the
Escape key, or if the mouse button was released while the mouse
was not over a valid drop target. For information about this,
see Performing a Drop.
I never said this would work all the time in EVERY setup, for
example I don't think this works on Ubuntu which is kind of lame.
I remember the drag event abort working with the Escape key since
in wondows since version 3.1.
In all MS Windows operating systems in almost all (properly
coded) applications: - hitting the escape key before releasing
the mouse button during a drag/drop mouse event will cancel/abort
the handler function.
For example in Google Chrome on Windows7: - drag a tab off the
toolbar as if you are going to detach it and before letting go,
hit your keyboard Escape key. It should abort the drag and return
your tab.
source
How to set default "Page Setup ?Page Size" as A4 in Firefox?
- In the address bar, type "about:config".
- Enter "print.postscript.paper_size" in the filter box and
press Enter.
- Double-click the entry named "print.postscript.paper_size".
- Enter "paper" in the dialog box and press OK.
source
How do I recover a form in Firefox *without* installing a plugin?
Do not restart your browser!
This solution is hit or miss, and works on Linux. In short: dump
the memory of the Firefox process, and search through it for
fragments of your text. It's ugly, but it's your last resort.
First, dump core using the gcore
utility, which
requires gdb (the GNU debugger) to be installed:
$ ps -e | grep firefox
7089 ? 00:02:23 firefox
$ gcore 7089
[New Thread 0xa8ffeb70 (LWP 8924)]
[New Thread 0xb25feb70 (LWP 8531)]
[New Thread 0x9d7feb70 (LWP 8527)]
... snip ...
[New Thread 0xb5ffeb70 (LWP 7099)]
[New Thread 0xb67ffb70 (LWP 7098)]
[New Thread 0xb72f8b70 (LWP 7097)]
Saved corefile core.7089
Note that a core dump may take several hundred megabytes of disk
space.
If it succeeded, you can now breathe a sigh of relief. If your
text was lingering in memory by chance, it has been captured in
the core dump.
Now, try to remember a phrase from your essay (for example, "a
profound effect"), and use grep
to see if it's
present in the document:
$ grep 'a profound effect' core.7089
Binary file core.7089 matches
If you get "Binary file ... matches", good, it's there! If not,
try more phrases. If all of your grep
attempts
produce empty output, then your essay is probably gone forever,
and there is nothing you can do about it. (You can try grep
-R 'a profound effect' ~/.mozilla
, but I doubt it will
work)
Assuming you do get a match, the next task will be to slice out
pieces of the core dump containing the text you're looking for,
and use less
to look at it visually:
$ grep -B 20 -A 20 -a 'a profound effect' core.7089 > /tmp/out
$ less /tmp/out
(You could omit the first line and just say less
core.7089
, but I've found that less
tends to
blow up in memory usage when searching through such a large
binary file.)
Now, type /a profound effect
, hit enter, wait, and
page down until you see something recognizable:
Bam! If you don't like this result, see if there
are any others by typing 'n'. Also, be sure to proofread the
garbage so you don't end up posting:
my mind will often generate mush express ideas in that
language.
I imagine it gets clobbered like this because the memory holding
your essay fragments is no longer allocated and gets trampled by
subsequent allocations.
source
How to set Default Browser on Ubuntu from command line?
From the terminal, use
sudo update-alternatives --config x-www-browser
This will provide a list of installed browsers, similar to the
following (which is mine):
There are two alternatives which provide `x-www-browser'.
Selection Path Priority Status
-------------------------------------------------------------
* 1 /usr/bin/chromium-browser 40 auto mode
2 /usr/bin/firefox 40 manual mode
Press enter to keep the current choice[*], or type selection number:
Just hit the selection number for the browser you want.
source
Why is Firefox 3.0 so slow in Linux?
One of the cited reasons is that Linux version of Firefox is not
built using PGO. PGO stands for Profile Guided Optimization. Windows version of
Firefox is built on Visual C++ with PGO
IIRC Even Mozilla does not provide PGO compiled binaries for
Linux. They have given a HOWTO for building Firefox with PGO, but how
many of us can really do that?
If you want to get PGO compiled binaries, check Ted's PGO builds
OTOH Benchmarks show that even Windows Firefox over wine beats
native Linux Firefox. If you are really unhappy, then use Chrome.
Trust me, it is blazing fast.
There is a risk with PGO, since if the data provided is not
proper, the performance of the final build is even worse than
what it would be without PGO. Quoting from Wikipedia
The caveat, however, is that the sample of data fed to the
program during the profiling stage must be statistically
representative of the typical usage scenarios; otherwise,
profile-guided feedback has the potential of harming the
overall performance of the final build instead of improving it.
source
Is it possible to find the CPU hogging tab in Firefox?
Heavy CPU usage when you're idle is usually the sign of a
misbehaving website (as opposed to user actions taking a long
time, which often points to a misbehaving extension). It could be
a plugin, or it could be Javascript.
Identifying troublesome sites can be hard. Visually, look for
something that moves — most CPU hoggers are there to animate
something (automatically scrolling text, rotating ads, movies,
...). (Animated gifs don't use much CPU.)
If you're lucky, the CPU hogger also makes network accesses.
These are a lot easier to pin down to a site. Run tcpdump,
wireshark, or whatever your favorite network traffic observer is.
Web traffic is TCP and usually to remote port 80. This might
point to a site you're visiting, or it might point to a site that
embeds into a site you're visiting, typically an ad.
Ads and flash are common culprits, so Flashblock and Adblock can save you CPU time.
Chrome
runs one process per tab, so there finding a CPU hogger is
trivial. It's also faster than Firefox (but even more of a memory
hog if you have many tabs open). You might want to give it a try,
though it definitely has fewer bells and whistles, so it's not
for everybody.
source
How to secure Firefox traffic (+DNS) through SOCKS proxy under Ubuntu 10.04?
You can verify that all your traffic is going through the SSH
proxy by viewing the packets coming from your computer. This can
be done by putting your NIC or wireless card into Permiscuous
Mode and using a program like TCPDump or Wireshark(I recommend
wireshark).
Using these programs you can see the network traffic and filter
for a specific protocol of packets such as DNS. If you filter for
DNS while the proxy is on and receive any packets (labeled as
DNS) then at least some DNS requests aren't going through the
proxy. The reason for this is because if they are going through
SSH the only traffic you will see will be SSH.
There's a few things you need to watch out for, some plugins such
may access the internet without using the proxy setting and can
leak information. Firefox has a host of great addons which help
make sure that everything goes through the proxy, check those
out.
Good luck!
source
Firefox, two Linux machines, one X-server
Ok...don't know if this will work, but it's the first thing I'd
try:
How about if you create a second script on each machine, which
doesn't try to create the new tab, just a new instance. If you
don't have FF currently running on that machine, you use this new
script, but if it's already running, you use the old script that
creates the new tab.
If this works, you might be able to do some regex parsing of ps
output in a single script to see if FF is already running on the
machine, and either use the -new-tab switch or -no-remote,
depending on what it finds; but you probably want to wait until
this method is tested, as it's a fair amount of coding for
something that might not work....
source
How to install the real Firefox on Debian?
First, you need to remove the existing Iceweasel package (I think
you can use aptitude
as well):
apt-get remove iceweasel
Then, download the latest Linux
build of Firefox directly from Mozilla. Extract the files,
and navigate to that folder, and run it. If you want, make an
icon on your desktop. You can also make a link to the binary in
/usr/bin/firefox
to make it easier to launch.
If you want a package-based one, you can use Linux
Mint's Debian package repo. To do this, add the following
line to your /etc/apt/sources.list
file:
deb http://packages.linuxmint.com debian import
And
add the GPG key for that repo. Then, just run:
apt-get update
apt-get install firefox
And you should be good to go!
The default install is German, to install in any other language,
you can manually run:
apt-get install firefox-l10n-en-us
Or use firefox-l10n-en-gb
for British English.
source
Launching firefox on remote server causes local firefox to open the page instead
The -X
switch forwards remote X clients to your
local X server. Firefox must use some internal X Window system
communication mechanism to detect that it's already running on
your display and tell the already-running instance to open a new
window.
description
See
http://support.mozilla.com/ for help using the browser. This
manpage only describes how to run it.
options
-h,
--help
Prints the command line
options.
-g,
--debug
Starts firefox in a
debugger.
-d,
--debugger
Specify the debugger in which
to start firefox. The default is gdb. Used in
conjunction with -g.
-a,
--debugger-args
Specify arguments to pass to
the debugger. Used in conjunction with -g.
-no-remote
Don’t connect to any
other running instances of firefox. Use this if you
want to run firefox in an entirely new process. By
default, firefox will delegate a command to an
already running instance.
-ProfileManager
Start the profilemanager. Use
this to choose the profile you would like to run
firefox with. You will need to also use
-no-remote if there is already a running
firefox instance.
-P
profile
Start firefox with the
profile named profile. Will start the profile manager
if a valid profile name is not specified. You will need to
also use -no-remote if there is already a
running firefox instance.
-safe-mode
Start firefox in
safe-mode. This disables all third-party extensions, and may
be necessary if you are having problems with an extension
you installed.
-new-tab
url
Open url in a new
tab.
-new-window
url
Open url in a new
window.
-v,
-version
Print the current version of
firefox.
-UILocale
locale
Start firefox with the
specified locale locale. Use this to override your
environment
-preferences
Open the preferences
dialog.
-private
Start firefox in private
browsing mode
-private-toggle
Toggle private browsing
mode
-setDefaultBrowser
Set firefox as the
default web browser
-search
term
Search for term with
your default search engine
-jsconsole
Open the Error console. If
firefox is not already running, this will open a new
browser window too