Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etcher AppImage registers itself as default text/html mime handler #3374

Closed
dlech opened this issue Dec 4, 2020 · 8 comments
Closed

Etcher AppImage registers itself as default text/html mime handler #3374

dlech opened this issue Dec 4, 2020 · 8 comments

Comments

@dlech
Copy link
Contributor

@dlech dlech commented Dec 4, 2020

  • Etcher version: balenaEtcher-1.5.112-x64.AppImage
  • Operating system and architecture: Ubuntu 20.04 amd64
  • Image flashed: N/A
  • Do you see any meaningful error information in the DevTools? N/A

I use the xdg-open command line tool to open .html files. However each time I run the Etcher AppImage, it registers itself as the default handler for the text/html mime type so running xdg-open my-file.html launches Etcher with an error code instead of opening a web browser.

Steps to reproduce:

  1. Verify current mime handler: xdg-mime query default text/html
  2. If it is already balena-etcher-electron.desktop, replace it with xdg-mime default firefox.desktop text/html then repeat step 1 to confirm that it is now firefox.desktop instead of ``balena-etcher-electron.desktop`.
  3. Launch Etcher
  4. Repeat step 1 and see that it has been changed to balena-etcher-electron.desktop

Expected behavior: Etcher should not register itself as the default handler for the text/html mime type.

@lurch
Copy link
Contributor

@lurch lurch commented Dec 5, 2020

How weird, I wonder if that might be an Electron bug or an AppImage bug? 🤷

Just did a quick search and found electron/electron#20382 which sounds very similar.

@dlech
Copy link
Contributor Author

@dlech dlech commented Dec 5, 2020

Your search skills must be better than mine, nice find 😄

@dlech
Copy link
Contributor Author

@dlech dlech commented Dec 6, 2020

Looks like this got reported upstream a few days ago: https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/180

As a workaround, I commented out this line: https://gitlab.freedesktop.org/xdg/xdg-utils/-/blob/v1.1.3/scripts/xdg-settings.in#L691

sudo vi $(which xdg-settings)

@aldomann
Copy link

@aldomann aldomann commented Jan 3, 2021

@dlech do you need to reboot the system for it to work? Just commenting the line didn't fix it for me.

@dlech
Copy link
Contributor Author

@dlech dlech commented Jan 3, 2021

I don't think a reboot is required. Did you also run xdg-mime default firefox.desktop text/html to repair the damage that is already done? Editing xdg-settings just prevents it from happening again.

@aldomann
Copy link

@aldomann aldomann commented Jan 3, 2021

My bad. Running xdg-mime default org.chromium.Chromium.desktop text/html fixed it for me.

@tzarebczan
Copy link

@tzarebczan tzarebczan commented Jan 26, 2021

Anyone know why this happens though? From the electron issue, it sounded like it was related to something with a - in the file name / package, but we're having a similar at LBRY and can't find out the root cause either.

@dlech
Copy link
Contributor Author

@dlech dlech commented Jan 26, 2021

Anyone know why this happens though?

It is a bug in xdg-utils: #3374 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants