Linux Chrome now with Flash & extensions (+adblock)

12 07 2009

The Linux version of Chrome has been coming along fairly quickly, the latest development build of Chrome (Chromium) for Linux now works with Flash and has extension support. It is also possible to configure the options (although there are still some TODO stubs so setting a proxy isn’t possible, EDIT: Try the –proxy-server argument). Tested under Ubuntu 9.04 64bit.

★ ☄ Sleepy kitten  ☆ ☽

★ ☄ Sweepy kitten. ☆ ☽

Update (05 Mar 2010): Google now have a proper version of Chrome with flash, themes, greasemonkey and extensions. Including .deb packages for Ubuntu (And packages for Debian, Fedora and OpenSUSE). Simply grab them from the the Chrome site, no other setup needed. They will also install repositories to keep things up to date. They are ‘beta’ but there more likely to be stable than grabbing the bleeding edge ones from the chromium-team repo (there is an ‘unstable’ packages too). I was running into issues with Chromium freezing up (mainly Flash related) which are not an issue with the official Google Chrome build.

There is also a fairly good Adblock extension. It includes the same filterlists as the Firefox one. If you need to block something extra hit ctrl+shit+k and you get a handy wizard where you can just click on whatever you want to nuke.

I also recommend giving the HTML5 version of YouTube a try. It seems faster than the flash one and things like seeking are quick. Full screen has a few issues. In order to activate it you need to first popout the video using the icon up the top right of the video, although it’s much faster to popout and Flash since it doesn’t need to rebuffer the video like Flash often does. I did have some sluggishness of the controls in full screen but the video playback works fine. Also for some reason it goes back to the Flash player when I am logged into YouTube with a user account, but works fine without a login.
/update

Old instructions:
To install under Ubuntu:
sudo su
echo "deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main #chromium-browser" > /etc/apt/sources.list.d/chromium.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5
sudo apt-get update && sudo apt-get install chromium-browser

To enable Flash support:
cd /usr/lib/chromium-browser/plugins
sudo ln -s ../../flashplugin-installer/libflashplayer.so

For extensions:
Start browser with the following:
chromium-browser --enable-plugins --enable-greasemonkey --enable-user-scripts --enable-extensions
Clink on a crx link (such as adsweep) and browse to chrome://extensions/ to check installation.





Open Video Codecs and Flash

8 05 2008

General
Theora
Xvid
OMS Video
Dirac / Schrödinger
Flash / flv / f4v


General


When a standard is open it allows for a huge adoption of it by anyone, anyone can use it and be sure that their data isn’t locked away and they have to deal with a specific company if they want to access their own content. Open Standards are what runs the Internet. The problem is that being an ‘Open Standard’ isn’t all that’s required. H.264 for instance is an Open Standard but its not royalty-free as there are patents on it, and it requires a licensing fee for implementation. While these licenses are cheap and easy to obtain for companies making them attractive, they block the formats for the non-commercial open source community. You are still allowing a 3rd party to dictate the requirements for access to your data.

This is where the much hated software patents come into it, you cannot distribute patented software in binary, precompiled form as a patent has to be applied to a physical object (thanks to a court case in America binary code somehow now counts as such, while other countries have various laws America is where Silicon valley is so we all loose out, some countries seen to be specifically making exceptions to allow patents to be applied on computers). You can distribute patent software in source code since its not an actual implementation of it. As for if you can legally compile that code for personal use various from country to country, there is some discussion on that here.

Firstly its important to have an royalty-free unencumbered codec for use in streaming video for things such as Firefox and Linux/Unix distributions to be able to legally play back these formats, patents are the reason that in order to support MP3 playback you have to install codecs (which in newer distributions is a lot easier and automatically setup). Commercial distros can afford to pay the patent license fees but this isn’t much help for for the open source community, or hobbyists, Ubuntu/Debian/Fedora/Gentoo/Arch/BSDs etc… aren’t commercial distros, they don’t charge you so they can’t pay for the codecs and if they could pay for them then the media is still in a format that is locked away accessible on the whims of the patent holder.

Since the HTML 5 draft (due to be finalized 4 years from now in 2012) included video streaming, having a decent open codec is more important now than ever before, originally the draft had mentioned the use of Ogg however Nokia and Apple raised objections concerned about hidden ‘submarine patents’, low compression ratio and lack of hardware decoders, Nokia wanting support for H.264 (which also happens to be the codec Apple is already using for iTunes/iPod video along with AAC for audio) or alternatively leaving out streaming video and letting corporations fight it out. H.264 being impossible to include in the standard.

As for the royalty-free video codecs that around around we have, Theora, DIRAC and OMS.


Ogg Theora


Firstly there is the oldest and most widely known Theora codec, often referred to as “Ogg Theora” as its contained in the Ogg container format, not to be confused with Ogg Vorbis which is an audio codec designed to be a royalty-free alternative to MP3, also lives in the Ogg container format and is often used to provide the audio for Theora videos in Ogg format.

Theora is a project of the Xiph.Org foundation (also responsible for the royalty-free codecs, FLAC for lossless audio and Speex a voice audio codec with an extremely good compression ratio), its based on VP3 which was donated to the public by its creator On2 who dropped all claims on it.

Unfortunately is seems that Theora is now out of date and has fairly bad compression when compared to other codecs. Xpih.Org are apparently working on an improved version of Theora for HTML 5 but with the binary format locked for compatibility its unclear to me if it can be improved enough to reduce file sizes and improve quality or if its just work on improving the tools around Theora.


Xvid


Xvid is apparently a royalty-free codec, originally from OpenDivX code it was forked when the DivX 4 closed source. The problem is that Xvid is based on the MPEG-4 standard which has 2 dozen companies claiming patents on it and licenses are apparently no longer being offered.


OMS Video


Sun’s Open Media Commons recently announced OMS Video, and open coded, the audio component is using the video component is based on H.261 which is out of the 17 year patent restriction, then adding newer unpatented technologies. Currently there isn’t anything from them yet code wise. Another worry is another Open Media Commons project, DReaM, its a DRM specification, as far as DRM goes it seems less evil since its designed to be open and royalty-free itself but its still DRM, in the end as long as the DRM isn’t built into OMS it shouldn’t be a problem but I have a small concern that they will use OMS as an infection vector for DReaM. The announcement and specification overview don’t mention DReaM at all other than saying its also part of Open Media Commons so its probably not an issue but worth watching. Fortunately DRM is its own worst enemy, DReaM is supposed to bring an open royalty free DRM system to allow music to interoperate but DRM seems less about protecting music and more about online music retailers locking clients to their system/devices, one someone has a whole database of DRM’d songs they will have to buy hardware that supports it for ever and keep shopping at the same place, they can never leave (at least not without breaking the DRM or loosing all their music), you can read more about why DRM sucks at the Defective By Design website.


Dirac / Schrödinger


The BBC who have been experimenting with streaming video created Dirac (wikipedia) which is designed to be completely unencumbered by using patent free technologies. Wikipedia says it is in the same range of compression as h264. There is an implementation of DIRAC called Schrödinger which has libraries, gstreamer plug-ins and is intended to get it in the Ogg container.


Flash / flv / f4v


Recently Adobe with their Open Screen Project, opened flash and the flv/fl4 format for use without license restrictions, the swf specification and the flv specifications are already published. This is great news for projects like Gnash however my main concern however is that flv has technologies using patents in it. For instance flv in Flash 9 supports AAC for audio and the Wikipedia article on ACC says:
“…a patent license is required for all manufacturers or developers of AAC codecs, that require encoding or decoding. It is for this reason FOSS implementations such as FAAC and FAAD are distributed in source form only, in order to avoid patent infringement.”. This makes it seem like even though the license restriction is removed, the open source community will benefit from having the API’s available but not be able to actual make a binary version of the flash client. You won’t be able to expect flash to be built into Firefox or shipped with Ubuntu. The real clients of Adobe will still likely need a license from Adobe unless they want to go to patent holders such as AAC and independently obtain licenses (likely to end up costing more in the end). Another format used is MP3 which has a whole load of parent issues, the MP3 decoding patents run out around 2012 and the encoding later around 2016 (Ive seen various different times but their fairly close, there is a big list of mp3 patents but it doesn’t say what is needed for decoding/encoding and whats optional, the latest is 2017), flv also uses yet another commercial proprietary codec Nellymoser.

These are just the audio codecs for the video there is H.263 since Flash 6 and as of Flash 8
VP6, I haven’t found much information on the license issues around them but they do seem to be patented. Wikipedia says “As of September 2006, an open-source implementation of the decoder is part of the libavcodec project, though producing or dealing with VP6 video streams inside libavcodec/libavformat seems to be discouraged and/or refused due to clashes between the ffmpeg’s developers and On2 technologies by a claim of Intellectual Property and Trade Secrets Infringement made by the corporation itself.”

As for Flash itself I have no idea about what other patents on the technology exist when we live in a world where anti-aliasing fonts is patented. In order for flash to really be open source friendly we would need to see it adopt patent free codecs for flv (such as DIRAC, Vorbis, Theora or OMS).





