Giter Club home page Giter Club logo

Comments (7)

GRbit avatar GRbit commented on July 2, 2024

I've added custom *.desktop files after I've installed browsers, and it didn't detected it even after I've hit refresh button.

BUT after reboot it finally found these files I've created. At the same time, it still didn't found the original files. And, the most important: these new options don't work at all. When I click on them, nothing happens, also, nothing is written to logs.

Here is the original file:

[0] $ cat userapp-Firefox-R6VET0.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/opt/firefox/firefox-bin %u
Name=Firefox
Comment=Custom definition for Firefox

Here is the file I've created that was successfully detected after reboot (not after Refresh) BUT not working:

[0] $ cat firefox-work.desktop 
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Categories=Web-Browser;Browser;
Name=Firefox Work
Comment=Working profile of Firefox browser
Exec=/opt/firefox/firefox-bin -P Work --class=firefox-work --new-tab %u
Icon=firefox
Terminal=false
StartupNotify=true
StartupWMClass=firefox-work
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;

Here is an example of working chromium desktop file:

[0] $ cat chrome-gfknjhjpnhcfadibcopidfknmoennjmd-Default.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Vysor
Exec=/usr/bin/chromium --profile-directory=Default --app-id=gfknjhjpnhcfadibcopidfknmoennjmd
Icon=chrome-gfknjhjpnhcfadibcopidfknmoennjmd-Default
StartupWMClass=crx_gfknjhjpnhcfadibcopidfknmoennjmd

All files are located in ~/.local/share/applications folder

from browsers.

liias avatar liias commented on July 2, 2024

Hey, @GRbit, thanks again for testing. I tried out in VM and think I have a solid fix:

First, download latest Browsers version, this will help the app to identify Firefox as Firefox (so it adds Firefox profile support).

  1. Edit the original firefox desktop file
    sudo nano /usr/share/applications/firefox.desktop
  2. Add these two values to MimeType (they really should be there already but are not in MX Linux for some reason)
    MimeType=x-scheme-handler/https;x-scheme-handler/http;...
  3. Save the file and update the desktop file database
    sudo update-desktop-database
  4. Run Refresh in Browsers and reopen Browsers if required

So the root cause really is that those two scheme handlers are missing for some reason in MX Linux Firefox.
I could add some other mimetypes to detect, like html mimetype, but I'm a bit confused why MX Linux does not have them in firefox.desktop unlike all the other distros.

from browsers.

GRbit avatar GRbit commented on July 2, 2024

@liias
Wow! That's very cool that you've found time to work on it so fast!

I did exactly as you said, unfortunately, it doesn't help. "Browsers" didn't find just firefox, it detects only the two desktop files that I've created, even after sudo update-desktop-database and running refresh in "Browsers" and re opening it. Maybe reboot will change something, but I can't do it right now. Will post an update later.

I've downloaded the latest version from the website. Is it ok, or should I compile it from source?

from browsers.

liias avatar liias commented on July 2, 2024

Hmm, not sure why your system main firefox desktop file is not detected.

Another thing you can try is to rename/copy your own firefox-work.desktop to one of:

  • firefox.desktop
  • firefox_firefox.desktop
  • firefox-esr.desktop

Then Browsers will know that it's a firefox browser, and adds support for profiles.

Also, keep only this for exec:
Exec=/opt/firefox/firefox-bin %u

Browsers will take /opt/firefox/firefox-bin %u, removes %u suffix, and hopes for the best that rest is a program path that can be executed (if not absolute, then it searches from PATH).

from browsers.

GRbit avatar GRbit commented on July 2, 2024

Sorry for taking so much time to test it, but here is my update.

After renaming the original file to firefox.desktop and adding mime types to it, "Browser" app didn't found it even after a reboot. I don't why, but it is how it is.

The main problem for me is that my profile doesn't work. Like they were located with browsers, but when I choose them nothing happens. At the same time LibreWolf works fine, Chromium works fine, everything else just works out of the box.

I'm quite confused with your suggestion to keep exec Exec=/opt/firefox/firefox-bin %u. How do I choose profile then? I need to add -P Work to the command. Though, it still ends with %u suffix, so it should work, but, unfortunately, it doesn't.

from browsers.

liias avatar liias commented on July 2, 2024

Hey. Sorry, I realize I never responded on this.

The main problem for me is that my profile doesn't work. Like they were located with browsers, but when I choose them nothing happens. At the same time LibreWolf works fine, Chromium works fine, everything else just works out of the box.
I'm quite confused with your suggestion to keep exec Exec=/opt/firefox/firefox-bin %u. How do I choose profile then? I need to add -P Work to the command. Though, it still ends with %u suffix, so it should work, but, unfortunately, it doesn't.

If Browsers identifies that you have firefox installed (by the .desktop file name), then it reads the firefox profiles.ini file and automatically adds all profiles in Browsers and knows to use -P <profile-name> command line argument.
However, since last time I wrote this, Browsers now also supports command line flags for Exec= line, so custom command line arguments should also work now (but in case Browsers detects profiles, you should still not add the -P flag, otherwise there will be two -P flags and it would be indeterminate what will happen).

from browsers.

liias avatar liias commented on July 2, 2024

I will close this for now. Browsers will not detect desktop items which don't have https scheme handler, and I'm going to keep that, as it's a rare case and easy to fix per .desktop file when such browser exists.

I'm not sure about any other issues you had, but if there is still something up, feel free to re-open.

from browsers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.