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

Your package seems to clobber a bunch of mime-types into running "Netflix-style", like Netflix-Launcher. #9

Open
vaguerant opened this issue Feb 18, 2018 · 1 comment

Comments

@vaguerant
Copy link

vaguerant commented Feb 18, 2018

$ cat /etc/mailcap | grep netflix
text/html; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
text/xml; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
application/xhtml+xml; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
application/xml; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
application/rss+xml; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
application/rdf+xml; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
image/gif; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
image/jpeg; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
image/png; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
x-scheme-handler/http; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
x-scheme-handler/https; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
x-scheme-handler/ftp; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
x-scheme-handler/chrome; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
video/webm; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"
application/x-xpinstall; chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com %s; test=test -n "$DISPLAY"

As you can see, all (?) web-related mime-types are being triggered via your custom Netflix user-agent and URL. This means, e.g. clicking a web link from another app results instead in opening a Chromium window (or tab if it's already running) on Netflix.com rather than what the user intended.

I'm a Linux amateur, so I'm not even sure how to go about fixing this. As-is, it kind of cripples the functionality of a web browser when clicking links is broken. Help?

EDIT: Again, I'm a Linux amateur, so I don't know what populates what, i.e. whether changes to /usr/share/applications/mimeinfo.cache are read into /etc/mailcap or what, but another apparent symptom of this can be found in the former:

$ grep netflix /usr/share/applications/mimeinfo.cache
application/rdf+xml=netflix-launcher.desktop;
application/rss+xml=netflix-launcher.desktop;
application/x-xpinstall=netflix-launcher.desktop;
application/xhtml+xml=netflix-launcher.desktop;
application/xml=netflix-launcher.desktop;
image/gif=netflix-launcher.desktop;display-im6.desktop;display-im6.q16.desktop;gpicview.desktop;
image/jpeg=netflix-launcher.desktop;display-im6.desktop;display-im6.q16.desktop;gpicview.desktop;
image/png=netflix-launcher.desktop;display-im6.desktop;display-im6.q16.desktop;gpicview.desktop;
text/html=netflix-launcher.desktop;chromium-browser.desktop;
text/xml=netflix-launcher.desktop;chromium-browser.desktop;
video/webm=netflix-launcher.desktop;
x-scheme-handler/chrome=netflix-launcher.desktop;
x-scheme-handler/ftp=netflix-launcher.desktop;
x-scheme-handler/http=netflix-launcher.desktop;chromium-browser.desktop;
x-scheme-handler/https=netflix-launcher.desktop;chromium-browser.desktop;

EDIT2: I believe that the root of the issue might be in the netflix-launcher.desktop file that you include in your package.

[Desktop Entry]
Version=1.0
Name=Netflix-Launcher
GenericName=Netflix Launcher
Comment=Launch Chromium pre-configured for Netflix
Keywords=Internet;WWW;Browser;Web;Explorer;Netflix
Exec=chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.86.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.84 Safari/537.36" http://netflix.com
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=netflix-launcher
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

Specifically, the MimeType line. Lay user guess: since it's installed after Chromium, it's gobbling up all these MIME-types you list here. I don't think it's really necessary for this shortcut to be handling any MIME-types at all, since its use case is to launch it directly when wishing to view Netflix.

I've now rectified this issue on my end. I removed the MimeType line from my personal netflix-launcher.desktop and ran a sudo update-mime, which corrected my mailcap. I then ran a sudo update-desktop-database, which updated my mimeinfo.cache . Everything now seems to be behaving as desired.

@BruneXX
Copy link

BruneXX commented Sep 15, 2019

Hi Guys, I'm here with something strange...
Currently in raspbian, if I run chromium with normal lancher:

  1. Then set the user agent switcher to netflix
  2. Go to netflix and play a movie
  3. I'm receiving the following error: M7121-1331 and stuck there... no way to go

BUT! .....

If I open chromium with the Netflix Launcher (and I don't know why, because is same user agent in both cases..)

  1. Open with Netflix Launcher
  2. Go to netflix and play a movie
  3. It works like a charm...

Anyone has experienced this issue? is relatively new because this was working well past week so..

Thanks!

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

No branches or pull requests

2 participants