I tried to use Docky, then I removed it and after that my browser (Chromium) can't be opened in maximum height, every time I should maximize it myself. (XFCE desktop)
I tried to use Docky, then I removed it and after that my browser (Chromium) can't be opened in maximum height, every time I should maximize it myself. (XFCE desktop)
How to startup an application (any) maximized
Starting an application via the script below, you can force any application
*
to startup maximized. If you either replace the main command in (a copy of-) your.desktop
file by the command to run the script (see further below how to do that) or add it as a quicklist shortcut, you can achieve exactly what you want.(
*
Some applications have a fixed, unchangeable windowsize, some windows open a new tab in a possibly already opened window)About the script
The script runs with the command:
The script:
pid
and theid
of the corresponding window) in the output of thewmctrl -lp
-command (for only 15 seconds, to prevent an infinite loop)Once the window appears, it maximizes the window with the command:
The code
How to use
The script needs both
wmctrl
andxdotool
Copy the script above into an empty file, save it as
run_maximized.py
Now edit your
.desktop
file:Copy the global
.desktop
file locally:XFCE version:
open the file with gedit:
Browse to the line:
(which is the first line, starting with
Exec=
Change it into:
where you need to replace
/path/to/script.py
by the actual path.Log out and back in. From now on, your Chromium launcher will open Chromium maximized.
Unity version:
open the file with gedit:
Browse to the line:
Change it into:
The add to the very bottom of the file the section below:
where you need to replace
/path/to/script.py
by the actual path.Log out and back in. From now on, your Chromium launcher looks like:
Important note
In a
.desktop
file, you must use absolute paths;~
won't work for example. This counts for.desktop
files in/usr/share/applications
,~/.local/share/applications
as well as commands in Startup Applications (which are actually called by.desktop
files in~/.config/autostart
).