How do I make Firefox start always maximized?
I am setting up Ubuntu with gnome for my grandma. How can I make firefox start ALWAYS maximized.
Solution 1:
It is possible to achieve this with a python script. The script requires python-wnck and python-gtk to be installed in order to work, although I think these are installed by default anyway.
Copy and paste this into a text editor and save it somewhere (eg ~/.maximised-firefox.py):
#!/usr/bin/env python
import wnck
import gtk
import subprocess
import time
firefox = subprocess.Popen(["firefox"])
b = True
while b:
screen = wnck.screen_get_default()
while gtk.events_pending():
gtk.main_iteration()
windows = screen.get_windows()
for w in windows:
if w.get_pid() == firefox.pid:
w.maximize()
b = False
time.sleep(1)
firefox.wait()
Then make this executable and copy to a system wide location by opening a terminal and running:
chmod +x ~/.maximised-firefox.py
sudo cp ~/.maximised-firefox.py /usr/bin/maximised-firefox
You can then, using your grandma's profile, edit the menus using the menu editor. You can get to this from the right click menu of the menu or by running alacarte
.
Then edit the firefox item and set the command to maximised-firefox
.
Solution 2:
Assuming you are using Compiz, you can force an application window to have certain characteristics (e.g. fullscreen, always maximized) by tweaking some settings:
-
Install CompizConfig Settings Manager
sudo apt-get install compizconfig-settings-manager
Open it and go to the Window Rules section.
In the
Maximized
text box, entername=Navigator
Finally, enable the Window Rules plugin (checkbox on the left).
This will cause Firefox to always start maximized. As a potentially negative side effect, it will also make it impossible to un-maximize Firefox.
Solution 3:
Based on this article, it may be because of resistFingerprinting config.
-
Load about:config in the Firefox address bar.
-
Confirm that you will be careful if the warning message is displayed.
-
Search for privacy.resistFingerprinting If the preference is set to True, the extra fingerprinting protection is enabled, if it is set to False, it is disabled.
-
If true, set it to false and restart Firefox.
Hope it helps.