Sizing Problem w/ Opera converting command from Peppermint to Ubuntu [SOLVED]

Hi PCNetSpec,

I’m trying to take the command I learned in Peppermint for resizing Opera and bring it to the launcher in Ubuntu 16,04,3 so that Opera browser size itself correctly. I’ve tried playing with Gedit and Create launcher using this source, but I’ve had no luck.

Here’s the command I’m trying to convert from Peppermint 8 Respin to Ubuntu Unity 16.04.3:

opera-beta  --window-size=1600,850  %U 

Any help or pointers figuring this out would be greatly appreciated.

Thank you,

perknh

If running this command in a terminal:

opera-beta --window-size=1600,850

opens Opera with the right sized window…

First delete any user specific Opera launchers you’ve created at
~/.local/share/applications

Then edit the system wide launcher at:

sudo gedit /usr/share/applications/opera.desktop

and change it from:

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

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

to:

[Desktop Entry]
Version=1.0
Name=Opera beta
GenericName=Web browser
Comment=Fast and secure web browser
TryExec=opera-beta
Exec=bash -c "opera-beta --window-size=1600,850 %U"
Terminal=false
Icon=opera-beta
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=bash -c "opera-beta --window-size=1600,850 --new-window"
TargetEnvironment=Unity

[Desktop Action NewPrivateWindow]
Name=New Private Window
Exec= bash -c "opera-beta --window-size=1600,850  --private"
TargetEnvironment=Unity

I’m getting this warning in the terminal, PCNetSpec:

perknh@xerus:~$ sudo gedit /usr/share/applications/opera.desktop
[sudo] password for perknh: 

(gedit:4363): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

** (gedit:4363): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-enabled not supported

** (gedit:4363): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported

I don’t know what to make of it. :-\

[EDIT]

After a night’s sleep, I got it!

Once I got to the applications folder manually, I ran your command as root through the terminal. I then logged out and in, closed Opera-beta browser, and then reopened it. It’s now sizing itself as it should.

Thank you, PCNetSpec! :wink:

P.S.

I have to say it’s easier tweaking applications in Peppermint (Xfce) than in Ubuntu (Unity).

Great news perknh :slight_smile: