The Linux Community Forum

Support => General Help & Advice => Topic started by: Zorba61 on September 10, 2018, 09:49:44 am

Title: Starting maximised (SOLVED)
Post by: Zorba61 on September 10, 2018, 09:49:44 am
Hello everybody,
I'm new to Linux and hoping to make the switch from Windows and currently duel booting w8 pro with Mint cinnamon and so far I like the look of it.The first problem i've encounted  is that Opera browser won't open maximised unless I leave it maximised when closing it and then it has to open on the last page I was on.
I know it can be done but being a complete novice I need to be talked through the whole process of opening the terminal and inserting/editing command lines.
Can anybody help?
thanks.
Title: Re: Starting maximised
Post by: Mark Greaves (PCNetSpec) on September 10, 2018, 02:54:51 pm
Does running this in a terminal
Code: [Select]
opera --start-maximized
start Opera maximised ?

Note the American spelling of maximized in the command .. NOT the British maximised.
Title: Re: Starting maximised
Post by: Zorba61 on September 10, 2018, 04:35:00 pm
Thanks for speedy reply.
Yes it does open it maximised.
Title: Re: Starting maximised
Post by: Mark Greaves (PCNetSpec) on September 11, 2018, 12:12:35 am
Well theoretically you could edit the launcher(s) for Opera so the "Exec=" line reads
Code: [Select]
Exec=opera --start-maximized %U
instead of the default
Code: [Select]
Exec=opera %U
If you don't know how to do this, just ask :)



[EDIT]

Open a terminal and run:
Code: [Select]
sudo xed /usr/share/applications/opera.desktop
when the text editor opens, find the 3 lines
Code: [Select]
Exec=opera %U
and
Code: [Select]
Exec=opera --new-window
and
Code: [Select]
Exec=opera --private
and change them so they now read:-
Code: [Select]
Exec=opera --start-maximized %U
and
Code: [Select]
Exec=opera --new-window --start-maximized
and
Code: [Select]
Exec=opera --private --start-maximized
SAVE the file.

Now try launching Opera from the main menu .. did it start maximised ?
Title: Re: Starting maximised
Post by: Zorba61 on September 11, 2018, 07:49:12 am
Thanks for your efforts ....no it didn't open maximised so rechecked and noticed when I save it I get this message in terminal.....


** (xed:10371): WARNING **: 07:47:13.828: Set document metadata failed: Setting attribute metadata::xed-spell-language not supported

** (xed:10371): WARNING **: 07:47:13.828: Set document metadata failed: Setting attribute metadata::xed-encoding not supported

I am saving it but should I be using 'save as'?
Title: Re: Starting maximised
Post by: Mark Greaves (PCNetSpec) on September 11, 2018, 12:30:30 pm
Run
Code: [Select]
xed /usr/share/applications/opera.desktop
and post the contents here.

also post any output from:
Code: [Select]
ls -a ~/.local/share/applications | grep opera
Title: Re: Starting maximised
Post by: Zorba61 on September 11, 2018, 12:52:38 pm
xed /usr/share/applications/opera.desktop....produces this

[Desktop Entry]
Version=1.0
Name=Opera
GenericName=Web browser
Comment=Fast and secure web browser
TryExec=opera
Exec=opera --start-maximized %U
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 --start-maximized
TargetEnvironment=Unity

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

and

ls -a ~/.local/share/applications | grep opera....produces this

opera.desktop
Title: Re: Starting maximised
Post by: Mark Greaves (PCNetSpec) on September 11, 2018, 01:01:40 pm
Okay run:
Code: [Select]
xed ~/.local/share/applications/opera.desktop
and make the same changes to that file .. then SAVE it .. then test.
Title: Re: Starting maximised
Post by: Zorba61 on September 11, 2018, 05:18:32 pm
Still not opening maximised......... ???
Title: Re: Starting maximised
Post by: Mark Greaves (PCNetSpec) on September 12, 2018, 01:37:18 am
As a test, run:
Code: [Select]
xed ~/Desktop/opera.desktop
when a BLANK file opens, make it read
Code: [Select]
[Desktop Entry]
Version=1.0
Name=Opera
GenericName=Web browser
Comment=Fast and secure web browser
TryExec=opera
Exec=opera --start-maximized %U
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 --start-maximized
TargetEnvironment=Unity

[Desktop Action NewPrivateWindow]
Name=New Private Window
Exec=opera --private --start-maximized
TargetEnvironment=Unity
SAVE the file and exit the text editor.

You should now have a new "Opera" icon on the desktop .. if you close ALL instances of Opera, then relaunch it from that new desktop launcher, does it start maximised ?

And can you explain exactly where you've been trying to launch Opera from ? (in the main menu ?, in a dockbar ?, from a panel shortcut ?, etc.)
Title: Re: Starting maximised
Post by: Zorba61 on September 12, 2018, 06:12:54 am
I have been launching it from the desktop icon.However I copied and pasted all the text you posted up above and now it opens maximised  ;D ;D
Thank you very much for your patience and efforts, your a star.
Maybe this old dog (56) can learn new tricks and stick with Linux. ;D
Title: Re: Starting maximised (SOLVED)
Post by: Mark Greaves (PCNetSpec) on September 12, 2018, 04:21:30 pm
No problem my friend, glad I could help :)
Title: Re: Starting maximised (SOLVED)
Post by: jrgsampaio on December 03, 2019, 06:18:52 am
Come on, you don't need all these coding and editing to get that behavior.  If it does not open in full screen, just click and hold on the top of the window and drag to the top of the screen until it turns full screen. Close Opera and open again. It should start in full screen. Now click&hold and drag it back, close and re-open.

JS
Title: Re: Starting maximised (SOLVED)
Post by: Mark Greaves (PCNetSpec) on December 03, 2019, 11:15:09 am
Did you actually read the OP ?

Quote from: Zorba61
The first problem i've encounted  is that Opera browser won't open maximised unless I leave it maximised when closing it

so he obviously knew that, he then continued...

Quote from: Zorba61
I know it can be done but being a complete novice I need to be talked through the whole process of opening the terminal and inserting/editing command lines.
Can anybody help?

So as the title of the topic wasn't specifically about Opera, I answered what was asked.

Where's the problem (specially considering the OP was happy with the result) ?
SimplePortal 2.3.3 © 2008-2010, SimplePortal