Upside-down maps in chromium

After observing upside-down maps in chromium for some months a fix was presented in:

formatting link

The fix is to run chromium from a command line, so: MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y chromium-browser

The inverted maps are fixed, so far nothing bad seems to happen viewing other pages, but it's rather clumsy. Can somebody point out how to make this default behavior when starting chromium from the icon in the menu bar?

Thanks for reading,

bob prohaska

Reply to
bob prohaska
Loading thread data ...

Edit the icon and insert just that line of of code.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

Now the depths of my ignorance is revealed: How does one edit an icon? Right-click brings up a properties menu, but no option to edit....

Thanks for writing!

bob prohaska

Reply to
bob prohaska

Y'know, it'd be much more helpful if you had posted the OS you're running as well as the WM/DE.

Not everyone is running Raspbian with LXDE on their Pis.

If this is LXDE on Raspbian, you may need to edit the .desktop file manually if there is no option to edit through the GUI.

You could use the `find' command on your home dir in your terminal to find the .desktop file and edit it accordingly.

Reply to
Poprocks

Sorry, it's Linux raspberrypi 5.4.51-v7+ #1327 SMP Thu Jul 23 10:58:46 BST 2020 armv7l GNU/L inux Running on a Pi3B+.

I've never intentiionally changed from LXDE, but during the transition to Buster the raspberry icon at the left of the menu bar got replaced by the Gnome footprint icon. Far as I can tell nothing else changed,

After listing all files in my home directory, find reports: find: 'desktop': No such file or directory

Thanks for reading!

bob prohaska

Reply to
bob prohaska
[snip]
[snip]

Sounds like you ran the command with the improper syntax. Its first argument is the starting-point directory you are searching. See the manpage of find(1) for more info.

Try something like this:

$ cd ~ $ find . -name '*.desktop'

The only thing is, this will list *all* .desktop files in your home directory, of which there may be several. If it yields too many files, you could try something like this from your home dir:

$ find . -name '*.desktop' |xargs grep -iH chrom

This will search for all .desktop files in your current directory and all subdirs, and will search each of those files for the text 'chrom' in a case-insensitive fashion and print the filename before showing the line that matches the text.

Reply to
Poprocks

Something seems amiss. Using copy/paste I got neither errors nor matches.

There is a directory ~/.config/chromium/Default which contains what appear to be files describing chromium's present and past states, but nothing whose name suggests it's a startup script or command line.

Have I got something deeply misconfigured? The replacement of the raspberry icon by the gnome footprint in the applications menu icon was a considerable surprise when it happened during the upgrade to Buster. Is it possible to have a mixed LXDE/GNOME desktop environment? Can one determine which desktop is in use? The "about" box from the menu bar reports "LXPanel 0.10.0". That makes the Gnome footprint on the Applications menu somewhat hard to explain.

Thanks for replying!

bob prohaska

Reply to
bob prohaska

Gotcha - I just took a look at this page on lxpanel:

formatting link

Based on skimming this, it seems like lxpanel's configfile is pointed to .desktop files that can live in the system-wide XDG directories for .desktop files, the main location being /usr/share/applications.

try:

$ find /usr/share/applications -iname '*chrom*'

and then if you find it, you can change the 'Exec' line in the .desktop file as root. This should then apply to all users system-wide.

Reply to
Poprocks

That hit pay dirt, revealing the line Exec=chromium-browser %U

It therefore appears I want something like Exec= MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y chromium-browser %U in its place. I'm a little puzzled about the meaning of %U, however.

Thank you very much!

bob prohaska

Reply to
bob prohaska

Probably a placeholder in case you drag a file (or URL) onto that icon.

R
Reply to
Roger Bell_West

This, exactly. Just leave the %U in place, as you have done with your example line above.

Just be aware that if you upgrade the Chromium package, this file will be replaced and you'll have to make your changes again.

Another option would be to create your own .desktop file and place it in /usr/share/applications or ~/.local/share/applications/ (if that local location is supported by lxpanel) with a different name like 'chromium-custom.desktop', and then change the line in wherever the configfile lives in ~/.config/lxpanel/ to specify chromium-custom.desktop as the .desktop file associated with the Chromium panel launcher rather than chromium.desktop (or whatever it is called).

Reply to
Poprocks

Or click on a URL in some random bit of text.

--
"A point of view can be a dangerous luxury when substituted for insight  
and understanding". 

Marshall McLuhan
Reply to
The Natural Philosopher

Is that strictly necessary? In those setups I'm fmiliar with (very few) you only put your private alterations and additions into the local file. It gets loaded in addition to and with higher priority than the standard but you don't have to care about all the changes and enhancements coming with version updates.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

There's still a fly in the ointment. Editing /usr/share/applications/chromium-browser.desktop to contain the line Exec=MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y chromium-browser %U chromium still inverts the map at

formatting link

However, if I use the line MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y chromium-browser in a terminal window to start the browser, the map displays correctly.

Just in casse it's relevant, I'm using the default unaccelerated video driver, if that matters. I tried the "experimental GL driver" and the machine locked up hard with chromium running if the machine went into power save move. Only way to unstick it was pulling the plug. Just for clarity, this is a Pi3B+, _not_ a Pi4 Any suggestions welcome!

bob prohaska .

Reply to
bob prohaska

OK, what's happening is that the icon definition isn't running your Exec through a full shell. Which isn't unreasonable.

What you need is a shell wrapper. Call it, say, /usr/local/bin/cr:

#! /bin/bash

export MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y exec chromium-browser "$@"

(the "$@" effectively means "pass on any parameters you received")

and chmod it 755.

Then turn the .desktop file to point at that:

Exec=/usr/local/bin/cr %U

Reply to
Roger Bell_West

I must admit this has become far more complex than expected 8-)

Since the workaround showed up in a Raspberry Pi Foundation forum it's likely to get fixed before too much longer (I hope!). For now I'll just make a one-line script and start it from the command line.

Icons are nice, but sometimes more trouble than they're worth.

Many thanks for everyone's help!

bob prohaska

Reply to
bob prohaska

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.