FreeBSD review and howtos from a Linux user

3 03 2008

I recently decided to give the new 7.0 release of FreeBSD a go and was fairly impressed. I did use BSD along time ago on a home server for a few months but pretty much forgot everything about it from back then.

FreeBSD Screenshot

Introduction
Firstly FreeBSD refers to both a kernel and userspace tools making it a whole operating system (userspace tools being the basic programs like shells and copy/move commands), this is different to Linux which is just a kernel and distros are technically called GNU/Linux to show that it is using the GNU userspace tools. You can install the GNU userspace tools on FreeBSD and you can also get GNU/FreeBSD hybrids such as the Debian GNU/kFreeBSD, and there was work on a Gentoo/FreeBSD but it never went anywhere, although there not really used much. Theres also not a huge point in either since all the userspace tools are based on the original Unix ones and try to mee POSIX standards etc %90 of the functionality is the same. There are some differences, for instance ‘ls –color’ on FreeBSD is ‘ls -G’, some commands require the flags to be in the correct order so ‘cp /directory /somewhere -rf’ won’t work as -rf is at the end instead of the start befoure the directories, when hitting the down arrow at the end of a man page it will exit on FreeBSD.

The other important difference between BSD’s and Linux is the license they use, Linux uses the GPL and BSD uses the BSD license. The GPL is actually more restrictive but in a way that is designed to guarantee everyones overall freedoms, by enforcing that the source remains open when redistributed. The BSD license basically says you can do whatever you want provided you keep the credits in, including taking the source and closing it or relicensing it. Apple took the FreeBSD userspace tools for OSX (and the Mach microkernel)

The difference in the kernels means that hardware is going to behave differently, device names in /dev/ are diffrent for starters. Ethernet cards have names that match the device model, for instance instead of “/dev/eth0″ you might have “/dev/re0″. My harddrive is “/dev/ad10s1″ instead of “/dev/sda1″ There will be differences in the hardware that is supported, wifi is apparently better on FreeBSD although there has been a lot of work in the Linux area recently and some of the drivers have been ported across (leading to some controversy due to the relicensing of BSD code under the GPL, although it has apparently been resolved).

The overall system feels fairly similar to Slackware and Gentoo, except with better package management IMHO.

Installing
Installing isn’t particularly hard, if you have installed either, its not a Ubuntu style userfriendly distro so you do need to partition and such but it didn’t require heaps of planning and was fairly hassle free. There is also the handy FreeBSD handbook which is actually fairly good, normally when I get told to read opensource documentation I find a bunch of out of date or setup in a completely different way by everyone but the guide writers. You can get away with only getting the 1st CD since that contains the basic system and if you don’t choose much in the way of packages you won’t need the others. If however you do get asked to insert the 2nd or 3rd CDs, at that stage you can just ctrl+c and reboot into a working distro and use ‘sysinstall’ to make any additional changes. Set the root password with ‘passwd’ and add a user account with ‘adduser’.

One installed you need to setup stuff, once again if your a Gentoo user this is familiar. FreeBSD has binary packages that can be retrieved automatically via ftp by using the ‘pkg_add -r ‘ command. FreeBSD however also can compile packages from source using ports, this is similar to Gentoo’s portage which was heavily inspired by ports. Ports seems a simpler and more stable system than portage with which I have had problems maintaining when updating packages can break or lock other packages.

Firstly I had some problems with my USB keyboard, in the end I had to disable USB legacy in the BIOS which was blocking BSD from using it for some reason, this has the unfortunate side effect of disabling the keyboard in the boot loader but its not needed for now.

Ports
Ports is the system that FreeBSD uses to get source code for packages, compile and install it. It is similar to Portage as it used ports as inspiration. Compiling from source has advantages over using binary packages. For instance patent issues aren’t a problem because its the source code, I am not a lawyer but source code itself cannot be patented as its a blueprint not an actual thing, and compiling the code your self is possibly ok since you can apparently violate patents for personal use (not too sure on that, some talk here, at the very least it means that to enfoce the patent requires going after individuals rather than FreeBSD so home users are unlikly to be at risk (unless patent lawyers frequent your premises), it also allows for people in countries without such laws access to the code), but as I said I’m not a lawyer and haven’t bothered to find much in the way sources. Secondly you get more control over what features you want in your program and thirdly you can optimize the program for a specific architecture.

Setting up ports, If you want to grab a new snapshot of ports you will need to run ‘portsnap fetch’ followed by ‘portsnap extract’. If you already have “/usr/ports” perhapses because you chose it when the installer asked you can apparently ‘cd /usr/ports’ followed by ‘make update’. This should use portsnap to update it. The full was about a 50mb download when I did it with ‘portsnap fetch’.

