Setting the window size and location for Opera

For a number of years my web browser of choice has been Firefox; however, the release of Version 57 (Quantum) broke all the “legacy” add-ons that I was using. (See: “Farewell past, happy dreams of days gone by”) My solution to this dilemma was to switch to a different browser and I found that Opera had all the features and plug-ins that I required. However, one thing that didn’t work “out of the box” in Opera was its inability to remember the size and location of its window.

“Farewell past, happy dreams of days gone by”
Giuseppe Verdi, La Traviata

Opera opened in a window that was centered on the screen, which was acceptable, but at much too small a size to be useful. This meant always having to grab a corner of the app’s window and drag it across the screen, to make the window bigger, before getting down to any useful task. So, the trick was to have Opera open with a customized size and location.

There are a lot of posts on the web complaining that this feature is currently unavailable and/or has been removed from an earlier version of Opera; however, there doesn’t seem to be a cohesive post providing a workaround. Fortunately, there are several posts discussing various command-line options that can be used with Opera and other browsers. By combining the information from a number of such posts, I was able to develop a command that would open Opera at a fixed size and in a fixed location on the screen.

I use a program launcher in the panel to open the browser so my procedure was as follows:

(1) Right-click on the program launcher for Opera and select Edit

(2) In the Command field, expand the command from opera %U to:

opera %U --window-size=1500,900 --window-position=80,80

(3) Click on OK to save the changes

Now, when Opera is launched from the icon in the panel, the browser opens in a window of 1500×900 pixels located 80 pixels from the left side of the screen, and 80 pixels from the top of the screen.

While the above-noted pixel values (the generic parameters are in the form x,y) work for my display, obviously these may be changed to suit a different screen size and user preference.

References:

Opera
https://www.opera.com

Opera’s Command Line Options
https://www.opera.com/docs/switches/

Sizing Problem with Opera Beta Browser [SOLVED]
https://forum.peppermintos.com/index.php?topic=5383.0

Thread: Opera Window Position/Size
https://forums.opensuse.org/showthread.php/393065-Opera-Window-Position-Size

List of Chromium Command Line Switches
https://peter.sh/experiments/chromium-command-line-switches/

Advertisements
This entry was posted in Web browser and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s