I’ve been ragging on GNOME a little bit lately, so let’s balance things out by talking about something I found quite fascinating: the Gtk+ HTML back-end. This will enable you to run any Gtk+-application inside Firefox 4.0 (only Firefox 4.0 is supported at the moment).
It’s far from complete at this point, and as such, it’ll be part of Gtk+ 3.2. Gtk+ 3.0 introduced support for multiple back-ends, and this new HTML5 gdk back-end makes use of that feature. After compiling Gtk+ with ^aEUR“enable-x11-backend ^aEUR“enable-broadway-backend
, you’re almost good to go.
The second step is to enable web sockets in Firefox 4.0. This feature is disabled by default by Mozilla due to security concerns, but here’s how to turn it on. Once that’s done, you can enable the HTML5 back-end at runtime using the GDK_BACKEND enviroment variable.
The next step is to run a Gtk+-application, like so:
GDK_BACKEND=broadway your-application&<br/ >
firefox http://127.0.0.1:8080/
Alexander Larsson made a screencast of how this works.
This is cool stuff, but what’s the point behind it?
Would it enable writing “clouds” in GTK and running them on remote systems which might not have GTK installed?
It reminds me of X11 forwarding via SSH tunnel – albeit more user friendly.
Edited 2011-03-18 19:36 UTC
make a webapp in GTK instead of php etc and zillion of javascript lines.
GTK is much more straightforward to code actual apps.
No, because most of the (current) apps are single user. So every users still need to have an account on the Unix server and open a copy of the application. It can work, but is not very efficient compared to, let say (and hate), JSP.
It’ll be handy when/if we move off X11 to Wayland
I can’t watch the video (I’m still running Firefox 3.x). Is there a version accessible to people who don’t have an HTML5 browser and/or WebM?
Read the text underneath the video.
About that… Opera 11 has been released for quite a while. The video works fine on 11.01. There is also a WebM QuickTime plugin for those using Safari, but it’s still an alpha.
My reading of the text under the video was “You wanna watch this video? Yeah? Well fuck you – I’m going to make it difficult for you to watch it. Making petty political points is much more important to me than presenting stories to my readers.”
It’s not difficult to put multiple source tags on a video file, or to include a Flash fallback.
The text is also a lie. I watched the video on Vimeo using HTML5 – no Flash required.
In fact, the only Flash I saw in this experience was on OSAlert, shovelling adverts at me. IMHO that makes you quite the hypocrite.
You mean clicking a link to Vimeo is difficult?
o.O
Not the point really is it Thom.
Why not? Normally I don’t include the video, but just a link. If clicking a simple link is a problem for you then maybe you ought not be active on the internet.
The point is that you specifically put it in a format on page that only people with newest Firefox, Opera or Chrome would be able to play … to make a point.
If you weren’t trying to make a point you would have used the vimeo embed code.
Clicking the link isn’t the problem … it’s your attitude. One minute you are pro web for everyone then you say “you can just click the link” …
So which is it?
Edited 2011-03-19 22:12 UTC
What are you on about? I rarely embed videos. I usually just link to them. So, the status quo is you have to click. Just as it is in this article.
It’s just that for those of us that can watch it, I embedded a WebM video. It was a good practice round for me, too, since I hadn’t yet used the video tag. We also configured Apache properly to support WebM, so it’s good for us all around.
Once Firefox 4 hits, the VAST majority (~85%) of our readers will be able to playback WebM natively. We’d be idiots to not post video in WebM.
Edited 2011-03-19 23:34 UTC
I love it on OSAlert … you make a point is in plain English and you get the “WHAT ARE YOU ON ABOUT?” response.
If you went to all that trouble to support WebM on the server you could have just put a tiny bit of JS in there to switch to flash if WebM wasn’t supported.
http://diveintohtml5.org/detect.html#video-formats
3 Lines of JS !!! You already have jQuery running on this site so writing a bit of code that could take a find a video link and detect whether it should be flash, h264 or webM would be fairly simple to do.
Instead those who use Safari and IE7/8 will be left out. By not including these you have essentially given a middle finger up to those users, when it’s quite simple to support and well documented.
Edited 2011-03-20 01:26 UTC
There is a link there to go watch the same video in Vimeo^aEUR”nobody is being left out! Who are you defending!? Are you an IE8 user? Are you too lazy to click a link to view a video on Vimeo!? If you are, you have bigger problems than what browser you are using.
“This site is best viewed in … ” very 1998, thought we might have gotten away from that.
Tbh I wouldn’t have batted an eyelid if both you and Thom hadn’t been banging on about HTML5, Video Tag, pro device freedom … for the last few years.
I am using Firefox 4 btw and I am not too lazy to click the link.
– I’m not adding Javascript *just* to display a video. I’m not familiar with Javascript, and since it’s executable code, I’m not messing with it. Especially not when it’s taken from some random website.
– I’m not going to upload two videos just because you, for some mysterious reason we’re not privy to, don’t want to click on a link.
– OSAlert supports open standards. H264 is not open.
– Even though there’s not a whole lot happening in alternative operating systems any more, it’s still where our roots lie. Flash video and H264 are not always accessible to people running these operating systems, while WebM is accessible to everyone. Note that when I embed a YouTube video, I use the new iframe variant, which pushes HTML5/WebM if supported, so even alternative operating systems can play it.
– Within a few weeks, 85% of our readership will be able to view WebM natively in their browser – with IE9 and Safari users being able to install WebM codecs. It only makes sense to cater to 85% of our readers, and provide a perfectly adequate fallback (a link to a Flash version) for those remaining few percent of our readership unwilling to install Chrome/Firefox 4/Opera/WebM codecs.
I have given you my reason which are you are being effectively hypocritical … 3 times now, if you haven’t got it, I suggest you spend some on a reading comprehension course.
Then what is the problem?
No, YOUR attitude is the problem. Someone has to be at the forefront adopting new technology, otherwise we would still be stuck with table layout and font tags. What better site than OSAlert is there to start pushing the latest and greatest in open standards?
It’s not THAT far fetched to assume that OSAlert readers are on the bleeding edge. At least he did include a fallback link for those who are not as nerdy and are running old/stable versions of their browsers.
Maybe you would have a point if this was New York Times but it’s not. It’s a site mainly for nerds and tinkerers.
I’m a nerd and a tinkerer, but other than 1 test IE9 install, I have no webm capable browsers, as IE9 seems to suck badly in the interface, and very few off of my favorite plugins work in Firefox 4, at least not yet.
Feel free to continue making assumptions though.
That’s great. It’s still going to be the case that around 85% of our readership will use either FF4, Chrome, or Opera within a few weeks, while the remaining 15% can install a simple codec. How is that worse than forcing people to install Flash?
The time, they are a’changing. Within a few weeks, HTML5/WebM will be the most compatible way of publishing video on OSAlert. We’re only preparing for that moment. Flash has security issues, is heavier on the processor on anything but Windows, and is wholly incompatible with smaller operating systems. Us preparing for WebM is BY FAR the best fit for our target audience.
That is basically what I am being told by every video streaming service if I load Nexenta. So please…. that HTML5 is nowhere near being universally accessible. And with H.264 dominance will never be.
You are so full of wrong.
Firstly, he can embed whatever video he wants in whatever format he wants. He could have used RealPlayer if he wanted. The fact he used HTML5/WebM is a bonus to me because I don^aEURTMt have Flash and Vimeo is a no go because that’s Flash and I^aEURTMm not giving them my info just so I can access their HTML5 version.
Thom made this video watchable for me, where the majority of videos online I can’t see.
OSAlert^aEURTM readership is very technical. Many, I^aEURTMm sure, use more than one browser regularly.
You talk about making the video ^aEURoedifficult^aEUR to watch, but all I see here is someone whining that they were not directly catered for as an ungrateful YouTuber who wants his entertainment on tap. You’re happy to be register / login at Vimeo to watch their HTML5 version, yet not happy if the video doesn’t play instantly here at OSAlert.
The only “difficult” thing here is you.
We are supporting open-standards, if you don’t like that, please go get your entertainment elsewhere. We _will_ be right in the long run and our content _will_ be supported by the vast majority (if not all) in the short term.
I’m sorry, but you have completely failed to point out any way in which my message was “full or wrong”.
As you well know, the HTML5 video tag allows for multiple sources. You are also I’m sure aware that there is only one single release-version browser that supports WebM, whilst there are many that support h.264. It is highly likely that the original source video used for transcoding to WebM was in h.264. It would have been trivial and easy to have included both.
The fact that in the short term other browsers will support WebM is irrelevant at this point – the life of any story on OSAlert is days at most, not weeks – by the time WebM support is widely deployed this story will be old news. And for the record, I did not have to register at Vimeo to get their HTML5 version.
Your rudeness was completely unnecessary and is not appreciated. I expect that kind of childishness from the writers at MacDailyNews, not from OSAlert. I’m disappointed. I’m used to seeing a more mature and considered debate here.
This is wrong. Only Safari and IE9 support H264. That’s it. Opera 11 and Chrome support only WebM. Firefox 4.0 (released any moment now) only supports WebM. Most browsers support WebM, but do NOT support H264. Please check your facts. Of our readership, within a few weeks from now, about 85% will be able to play WebM natively. The remainder 15% will have to install a WebM codec, or resort to a link to a Flash version.
Check again. The source file is WebM, and nothing else.
In addition, you are forgetting something very important: we don’t have the funds to afford a patent license from the MPEG-LA. Since we hosted this video ourselves, we would’ve needed to pay up. We can’t, nor do we want to. Ergo, H264 is out of the question when it comes to us hosting video (instead of merely linking to it).
Edited 2011-03-21 16:13 UTC
Thom, you shouldn’t really throw stones about checking facts.
I had taken your note about the video being playable in “Opera 11 beta” as a factual indication that Opera 11 is still in beta. Opera 11 has of course been released. I chose a bad source for that information and for that I apologise unreservedly.
I’m not running the current release version of Chrome 10, but I am running Chrome 11 dev channel. In contrast to your assertions, Chrome 11 currently still includes support for h.264.
Since you didn’t provide a link to the original source video file (which I presume sent to you by a third-party) I will take you at your word that you didn’t need to cross-convert. It is good to know that there are some native sources of WebM video out in the wild.
The current situation with MPEG-LA licensing for h.264 video on the internet is that the license is free for distribution of video that is free for the end-user to view, and this applies through to the end of 2016 (at which point most of the licenses in the patent pool will have expired). I think even OSAlert can afford that license.
I really don’t give a crap about all the politics involved in web video, and I don’t enjoy having it shoved down my throat. What I do give a crap about is user experience. For me the user experience was poor. It’s 2011 now – things like web video should just work. (The follow-up from Kroc was just plain rude.) IMHO if the note had simply stated “for those with a browser not currently capable of playing WebM you can view it on Vimeo” it would have been an improvement. Even better would have been making use of HTML5 video as the spec intended and including two sources.
One final note. For me there is very little qualitative difference in providing web video only in WebM because “it’ll work for 85% of our users” to the dark days of the web when sites were built for IE-only with the same justification.
Well I don’t like Flash being shoved down my throat either every time I click on a link to a video nonweb-site…
Upgrade to 4. The RC will most likely be equal to final anyway.
Oh, or follow this link of course:
http://vimeo.com/21062117
Edited 2011-03-19 12:33 UTC
I *can* view the video with firefox 3.6! Which really confused the heck outa me. Its not perfect, but it works. You right click on where the movie is supposed to display and it has a n option to view the movie, even thought the play option is disabled.
I dug a bit more, its really the totem firefox plugin that’s really displaying it. I didn’t know I had a totem plugin for firefox, nor did I know that it could play WebM. Furthermore, it doesn’t work with all styles of HTML 5 video tag.
http://www.permadi.com/blog/2010/11/sample-webm-video-3/
That doesn’t give you the option of viewing in firefox with totem. Its greyed out. Looks like they are using a source tag within the video, rather than just specifying the src as an attribute in the video tag itself. I think I’ll hold off on doing any html5 video until ff 4 is out for real.
I did see this some time ago, but I didn’t know it was (going to be) an actual part of Gtk+, I thought it was only a hack.
It’s worth noting that it doesn’t actually transform your app into HTML(5), it’s just a series of (if I recall correctly) PNG images transferred to the browser through WebSockets. It’s cool nonetheless.
And hey, nice to see some WebM love popping up
Edited 2011-03-18 20:46 UTC
Yeah I’d guess that’s how it works too. Something like VNC in HTML5. Cool, but not as cool as a proper interface, like qtbittorrent or cloud9.
In fact, has anyone done VNC, or NX in HTML5 yet?
http://vnc.cloudsigma.com/
Why do these guys spend time in useless stuff like this? Why not spend time in something more important like Wayland instead?
Seriously.
It wont be useless for long. Think of it, it’s better than VNC. I hope to see this in Qt soon, but Qt-Lightning need to be stable first.
I see, thanks for clearing that up for me. And sorry about that, I just want Wayland to succeed.
Edited 2011-03-19 06:48 UTC
Maybe because it has been shown in the past that research only works well when we also let researchers look at seemingly unimportant things.
Look at J. J. Thomson and his seemingly useless experiments with cathode ray tubes. Shouldn’t he have been better off working on solid mechanics, tribology or the internal combustion engine instead at the time ? Yet his discovery of the electron is something which we all benefit from nowadays.
who are you to judge what people like to do?
if you want wayland go code it. if you don’t know how to code go learn it. don’t be “useless” then.
I’m nobody to tell these people what they should do, and that’s not my point anyway. But then don’t go around and preach about Linux on the desktop because with useless stuff like this and with idiots like you it’ll never happen.
Edited 2011-03-19 23:58 UTC
you mean like this Git branch:
http://git.gnome.org/browse/gtk+/log/?h=gdk-backend-wayland
which, btw, is possible because of the work alexl put into making GDK backends easier to write — as part of his work on the Broadway backend.
so, your comment is both uninformed and wrong. way to go.
Tried something like this about 2 years back, on Qt though. Just added a few lines to the code, and you got a web enabled version of your GUI. Don’t remember the name. It was a nice hack, but I don’t think many found it useful. Have not heard anything about it since back then.
they should have made an X11-HTML5 bridge instead.. would be more useful
X11 to HTML5 bridges most likely will come into existence. But there are very good reason not to.
Application -> Toolkit -> X11 -> HTML5
Better is going to be. Application -> Toolkit -> HTML5 reason 1 less step. With the alterations for wayland/dri2 Toolkit can still render opengl localy and send image out on HTML5.
Also HTML5 could be used to implement some of the interface processing. Interface processing X11 currently would not be told. Like displaying a drop down box. The information could be complete in the webbrowser no need to send a request back to application on server for information.
Besides the really horrid already exists. http://guacamole.sourceforge.net/
applicaiton->toolkit->X11->VNC server->VNC client->HTML5
And the really, really horrible option is when the VNC-client in the browser is a java-applet.
Now I can only support efforts like Wayland which don’t bother writing their model around network transparency, but act as a direct interface to graphical device (kernel driver), which has less constraints. These days application windows are combination of bitmaps and toolkit managed widgets, so this is a nice layer to forward over network, because it directly translates to separate but communicating client and server applications, like AJAX. There can also be a framework for forwarding whole desktop scene to the remote client (a browser).
Still Wayland could support network transparency, but ideally applications should be aware because they can reduce heavy graphical operations when over network.
In the end, there will always be applications which don’t (want) to know anything about different modes of operation, or are based on older protocols, and for those something like X(NX) or similar will be there.
I’m not so sure how this can be very useful when your programs are bolted down to a Web browser/Web page. Flash and JavaScript bug crash Firefox along with OpenOffice.org, anyone? Would this not also allow malicious site even easier access to any program running “in” Firefox?
It’s a pretty cool idea, but I fail to see how this is better than forwarding native X11 programs over SSH. I can see it being better than this “cloud” nonsense that seems to be picking up, though… but I also imagine this spawning many cloud-based services (not that I see that as a good thing).
My understanding is that this is fairly similar to X11 forwarding, in that the program state (and logic) is still stored on the remote server and only the output is displayed in the browser.
This would seem like a great feature in the Windows Terminal Services days, but currently it seems that you’ll be better off writing a web app, even if it’s for internal use only.
Actually it probably is closer to VNC or a remote Cairo, what happens is that there is a websocket opened and either bitmaps or drawing primitives are pushed towards the client which then renders it into the canvas control.
My personal guess is that bitmap deltas are pushed due to their ease of use, so basically what VNC does. This has been done in the past with applets.
You can’t easily forward your X11 programs over to Windows or non *nix OSes. So this feature is very helpful when you have a mixed environment. You do not need a windows vnc viewer anymore but a browser.
There are several X servers that run on Windows.
Google’s CR-48 and ChromeOS are good examples of what this can do, run the app on your desktop and access it from ChromeOS (or any netbook with the appropriate browser)
Web apps basically come in two flavors: public, like Facebook, and private in-house apps.
Apps like facebook won’t be based on this because it will never run decently on the majority of browsers. Even if we take IE6 out of the equation, which is not yet done today. There are more modern solutions to web app development that do not lack the problems of boatloads of PHP and JS that work cross-browser (Wicket being my favorite).
Private in-house apps don’t suffer from this problem, as you can usually count on a single browser to be used everywhere. And let’s for a second assume that there are no other forces that prevent this from being Firefox 4. Then there is no reason not to write such applications as Java applets, which is much much easier and works flawlessly.
The only web-app case I could imagine would be already-existing GTK apps.
However, I could very well imagine this as a replacement for X11-over-SSH, as others already said. At least until using an X11-capabale SSH client is a no-brainer on all platforms.
Did you really mention Java-applets ? This isn’t the 1990’s you know ? It is not something I would recommend to anyone. Java-applets are such a horrible experience for users. I’ve never heared anyone say: I liked it
The java-plugin is the browser plugin which currently gets exploited most of all. More than the browser itself, the Flash or Acrobat Reader plugin. Probably not due to the mistakes of Java itself, but ofcourse is caused by people not updating. Security updates from Oracle (before that Sun) also seem slow to me, but I could be wrong.
I think most people just prefer not to even install java or atleast disable the browser-plugin.
I would never recommend plugins or activex or any other proprietary technology anyway. The current flock of new browsers allows for so many new things I think by the end of next year anything development for in the browser can probably just use HTML/CSS/JS. They are even adding a subset of OpenGL support to the browser (called WebGL).
Adobe has released the first beta of a flash2html5 converter.
So far I know of only one reason to still use Java-applets, which is this:
http://netalyzr.icsi.berkeley.edu/learn.html
Because the user can give the applet access to the ‘OS’-API (well Java’s own abstraction of the OS) which is normally not available to plugins. It can be used to test your network connection, including test for IPv4 and IPv6 and DNS without going through the browser.
But I’m really glad I didn’t have to write it. As I understand it from people IPv6 in Java is a big mess.
*shrugs* java applets… has that not died already ?
It should… really it should… maybe the EU should ban java and the jvm all together if it’s not possible to kill this horrible evil thing call java applets.
At least bother reading what I wrote… hint: I was talking about highly specialized in-house apps.
When it comes to public apps then you use HTML+CSS+JS, or flash. And by that I mean HTML pre-5 and CSS pre-3, because HTML5 and CSS3 support won’t be built into the majority of browsers. Certainly not into IE6, which still *is* a major browser, and I’m not holding my breath for IE7 or IE8 either.
Edit: I’d like to add the fact that this guy made a fortune by writing a rather crappy Java applet:
http://www.minecraft.net/
Edit 2: By “using HTML+CSS+JS” I was talking about what happens on the client side; on the server you’d either use Java servlets + one of the advanced web frameworks, .NET equivalent, a good web scripting language, or if you’re a masochist, PHP.
Bottom line is still that web apps aren’t what this technology is useful for; it could be an X11-over-SSH replacement though.
Edited 2011-03-19 17:38 UTC
I think I read that correctly, I just don’t agree.
I do think in a few year HTML5 will have a large userbase.
Many webdevelopers are already not dealing with IE6 anymore depending on their audience.
As IE6 currently has 4.6%; IE7 10.06% and falling: http://gs.statcounter.com/#browser_version-ww-monthly-201002-201102
That graph also shows 30% IE8, which IIRC doesn’t support HTML5 either… but then, at least, that browser is new enough to hope
HTML5 support aside, my main point is that GTK-over-HTML5 is a translation layer that might at best come close to the quality of a normal HTML5 + CSS3 web interface. Chances are that in reality it will fall behind.
I guess we’ll have to see how many of the IE8 users upgrade to IE9.
With 52% of the windows users still on Windows XP it mignt not be all that fast:
http://gs.statcounter.com/#os-ww-monthly-201002-201102
What about demo applications? Try the app in your browser before installing.
If it would provide multi-user support (which could at least be hacked around it I guess) they would be very useful for cloud stuff. Netbooks and other mobile devices could run desktop apps, they wouldn’t have enough power for. Especially where you have a lot of computation going on or where you are handling huge amounts of data.
Or if you need a very convent way to emote control applications.
Browser in browser would also be funny and maybe even useful to evade censorship.