LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Starting Opera browser maximized (https://www.linuxquestions.org/questions/linux-software-2/starting-opera-browser-maximized-4175606539/)

PatD 05-23-2017 06:34 PM

Starting Opera browser maximized
 
Opera now doesn't open properly in Linux Mint anymore, it doesn't open maximized by itself.

If you open the launchers and change the command from "opera %U" to "opera %U --start-maximized", then it opens mid-size at first, then jumps to maximize. This is great!

However, this only works in each specific launcher, and the "new window" and "new private window" options from the icon on the taskbar/panel, well, their launchers are "missing" - can't find them anywhere.

Below is the file "opera.desktop" from "/usr/share/applications" in Linux Mint 18.1 Cinnamon.

it's the only file I can find that refers to "new window" and "private window" - I couldn't find anything about opera in "~/.local/share/applications/" but there's other copies of this in

/home/Username/.local/share/applications/userapp-opera-KE9M0Y.desktop
/home/Username/.cinnamon/panel-launchers/cinnamon-custom-launcher-1.desktop


But when I edit the 2 lines that say (in any or all of them)

"Exec=opera --new-window" to say "Exec=opera --new-window, --start-maximized"
and
"Exec=opera --private" to say "Exec=opera --private, --start-maximized"

there's no change in the window behaviour. What am I doing wrong here?

This is the file, I edited it as root even:

Code:

[Desktop Entry]
Version=1.0
Name=Opera
GenericName=Web browser
Comment=Fast and secure web browser
TryExec=opera
Exec=opera %U --start -maximized
Terminal=false
Icon=opera
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;application/x-opera-download;
Actions=NewWindow;NewPrivateWindow;

[Desktop Action NewWindow]
Name=New Window
Exec=opera --new-window
TargetEnvironment=Unity

[Desktop Action NewPrivateWindow]
Name=New Private Window
Exec=opera --private
TargetEnvironment=Unity

I'm really getting lost here - do we have someone who can see what I'm doing wrong? Does anybody know the right syntax for this? Specifically the "EXEC" lines.

Habitual 05-23-2017 07:16 PM

I answered you at https://forums.linuxmint.com/viewtop...?f=47&t=246130
advice below...

Habitual 05-23-2017 07:18 PM

Code:

Exec=opera %U --new-window --start-maximized

Exec=opera %U --private --start-maximized

"--start -maximized" is incorrect.

ondoho 05-23-2017 11:53 PM

i think the whole approach is wrong; windowmanagers remember window size & position and will attempt to re-open it accordingly unless the application explicitely tells it otherwise. is opera doing that?
have you tried, with an untainted .desktop launcher, to launch opera, maximize it, close it, and re-launch? it should now be maximized.

this has been true for every window manager i've used.
if cinnamon does not do it this way i'd say it is flawed.

edit:
hmm, maybe this is opera's doing after all.
have you tried starting it without '--private'?
maximized windows give visited webpages data about your screen resolution, so maybe opera does this on purpose?

BW-userx 05-24-2017 08:39 AM

yeah what @ondoho said, as I was going to mention that you are fighting against the Window Manager too. If it is set to remember last state of window when you log out by whatever means then it will recover that state when you start that window again. against how you have it set to open.

now it is a mater of who gets precedents over each type of window that gets opened in that Window Manager.

PatD 05-24-2017 09:32 AM

Habitual, that was one of the ways I tried, and it did nothing. And "--start-maximized" comes from a list of parameters for Chromium browser, found at

http://peter.sh/experiments/chromium...line-switches/

so what should it be, please? That list is of course not necessarily 100% correct.

As for the window manager, one of the files with these contents is in the cinnamon files, and changing it didn't help either.

I'm going to go back through and document everything in the next little bit, and see where that takes us. And again let everybody see it to aid creativity.

PatD 05-24-2017 09:47 AM

A while back after one of the updates, I don't know which one, Opera starting opening at mid-size. Nothing I tried from the standard playbook, like maximising-and-closing, had any effect.

After weeks of off-and-on searching for a solution, as you can see from the various questions i posted, I must have used the right search question and the Chromium Switches showed up. Absolutely wonderful.

So when I added
-start--maximised
to the opera launch commands that I could find, I thought it fixed. Alas, opera seems to load from OTHER launchers for 1. opening from a mail link for example these forums from my email 2. the "new window" option 3. the "New Private Window" option.

After again ging nuts for a little, I found 3 places where the string "opera %U' could be found.

I've changed all of them, one-at-a time and all-together, but nothing has worked so far.

I'm now assuming that it's either a plain syntax issue, or that ther's somewhere else I haven't found that's key to this.

Opera has become the best browser by far for me and my box - FF, Chrome and Vivaldi all have even worse issues (for me, anyway) so I have to keep at this, sometimes suffering fromextreme mulishness.

I will keep you all posted.

TedTheViking 09-17-2017 01:58 PM

Sorry for the necro, but I think I found out what is causing Opera to not open maximized.

When I go into the Opera settings and select On Startup > Continue where I left off, Opera will properly remember window position and size, and open maximized.

If I choose Open the start page or Open a specific page or set of pages, Opera will not remember window position and size, and will not start maximized.

Hopefully this sheds some light on the issue.

I'm running Opera 47.0.2631.80 on Mint 18.1 with KDE.


All times are GMT -5. The time now is 10:46 AM.