Upside-down maps in chromium

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
After observing upside-down maps in chromium for some months a fix was
presented in:
https://www.raspberrypi.org/forums/viewtopic.php?f91%&t27%4315

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


Re: Upside-down maps in chromium
bob prohaska wrote:
Quoted text here. Click to load it

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


--  




/ \  Mail | -- No unannounced, large, binary attachments, please! --

Re: Upside-down maps in chromium
Quoted text here. Click to load it

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


Re: Upside-down maps in chromium
On 2020-08-01, bob prohaska wrote:
Quoted text here. Click to load it

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.

Re: Upside-down maps in chromium
Quoted text here. Click to load it
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+.
  
Quoted text here. Click to load it
  
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,


Quoted text here. Click to load it

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

Thanks for reading!

bob prohaska


Re: Upside-down maps in chromium
On 2020-08-01, bob prohaska wrote:
[snip]
Quoted text here. Click to load it
[snip]
Quoted text here. Click to load it

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.

Re: Upside-down maps in chromium
Quoted text here. Click to load it

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


Re: Upside-down maps in chromium
On 2020-08-02, bob prohaska wrote:
Quoted text here. Click to load it

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

https://wiki.lxde.org/en/LXPanel#Main_Config_File

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.

Re: Upside-down maps in chromium
Quoted text here. Click to load it

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


Re: Upside-down maps in chromium
On 2020-08-02, bob prohaska wrote:
Quoted text here. Click to load it

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

R

Re: Upside-down maps in chromium
On 2020-08-02, Roger Bell_West wrote:
Quoted text here. Click to load it

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).

Re: Upside-down maps in chromium
Poprocks wrote:
Quoted text here. Click to load it


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! --

Re: Upside-down maps in chromium
On 02/08/2020 20:30, Roger Bell_West wrote:
Quoted text here. Click to load it
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".

We've slightly trimmed the long signature. Click to see the full one.
Re: Upside-down maps in chromium
Quoted text here. Click to load it

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
https://www.fire.ca.gov/incidents/

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
.





Re: Upside-down maps in chromium
On 2020-08-02, bob prohaska wrote:
Quoted text here. Click to load it

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

Re: Upside-down maps in chromium
Quoted text here. Click to load it

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


Site Timeline