Ports has a similar thing to Gentoo’s portage useflags called KNOBS, you can see a whole list of them in /usr/ports/KNOBS. I believe you can also set CFLAGS like in Gentoo although I havn’t bothered.

Desktop
If your using it on the desktop you will need to install xorg and a desktop environment, you can “pkg_add -r gnome2″ to do that, which should pull in all the dependencies. Alternatively to build from source: cd /usr/ports/x11/gnome2 && make install clean
If you want to use gdm add gdm_enable=”YES” to /etc/rc.conf. If you don’t want Gnome you can so whatever other environment you want, Fluxbox, XFCE, KDE, etc… You will need to edit ~/.xinitrc and add “gnome-session”, “fluxbox” or whatever. You can then ‘startx’. At this point there will be a bunch of programs you need to install either from ports or with pkg_add -r such as firefox, pidgin, vlc (although totem should be in if you did gnome2), music players, etc…

Shell
The default shell csh might not be to your liking, a lot of people are experienced with bash which is the choice of most Linux distros although personally I prefer zsh which has better tab completion and fancy prompts included. ‘pkg_add -r zsh’ or ‘pkg_add -r bash’ or install them from ports. Then run ‘chsh’ which will give you a vi window, change the “Shell: /usr/bin/csh” to “Shell: /usr/local/bin/zsh”. Bash users will need to change it to bash obviously. If vi is a problem for you, you can probally edit ‘/etc/passwd’ with whatever you want. You will need to setup your shell rc, ~/.zshrc for zsh (although it has a config window on first time login).

Sound
You will probably need to enable sound, Theres a handy howto here, but basically ‘kldload snd_driver’, ‘cat /dev/sndstat’, look for the driver name right after “kld”, add DRIVERNAME_load=”YES” to /boot/loader.conf

Mount Linux ext3 Drive
Mounting your Linux drive, add the following entry to /etc/fstab: /dev/ad10s2 /mnt/ubuntu ext2fs rw 0 0 with whatever changes you need for your device name or mount point. You will need to make the mount point to with ‘mkdir /mnt/ubuntu’. If you get the error “mount: /dev/ad10s2 : Invalid argument” this could be because your drive is unclean, you will need to install the /usr/ports/sysutils/e2fsprogs/ and run ‘fsck.ext3 /dev/ad10s2′ (Assuming your using ext3).

NTFS read/write with NTFS-3g
Mounting a NTFS drive with read/write is a bit more work, you need to install ‘/usr/ports/sysutils/fusefs-ntfs’, however it needs the userspace source. You can get this with ‘sysinstall’ choosing “Configure>Distributions>src>All”, this will grab all the source its probably not all required but I couldn’t find the specific package and its handy to have the rest around anyway. Once you have that you can ‘ntfs-3g /dev/ad10s1 /mnt/windows’. Adding an fstab entry is again a bit problematic. Under 7.0 the mount command has had hardlinks to what it can call, mount_ntfs-3g isn’t in that list so you either need to patch mount or rename the current mount_ntfs, and link ntfs-3g in its place. Without that this was throwing an “mount: /dev/ad10s1 : Operation not supported by device” error.

nVidia drivers
The drivers work quite well on FreeBSD 7.0 but only on i386 (64bit is out of luck thanks to closed source nvidia drivers, 64bits OS is mostly useless anyway), the official ones refuse to install for me but the ones in ports work. Firstly you need the kernel source code installed, if you followed the NTFS-3g instructions above you will have the source already. If not you can specify just the base and sys source in sysinstall which is all thats needed for the drivers. Then cd /usr/ports/x11/nvidia-driver && make install clean Add this to /boot/loader.conf nvidia_load="YES" Now you need an xorg.conf file, by default BSD just relies on the autoconfig magic in the latest xorg releases so we need to force it to generate one with: Xorg -configure then copy the newly created xorg.conf.new to /etc/X11/xorg.conf. If you don’t want to edit the xorg by hand cd /usr/ports/x11/nvidia-xconfig && make install clean then nvidia-xconfig will change the “nv” driver to “nvidia”.

Compiz Fusion
Firstly if your on nVidia hardware you need to enable some xorg.conf settings, you can do them with nvidia-xconfig if you installed it above nvidia-xconfig --composite && nvidia-xconfig --render-accel && nvidia-xconfig --add-argb-glx-visuals -d 24

