Icecat on Mobian on PinePhone
#11
(04-29-2022, 02:56 AM)wibble Wrote: You can edit the icecat .desktop file so that it launches with the LD_PRELOAD. It may be easier to use a wrapper script to launch it than to figure out exactly what you'd have to do to the exec line, but check the docs:
https://specifications.freedesktop.org/d...-variables

Thank you @wibble ! Should I expect to find the IceCat .desktop file in the /usr/lib64/IceCat directory? I just scoured it (including checking the “Show hidden files” option) but wasn’t able to find a file called “.desktop”   Undecided
  Reply
#12
The file isn't called .desktop - I'm referring generally to the launcher files that follow that standard format. It's probably something like /usr/share/applications/icecat.desktop but it depends on the package. If you list the files provided by the package and search for desktop you should find it. Something like:

dpkg-query -L icecat |grep desktop
  Reply
#13
(05-06-2022, 05:07 AM)wibble Wrote: The file isn't called .desktop - I'm referring generally to the launcher files that follow that standard format. It's probably something like /usr/share/applications/icecat.desktop but it depends on the package. If you list the files provided by the package and search for desktop you should find it. Something like:

dpkg-query -L icecat |grep desktop

Thank you again - we’re so nearly there aha.

/usr/share/applications/icecat.desktop is indeed the correct location, as confirmed by your dpkg-query command.

I have edited and saved the icecat.desktop file in vi wherever I found an “Exec=“ line - there were three:

Exec=icecat %u (beneath the “[Desktop Entry]” section)

Exec=icecat —new-window %u (beneath the “[Desktop Action new-window]” section)

Exec=icecat —private-window %u (beneath the “[Desktop Action new-private-window]” section)

The LD_PRELOAD argument I’ve been using to launch IceCat from the command line is:
LD_PRELOAD=/opt/glibc-2.35/lib/libm.so.6 /usr/lib64/icecat/icecat

So I’ve been trying various combinations of that in my edits of the Exec lines of the .desktop file, all without success so far. First, I started by putting that whole command immediately after the “=“ of each Exec line but that made the IceCat icon disappear from my app drawer so I reverted that change and put the whole LD_PRELOAD command just before the “%u” of each Exec line instead. The IceCat icon returned to the app drawer but when tapping on it the browser would still fail to load.

I tried adding “—“ tagged to the start of the LD_PRELOAD command but that didn’t work, so just in case, I tried removing the destination part of the command that goes “/usr/lib64/icecat/icecat” from the Exec lines but that didn’t work. I then tried removing the “—“ tags that I’d used before, in case that was misguided but still no dice.
I removed the LD_PRELOAD command from the second and third Exec lines, returning them to their original state, and left only the first Exec line modified in case modifying all three had been overkill but that didn’t help either.
Finally, I’ve tried prepending the whole LD_PRELOAD command at the start of the “Exec=“ line but before “Exec”, as well as on its own separate line just before the “Exec=“ line (along with all the variations already described above) - still no luck.

I’ve only ever written a script (copied character for character from instructions on a GitHub repo) and made it executable once before but that was a while ago and whilst I don’t remember what it was for I do remember that I felt pretty inadequate whilst trying it so if we can get this .desktop file edit to work that would definitely be quicker.
However, if we can’t then I’ll go and do some reading up on creating scripts and, if it’s ok with you, put my proposal/results here to see what you think?
  Reply
#14
The wrapper script should be something simple like:

#!/bin/sh
LD_PRELOAD=/opt/glibc-2.35/lib/libm.so.6 /usr/lib64/icecat/icecat "$@"

I'm assuming your command line above is correct - I would have expected it to be under /usr/bin or something. The "$@" is so that when you run the script any arguments get passed to icecat. The script needs to be somewhere in the path like /usr/bin, and you'll probably need to be root or use sudo to be able to put it there.
If you call the script /usr/bin/icecat-wrapper then you can make it executable with:

chmod +x /usr/bin/icecat-wrapper

Now in icecat.desktop edit the Exec lines so that instead of calling icecat they call icecat-wrapper instead of icecat, like:

Exec=icecat-wrapper %u
  Reply
#15
(05-07-2022, 04:28 AM)wibble Wrote: The wrapper script should be something simple like:

#!/bin/sh
LD_PRELOAD=/opt/glibc-2.35/lib/libm.so.6 /usr/lib64/icecat/icecat "$@"

I'm assuming your command line above is correct - I would have expected it to be under /usr/bin or something. The "$@" is so that when you run the script any arguments get passed to icecat. The script needs to be somewhere in the path like /usr/bin, and you'll probably need to be root or use sudo to be able to put it there.
If you call the script /usr/bin/icecat-wrapper then you can make it executable with:

chmod +x /usr/bin/icecat-wrapper

Now in icecat.desktop edit the Exec lines so that instead of calling icecat they call icecat-wrapper instead of icecat, like:

Exec=icecat-wrapper %u

Damn that was really above and beyond of you - thanks a bunch, it worked!  Big Grin

So now I’m just left wondering about that “proprietary software” warning in GNOME Software... I was looking at geolocation services in standard Firefox’s about:config a couple of days ago and was disappointed to see that the geo.provider.network.url is set to https://www.googleapis.com/geolocation/v...CE_API_KEY% then surprised that this was the case given that there’s a Github issue from last year pointing out that this should surely be set to Mozilla’s location services API*, not Google’s. I’ve since changed it to Mozilla’s but then I thought I’d better check IceCat’s about:config just in case and was actually quite shocked to see that it was also set to Google’s!

Obviously changing it to Mozilla’s is still far from ideal given that the purpose of GNU IceCat is (as far as I understand) to have a performant Gecko-based browser that’s as stripped of tracking as possible, including Mozilla’s tracking.
Is there a different location services API that would be more preferable to set from a reduced tracking perspective?

*https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%
  Reply
#16
Just set geo.enabled to false? If you want to enable it you'll have to find a provider you trust, or run your own server. Not something I've looked into, but perhaps look at the backends for UnifiedNLP as that's doing something similar for the Android location service.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  atinout binaries for mobian/debian? NeutralGrey 4 1,306 10-31-2024, 04:16 AM
Last Post: astylethargic
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 39 8,058 10-15-2024, 01:12 PM
Last Post: anonymous
  Pinephone seems tobe using 4G data instead of Wifi data grump_fiddle_reinstall 1 787 06-25-2024, 10:38 AM
Last Post: mikehenson
  Mobian-Kicksecure? 3460p 0 800 05-26-2024, 02:09 PM
Last Post: 3460p
  Mobian repository status henrythemouse 16 11,957 04-10-2024, 10:02 AM
Last Post: diederik
  cant verify mobian image at website gnugpg penguins_rule 0 864 03-18-2024, 08:54 PM
Last Post: penguins_rule
  unofficial kali linux for pinephone help needed pinesmell 5 5,008 01-08-2024, 02:50 PM
Last Post: ERPlegend
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 3,871 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 2,562 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 963 09-01-2023, 11:29 AM
Last Post: Mahgue

Forum Jump:


Users browsing this thread: 2 Guest(s)