The question is related to bash and Linux like Debian; Ubuntu or Linux Mint.
It’s known to open a new firefox window by bash on follow way:
Firefox
It’s known to open a new Firefox tab on follow way:
Firefox https://stackoverflow.com
How to open a new Firefox on a size of x% of display size by bash and without awk?
2
Answers
Open a new Firefox window, with specific size and URL
How I do this, using
xdotool
andwmctrl
:Save this in a script, then run them with an url as argument.
You could replace
--new-window
by--private-window
if needed.Nota: I use a 48 random chars string as bound to force firefox to title this string in order to ensure
wmctrl
will find only this window…For strictly answering about size of x% of display size:
You could replace 4th line:
by either:
or even…
You may find a full version on my site (not on github;) using
getopts
forYou can run:
Here is a suggestion for a script without awk:
Note, in my testing I found that if a Firefox window is already open, the size of the already open window is used. The
--width
and--height
parameters are then ignored.