X
Tap here to go to the mobile version of the site.

Fóram Tacaíochta

Firefox opening infinite number of tabs when trying to open .m files from link in UBUNTU

Postáilte

I am trying to open a link to a .m (MATLAB) file directly in the Firefox browser (from a local site).

On windows this works fine and when the link is followed a new tab is created with the .m file converted to a HTML page.

On Ubuntu however it seems like Firefox is iterpreting the file as Objective-C source code and when I am trying to use Firefox to open the file (preferences -> applications -> Objective-C source code -> use Firefox) it keeps on repeatedly opening new emtpy tabs. I can set it so that the file is opening in e.g. gedit, but I would like to have the same behavior as on Windows i.e. a new tab with the file converted to HTML format. Is this possible? Is there a Firefox extension that I am missing? I read that you should use preview in firefox, but I don't seem to have that option (I have included a screen)

I am using Firefox Version 65.0 (64-bit)

I am trying to open a link to a .m (MATLAB) file directly in the Firefox browser (from a local site). On windows this works fine and when the link is followed a new tab is created with the .m file converted to a HTML page. On Ubuntu however it seems like Firefox is iterpreting the file as Objective-C source code and when I am trying to use Firefox to open the file (preferences -> applications -> Objective-C source code -> use Firefox) it keeps on repeatedly opening new emtpy tabs. I can set it so that the file is opening in e.g. gedit, but I would like to have the same behavior as on Windows i.e. a new tab with the file converted to HTML format. Is this possible? Is there a Firefox extension that I am missing? I read that you should use preview in firefox, but I don't seem to have that option (I have included a screen) I am using Firefox Version 65.0 (64-bit)
Luaigh

Tuilleadh mionsonraí faoin chóras

Feidhmchlár

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Tuilleadh Eolais

jscher2000
  • Top 10 Contributor
8498 réiteach 69426 freagra

Yes, this occurs when Firefox can't handle a type of content it has been instructed to send to itself: Firefox repeatedly opens empty tabs or windows after you click on a link.

I don't know the difference between Windows and Linux builds when it comes to MATLAB .m files. Do you notice any difference in extensions between your Firefox and Linux installations that might be relevant?

Yes, this occurs when Firefox can't handle a type of content it has been instructed to send to itself: [[Firefox repeatedly opens empty tabs or windows after you click on a link]]. I don't know the difference between Windows and Linux builds when it comes to MATLAB .m files. Do you notice any difference in extensions between your Firefox and Linux installations that might be relevant?
An bhfuil an freagra seo cabhrach?
Luaigh
cor-el
  • Top 10 Contributor
  • Moderator
17267 réiteach 156042 freagra

Do you have the correct fonts installed?

What happens if you change (add) a .html file extension?

You would normally need to use a web server to do conversions or at least make the page behave as an HTML page or there would be a script embedded in the page to use images instead of fonts.

Do you have the correct fonts installed? *https://developer.mozilla.org/Mozilla_MathML_Project/Fonts What happens if you change (add) a .html file extension? You would normally need to use a web server to do conversions or at least make the page behave as an HTML page or there would be a script embedded in the page to use images instead of fonts.
An bhfuil an freagra seo cabhrach?
Luaigh

Úinéir na ceiste

Thank you for the replies.I think you are right, on windows I get redirected to a server where the file is stored which is doing the conversion and on my ubuntu machine it tries to download the file localy. I looked in the source code of the site and if I follow the link that is written in the source it seems to work on my ubuntu machine. So maybe there is a java script issue?

Thank you for the replies.I think you are right, on windows I get redirected to a server where the file is stored which is doing the conversion and on my ubuntu machine it tries to download the file localy. I looked in the source code of the site and if I follow the link that is written in the source it seems to work on my ubuntu machine. So maybe there is a java script issue?
An bhfuil an freagra seo cabhrach?
Luaigh

Úinéir na ceiste

Hi again,

I have found that if I add "view-source:" before the link like so: view-source:http://x/y.m. It works, is it possible to set in preference that if there is a link to a .m file it opens it in source mode?

Hi again, I have found that if I add "view-source:" before the link like so: view-source:http://x/y.m. It works, is it possible to set in preference that if there is a link to a .m file it opens it in source mode?
An bhfuil an freagra seo cabhrach?
Luaigh
jscher2000
  • Top 10 Contributor
8498 réiteach 69426 freagra

Hi user9015897, that's a very resourceful idea. I actually don't know how you could "switch" the protocol from http/https to view-source. Unfortunately, links in web pages can't go to a view-source address (so modifying the link doesn't work).

On Windows, if I execute a command line such as the following, Firefox does accept the view-source: protocol:

"C:\Program Files\Mozilla Firefox\firefox.exe" -url "view-source:https://support.mozilla.org/en-US/questions/1261530#answer-1231296"

I don't know how to translate that for Linux, but as a temporary workaround, perhaps you could create a script that just takes the true URL and creates that kind of command line. ??

It might be possible for an add-on to hook into the Content-Type of .m files the way they hook RSS feeds and grab the file. I haven't looked into how they do that.

Hi user9015897, that's a very resourceful idea. I actually don't know how you could "switch" the protocol from http/https to view-source. Unfortunately, links in web pages can't go to a view-source address (so modifying the link doesn't work). On Windows, if I execute a command line such as the following, Firefox does accept the view-source: protocol: "C:\Program Files\Mozilla Firefox\firefox.exe" -url "view-source:https://support.mozilla.org/en-US/questions/1261530#answer-1231296" I don't know how to translate that for Linux, but as a temporary workaround, perhaps you could create a script that just takes the true URL and creates that kind of command line. ?? It might be possible for an add-on to hook into the Content-Type of .m files the way they hook RSS feeds and grab the file. I haven't looked into how they do that.
An bhfuil an freagra seo cabhrach?
Luaigh

Úinéir na ceiste

hi, Thank you for the answer. yes, writing this in the linux terminal works: firefox -url view-source:https://support.mozilla.org/en-US/questions/1261530#answer-1231296 I am currently using Selenium and geckodriver to automate a process where part of that process is to access this link. I'll see if I can use this workaround. Thank you

hi, Thank you for the answer. yes, writing this in the linux terminal works: firefox -url view-source:https://support.mozilla.org/en-US/questions/1261530#answer-1231296 I am currently using Selenium and geckodriver to automate a process where part of that process is to access this link. I'll see if I can use this workaround. Thank you
An bhfuil an freagra seo cabhrach?
Luaigh
cor-el
  • Top 10 Contributor
  • Moderator
17267 réiteach 156042 freagra

Doesn't create Selenium create a new profile folder on each start? In that case it would be weird to get multiple tabs opening because only default actions should be available.

Is there a default application for the ".m" file extension?

  • xdg-mime query filetype *.m
Doesn't create Selenium create a new profile folder on each start? In that case it would be weird to get multiple tabs opening because only default actions should be available. Is there a default application for the ".m" file extension? *xdg-mime query filetype *.m
An bhfuil an freagra seo cabhrach?
Luaigh
Cuir ceist

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.