IRC Log Viewer » #firebreath » 2012-10-10

IRC Nick Time (GMT-7) Message
krasnovu 00:10 hi all! I'm not a professional in Linux. in my openSUSE 11.3 in virtualbox firebreath 1.3, my project compiled well and now openSUSE 12.2 in firebreath 1.5 (and 1.6) not compiled with error:
linux-kr:/home/kr/projects # sudo sh [ 1%] Built target FireBreath_Cmake [ 2%] Building CXX object boost/libs/thread/CMakeFiles/boost_thread.dir/src/tss_null.cpp.o In file included from /home/kr/projects/FB15/src/3rdParty/boost/boost/thread/detail/platform.hpp:17:0, from /home/kr/projects/FB15/src/3rdParty/boost/boost/thread/detail/config.hpp:20, from /home/kr/projects/FB15/src/3
error screenshot
krasnovu 01:10 thanks everyone! i just update boost and project compiled
vipin_ 02:10 can any body tell me where is forum section here
I need to give my experience using firebreath
reichi 02:10 the forum is not working atm
you can use stackoverflow
taxillian is very active there
just tag your post with "firebreath"
bashmish 04:10 hello! is there anybody developing with FB on Mac OS 10.8.2?
reichi 05:10 hmm, i wonder if one can get a "DOMParser" Instance in a more, well, pretty way than evaluating a javascript which assign a domparser instance to the window and than invokes parseFromString on that
basically i have to create a DOM Document and return it at runtime
taxilian 09:10 reichi: there doesn't seem to be a way to "new" anything from inside the plugin
reichi 09:10 ok, so my little hack is fine ;)
it works good that way
good enough at least :)
taxilian 09:10 =]
matt5tephens 09:10 Can anyone detail exactly what registry entries / version resource strings are required for a dll to show up in the navigator.mimeTypes collection in firefox, chrome and safari on windows?
taxilian 09:10 I can tell you where to find it yourself
matt5tephens 09:10 please do, i've searched all over and been looking at the entries saved out by a firebreath plugin solution
thing is fire breath makes a large dll and all i need it to do is let me know that some other client software is installed to handle a particular file type in our intranet application
taxilian 09:10 tha'ts not a simple thing
there are several ways it could be installed, if it's a plugin
it could be in the browser's plugins directory, in an extension, or in the registry
it's the strings resource that actually has the mimetype info, though; most (if not all) browsers on windows seem to ingore what is in the registry and just look at all the DLLs
and the firebreath dll is not that big when you build in release mode
particularly when it's compressed for installation
matt5tephens 09:10 my release build of the basic firebreath plugin was 1.2mb is that about right?
taxilian 09:10 for uncompressed?
yeah, that's probably about right
are you so tight on disk space that 1.2 MB after install is a major issue? when you put that in an installer it'll be about 300-400K
matt5tephens 09:10 not really but it just seems a bit overkill given the very limited functionality we actually need
reichi 09:10 oh man
this is just incredbly funny
(at least for me)
taxilian 09:10 hehe
there is actually a lot of truth to that
reichi 09:10 totally
taxilian 09:10 matt5tephens: I guess to me spending 3x longer to do it by hand and risk losing a lot of workarounds and things that will ensure things are working correctly just to save a few hundred kilobytes is overkill
but it depends on your priorities
matt5tephens 09:10 no, i understand that but to be honest i feel like i dont have time to really understand the FireBreath code and build system to confidently add it to our build system. I think what you have done is brilliant but just not sure we really need that much stuff. In fact if the registry and version data is right i am not sure it even needs any real code in the dll
reichi - this is funny also
matt5tephens 10:10 it seems that chrome maybe uses the mime type from the registry and i think possibly what i am missing is the fact that the version resources need to be specific language code
just changed the language info from regular US English default of Visual Studio to the 040904E4 mentioned in the docs and about:plugins lists them in friefox and chrome now
many thanks taxilian
jakepetroules 11:10 is it possible to let a firebreath plugin register to handle a file extension, and look at the file and then decide whether it wants to handle this file or not?
if it doesn't handle it, the browser does whatever its default action is
i.e. my plugin could read an xml file, decide it doesn't want to handle it, and then the browser would use the default handling?
taxilian 11:10 jakepetroules: no; there are two reasons for this
first, because you aren't allowed to override default handlers (such as XML); if your plugin is observed doing this, most browser vendors will blacklist your plugin. I'm guessing on most, but the mozilla npapi guys told me this personally
second, because NPAPI doesn't have a mechanism for doing that; there is one handler per mimetype that is used, period
jakepetroules 11:10 great explanation, thanks
adnan 12:10 hello
taxilian 12:10 good morning
adnan 12:10 Actually, it is midnight here, anyways, my plugin works fine with all the three browsers now.
Suppose, i try downloading ccleaner from net, the plugin is invoked when the response recieved has octet-stream mime-type, and the address bar contains the final url, which i pass to download manager
But, if i try downloading an attachment suppose from my gmail, it also has octet-stream mime-type, but the plugin is not loaded in that case
I have an alert() function in onPluginReady() which is not called in this case
It seems if the page does not navigate to final url after 302 redirection, the plugin is not loaded
do you have any suggestions
JuanDaugherty 12:10 you need to do more for this case
do you work for Piniform?
taxilian 12:10 adnan: if you try to make a plugin handle the octet-stream mimetype your plugin will be blacklisted if mozilla ever sees it
and you'll cause problems that you're not expecting
doing a download manager that way you are describing is a Really Bad Idea
adnan 12:10 I am a student doing my computer science engineering
taxilian 12:10 just saying
adnan 12:10 ok fine, all other download managers are doing the same, i checked dap, fdm there plugins are registered for octet-stream
taxilian 12:10 up to you; I'm just telling you it's a bad idea
adnan 12:10 Believe me i am taking lot of care in choosing mime-types, only those on which open dialog window pos up, they are the ones i am targetting
can we get back to the problem
taxilian 12:10 I haven't a clue
honestly, I would never try what you're doing, ergo I haven't tried it, ergo I haven't a clue what might be causing it
adnan 12:10 is it possible to load your plugin on mouse click by user
taxilian 12:10 with javascript probably
not on an arbitrary site like gmail
adnan 12:10 isn't it possible at all
taxilian 12:10 to the best of my knowledge, no
JuanDaugherty 12:10 well
adnan, did you mean install it?
adnan 12:10 no loading it
JuanDaugherty 12:10 obviously loading it is what happens when it is sucessfully recognized as the handler for a MIME type
adnan 12:10 i suppose plugin is used by browser, when it detects mime-type, is there any other way of loading it so it acts as a sort of listener
taxilian 12:10 no
JuanDaugherty 12:10 once it's loaded
taxilian 13:10 well, once it's loaded in a specific page
but not browser-wide
JuanDaugherty 13:10 it's an indepedent runner in the browsers task envelope
plugin-container in the case of mozilla
you're free to you know, programm
taxilian 13:10 you could hypothetically do what you want with an extension
but I think I've mentioned that before
extensions could automatically add a plugin to each page, for example
which could then do the listening you wanted
it would be kinda hackish and somewhat prone to interference by the page, but probably doable
JuanDaugherty 13:10 once you have a running process you're free to do what you want
fire an indepedent ipc tree, whatever
adnan 13:10 ok i have a question which will make it clear
i have a url whose reponse invokes video/x-flv mime-type, if i type url in address bar the video starts downloading in download manager even if the mime-type is registered for flash player
taxilian 13:10 that will get your plugin banned
(according to the npapi developers at mozzila, but what do they know, right?)
adnan 13:10 flashplayer plugin is not invoked that way
taxilian 13:10 hmmm; that could be a valid point
you might be okay with x-flv, I suppose, though I wouldn't bet on it either way
adnan 13:10 This webpage convinces me i am doing right and mozilla people don't mind
JuanDaugherty 13:10 how far off its 1.18?
taxilian 13:10 that is intended to open a file with a plugin
not to download the file
JuanDaugherty 13:10 *is
taxilian 13:10 but I digress; if you're really careful, it might work
I dont' think it's a good idea, but that's your problem, not mine
continue your example to clarify what you're asking
adnan 13:10 it feels good now
JuanDaugherty 13:10 IRC is something else, innit adnan ?
adnan 13:10 suppose i am logged in to my account, , it is a file hosting site, as opposed to ccleaner site a click on download url won't navigate to another page, because you are logged in, so the final url is generated without navigating to another page, and open dialog of browser pops up instead of plugin being invoked
you can test it yourself with a simple plugin with alert() in onPluginLoad() function, i can provide the test url if you want
taxilian 13:10 first of all, I don't know for sure; I am only speculating
but there is a header that can be sent by the server that tells the browser to download something; when it is sent, even a .txt file is not opened in the browser but you get the save dialog
my guess (and you can confirm this by watching the headers in the response) is that that header is being sent and thus the browser ignores the registered mimetypes because it has been told to by the server
if that is the case then I would suspect there is nothing you can do about it
gmail attachments would almost certainly use that header
adnan 13:10 content-disposition:attachment; filename='abc.txt' is the header you are talking of, it might be the case, let me check
taxilian 13:10 exactly
adnan 13:10 You are absolutely correct, downloading firebreath tar.gz through plugin fails and it contains Content-Disposition: attachment; filename=firebreath-FireBreath-firebreath-1.7.0b1-8-g3a1d496.tar.gz whereas downloading any tar.gz file plugin takes the control
file from sourceforge
It is really a big issue then
In order to create browser integration module i started off with layer -3 network protocol, filtering all http traffic based on content-type, but https protocol came in between and i then i realized i need someting at layer 7, and it is a new blow
adnan_ 13:10 isn't it possible to change default action of browser on recieving content-disposition header
i am getting logged out again ana again
its fine
taxilian 13:10 no, as far as I know there is no way to change the default action
definitely not with npapi
maybe with an extension, but I don't know if there is a way it would either be a per-computer configuration or an extension
adnan_ 13:10 its a bolt from the blue
taxilian 13:10 well, you're trying to use the npapi mimetype viewing capabilities in a way they were never intended for
adnan_ 13:10 you recommended crossfire that day, unfortunately there is no support for opera yet, anyways thanks a ton for correctly diagnosing the problem, thanks again
taxilian 13:10 sorry :-/ good luck
adnan_ 13:10 bye
anyways last thing, firebreath plugins don't work with opera linux in case of octet-stream mime-type, rest it works well, you should update your website for opera linux support as it only shows firefox and chrome suport for linux
tfowler 14:10 this is a general question about BrowserStream… Can anyone tell me at a high level how one would properly structure their plugin to download a file using BrowserStream and then execute said file on the user's machine?
Here are the pieces I have in place (more or less) so far: MyPlugin, MyPluginAPI and MyBrowserStreamHandler...
taxilian 14:10 just download the file, save it to the disk, and then execute it
tfowler 14:10 where I'm having difficulty is determining when/where the best place is to instantiate MyBrowserStreamHandler etc.
taxilian 14:10 I would probably just use simplestreamhelper, if it were me
tfowler 14:10 good to know
taxilian 14:10 there is an example in FBTestPlugin
tfowler 14:10 awesome
thanks man!
taxilian 14:10 do you need to support IE?
tfowler 14:10 yes
taxilian: sorry for the late reply
taxilian 14:10 do some reading up on low integrity mode, then
any process you launch from IE when UAC is on is in low integrity mode
which means there are limits to where it can write, what it can do
tfowler 14:10 gotcha
thank you
jakepetroules 15:10 i was reading the manual page:
and while <param name="load" value="func" /> does work
plugin.addEventListener("load" … does not
taxilian 15:10 that is correct
because by the time you could call plugin.addEventListener("load" it has already loaded
jakepetroules 15:10 so it's not supposed to work like that?
i see
so basically you HAVE to use the <param> version for that?
taxilian 15:10 correct
jakepetroules 15:10 ok thanks
vp_: ok so i guess we're gonna have to refactor that JS a little :)
taxilian 15:10 until you join the room, I can't ask you to let me know when you join the room =]
jakepetroules 15:10 vp_: you caught all that right?
vp_ 15:10 jakepetroules: nope, jsut from "that is correct"
jakepetroules 15:10 i just told him that <param> worked and addEventListener did not
that's the only part you missed
vp_ 15:10 what do the param do?
jakepetroules 15:10 <param name="load" value="func" /> will execute the JS func() when the plugin has loaded
vp_ 15:10 ok
thank you firebreath guys
taxilian 15:10 yw. good luck