Now install Compiz with: cd /usr/ports/x11-wm/compiz-fusion && make install clean When you want to start it use LIBGL_ALWAYS_INDIRECT=1 compiz --sm-disable --replace ccp and for the Emerald decorationsemerald --replace. I had some problems with emerald not starting right away and drawing no decorations but after a while it loaded fine without me noticing and now starts fine. You will probably want to make Compiz start automatically, there are various guides on Compiz around that give you different ways. The config programs should be in System>Preferences for Compiz and Emerald, otherwise use ‘ccsm’ and ‘emerald-theme-manager’.

updatedb
For those of you who use ‘locate’ command to find files, you will probably want to update the database, you might have already noticed that ‘updatedb’ isn’t a command. The actual command is ‘/usr/libexec/locate.updatedb’ but this will give you a warning as running it as root will expose hidden files that only root or specific users should see to the database (not such a problem for single users), you can however run the cron job manually for a safer database with: /etc/periodic/weekly/310.locate

Flash
One of the main problems with Desktop FreeBSD is that Flash has no native port for FreeBSD thanks to Adobe (Even though there is a Solaris port thanks to Sun working with Adobe, you can have your say on the flash development blog, also an online petition exists for what little use they are with over 5000 signatures(and spam bots)). There has been some talk on the mailing lists of a native FreeBSD port.

The only real solutions seems to be to use Flash 7 or possibly Windows Firefox under Wine ☹ (PC-BSD Apparently ship a Windows Firefox PBI)

If you want to try the Linux version of Flash 9 which freezes for me (and everyone apparently), you need to install the Linux plugin /usr/ports/www/linux-flashplugin9 and the wrapper /usr/ports/www/nspluginwrapper/. Then run nspluginwrapper -v -a -i to register the plugin. Check in ‘about:plugins’. Alternatively you can try Flash7 with a wrapper, there is also another wraooer /usr/ports/www/linuxpluginwrapper but it wouldn’t install for me.

ETQW [unsolved]
I though I would give ETQW a go under FreeBSD, unfortunately I ran into problems with the Linux compatibility layer, I’ll post the steps here in case its of use to someone trying to do something similar or can offer a solution.

Firstly the installer didn’t give the default path but entering one works however it then failed to make the path so you need to make it manually, then it failed to read from the cdrom (although I didn’t really look into it since you can just copy the files across manually, possibly manually mounting it manually would have solved it). Copy the correct files into the base directory.

When running the etqw binary I get an error about missing sdl libraries “./etqw.x86: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory”, You can fix this with cd /usr/ports/devel/linux-sdl12/ && make install clean

You will need to brand you etqw binaries as Linux ones, change to your etqw directory and run brandelf -t linux * also brandelf -t linux pb/* might be needed.

Then run: portmaster emulators/linux_base-fc4 to get all the Linux compatibility stuff installed (if using portmaster you need /usr/ports/ports-mgmt/portmaster/ installed)

Then there I got “./etqw.x86: error while loading shared libraries: /usr/local/lib/libX11.so.6: ELF file OS ABI invalid”, make sure that /usr/ports/x11/linux-xorg-libs/ is installed.

For the error “./etqw.x86: error while loading shared libraries: libjpeg.so.62: ELF file OS ABI invalid”, make sure you have “/usr/ports/graphics/linux-jpeg”. You can also try ‘sysctl kern.fallback_elf_brand=3′. But those didn’t work for me, I notice that etqw ships its own libjpeg, I tried replacing that with the /usr/compat/linux/usr/lib/libjpeg.so.62 one it seems to work but now I get another error “./etqw.x86: error while loading shared libraries: /usr/local/lib/libX11.so.6: ELF file OS ABI invalid”, possible its loading the ones in /usr/local/lib instead of /usr/compat/linux/usr/X11R6/lib/libX11.so.6 but I don’t know and thats about all I can think of now.

Also make sure you have linux_enable=”YES” in /etc/rc.conf and run ‘/etc/rc.d/abi restart’ to enable the compatibility layer stuff if you didn’t already have it done.

Wine
Wine works fine under FreeBSD, to install: cd /usr/ports/emulators/wine && make install clean

Mounting samba shares
Firstly you need to install Samba with /usr/ports/net/samba3/ && make install clean then you can manually mount it with the following: mount_smbfs //username@host/share /mnt/mointpoint

the -o options that you use in Linux such as username, password, credentials don’t work on FreeBSD’s version. If you want to make it automated, edit /etc/fstab and add: //username@server/share /mnt/mountpoint smbfs rw 0 0 Then edit /etc/nsmb.conf and check the example near the end. Alternatively you can put them in ~/.nsmb.conf for a per user solution.








Follow

Get every new post delivered to your Inbox.