This feed contains pages in the "linux" category.

I came across a cool little tool called Nuvola that is a wrapper around various cloud music services such as Grooveshark and Google Music. It not only makes them into full applications but does things like add support for scrobbling and multimedia controls. I quite like having my web apps appear as full applications and use the "Make Application" function in Epiphany to do it quite often. That way typing "gma" will either switch to the running app or start up an new Gmail window from anywhere on the desktop and I find that regular desktop controls like alt-tab are easier to manage than tabs in a browser for apps that I am using regularly.

This rambling post does have another point to it though. A lot of the cloud music sites still use Flash to play the music. Flash has always caused problems because it's closed source and so people can't fix all the niggling issues. Instead we have hacky work arounds. I present a stack of them here.

When my laptop is docked at work I have two sound cards and for the most part it works okay. I can switch between them without any problems and use my headphones or speakers that are always plugged into my dock. When I tried Nuvola it refused to send the sound to the dock sound card and was not even showing up on the list of apps using the sound card.

TL;DR: apt-get install libasound2-plugins:i386

I will go into some more detail now. Nuvola is quite new and used the GTK3 toolkit. Flash is quite old and uses the GTK2 tool kit and we are waiting on Adobe to update it. So in the mean time we have to make them play nice together. To do this we use nspluginwrapper which runs flash in it's own process space. There is a howto on the Nuvola site for installing a compatible version of flash and that should at least get you flash running and some sound coming out.

Next up is the problem that this wraps an i386 version of flash and if you are running on amd64 like I am then it needs some extra libraries to make it work. To do that you need to setup multiarch support. Simply run dpkg --add-architecture i386 and run apt-get update as root. You can then install the asound plugins for i386 so that the Flash plugin can talk to pulseaudio. Run apt-get install libasound2-plugins:i386. Restart Nuvola and you should be good to go.

image

Posted Fri Nov 16 09:12:19 2012 Tags: /tags/linux

I have been reading up about BTRFS, or butter-fs as it is pronounced, and having a little play with it on my laptop. It's looking good but is still a little new.

It has been touted as the Linux answer to ZFS which is probably true, it does share a lot of the same features but the implementation is quite different as far as I understand it. It is going to be the filesystem in Linux in a couple of years time and Linus is already using as root on one of his laptops. ( That Linus quote does not really mean that much, only that he wants to try it just like the rest of us and it's only one laptop not the box he develops the kernel on).

At a low level it uses b-trees and copy on write (COW) to store both the metadata about a file and the data in the files. It treats both types of data the same storing them both using the same functions and by doing so allows them to keep the code simpler and the data less fragmented. Reading large files with a lot of metadata on ext3 can be quite a disk seek intensive process but with btrfs this is reduced greatly.

Feature wise it is very interesting. Due to the different way it allocates metadata and file data on the disk it allows them to do some clever things. It supports Raid 0,1 and 10 for both the metatdata and the file data it checksums the data as it is written to disk allowing checks for corruption as data is read a written. Sub sectioning and snapshots. You can snapshot at the directory level allowing you to do things like take a quick snapshot before an upgrade or big set of changes and then roll back if things are not working the way you expect.

You can defrag a file or directory on the fly to keep important parts of the system ticking on nicely although if you have plenty of disk space then fragmentation should not be a problem.

There is a really neat function that allows you to convert a current ext3 filesystem to btrfs in place. It just converts all the metadata to the btrfs format on disk and makes it point to the file data that is already in place. Then it takes a snapshot so that you can go back at any time to the disk as it was before you converted. As this is just a normal snapshot you can also mount it up and examine it online just like any others.

BTRFS has only been in development for a few years so it is still taking shape and I am sure that the functionality will grow and stability improve as time goes on. Currently the website warns not to use it for any data that you want to keep and that is probably good advice.

The only other thing I found is that with 2.6.31-rc5 kernel the btrfs module dies when you try to suspend so it's not for me yet.

Posted Fri Aug 28 14:19:09 2009 Tags: /tags/linux

As I mentioned in my last post there is a lot of pressure at the moment to get Linux to boot up as fast as possible. This seems like such a simple task at the outset. Stop all the unneeded stuff from stating and do it all in parallel but it is not as simple as that.

The chaps that got the EEEPC to boot in five seconds did some mighty hacks to get to that stage. They created a custom kernel that also included patches to streamline the boot process. Starting the bear minimum that the EEEPC may need before starting X windows and then taking the user straight to the desktop, logged in and starting the screen saver so that the system could continue to settle in the background. I like their logic. They set a target of five seconds and pulled out all the stops to make it happen. Now there are some problems with this approach and these give a clue to the reason why the current boot process is so slow.

The current linux boot process can cope in nearly every situation. From a regular desktop that has it's disks on a local controller the type of which is not important as it will load the correct driver. To large servers with complex disk arrays and network services to start. It can boot if there are no local disks but the system is mounted over the network. After the inital boot it can load drivers for all your devices such as mouse, graphics card, networking or USB stapler. Then it starts up services that your systems needs to go about it's business be that something to manage the networking or notice when you plug in a USB drive, or your printing services.

I do like the flexibility that is gained from such a dynamic boot cycle but if you are trying to get to the desktop as fast as possible then it does tend to slow things down a little. It would be nice if there was a boot option for optimised or full boot. So for the most part it tries to speed up the boot cycle at every boot. When it is up and running and can know what devices it has then only load those and don't try and guess next time. If the ssh server is rarely used then why not delay it stating till the disks have gone quiet? Do we need to start networking right at the offset if there are no nfs mounts?All these little speed ups can be applied as the system learns what is best then if you have a problem you can hit the backout button or the full boot button to reset things if you have a new device.

Posted Tue Mar 10 09:22:00 2009 Tags: /tags/linux

There is a big push at the moment to get the boot time for Linux down to a reasonable level. I think that the aim for Ubuntu's next release is 21 seconds which will be good if they can do it but not as quick as the three or four that it takes my laptop to recover from suspend to RAM.

I have not really used suspend to RAM a lot before always preferring to suspend to disk to conserve as much battery as possible. That was until a couple of weeks ago when I left my laptop in suspend to RAM mode to go out, it does that automatically when I shut the lid, and then did not come back to it till the next day. I thought that I had left it on charge but it turns out I had switched off the 4-way with it plugged in. Fully expecting the battery to be as flat as a pancake I just checked the battery before turning the power back on. To my surprise it was fine, loads of juice left. From that moment on I don't think I have suspended to disk since. My uptime now stands at 7 days.

This is the way to do it. I just wish that the laptop makers would look at this as a viable alternative and do the work to make this happend without all the hacks that are required today. Another nice thing would be if they provided a deep sleep function where it could write the data to a bit of Flash memory or disk after it has got down to say 10% battery so that if the battery does go flat the next boot could be more like a hibernate to disk recovery. Another good function might be to be able to say after 12hrs on suspend to ram, push the contents to disk for hibernation and power off.

My only doubt is what are the implications of taking the laptop on my bike while suspended. So far all has been okay but that may be more luck than judgement. My understanding is that it is just keeping the RAM refreshing and everything else is shut off so in that respect it should be not much different to my phone.

So a big thank you to all the people who have made the suspend to RAM "Just Work"(TM) in Linux.

Posted Tue Mar 10 09:22:00 2009 Tags: /tags/linux

Ubuntu Hardy and suspend to RAM

The latest version of Ubuntu finally allows me to suspend to RAM so that I can quickly sleep my laptop or shut the lid and have it save power, starting up quickly again. Not only that but it also allows me to do that with the kvm modules still loaded. This means that I can have a number of virtual machines running and not have to worry about shutting them down befor putting my laptop to sleep. ( I might need some more RAM now!)

Posted Mon Apr 14 22:57:33 2008 Tags: /tags/linux

Awesome window manager

Another day, another window manager.

I have tried a few window managers of various types from wizzy 3D rotating things to keyboard driven ones that you have to recompile to change a setting but I think I have found a really nice one for now and it is called awesome.

It's a simple full screen window manager if the style really manages your windows for you. As you launch another terminal then it squeezes the rest to fit them all on screen. It is a bit of an acquired taste but worth sticking with. They have thought this through and with things like tagging and different modes you can get a very productive setup with a little tweaking.

I have been using it now for the last couple of weeks and it is really starting to grow on me. It has a load of keyboard shortcuts that make using it on my laptop with the track pad a lot easier. It wastes very little space with things like title bars and boarders so with my 12" screen I can fit loads on.

You have to adjust the way you work and it does have a few things that are not perfect but you can work around a most of them. I have a set of gnome tools running in the startup to manage hot plugging of disk, network login and passwords so you get that automated seamless feel of gnome without all the bloat.

There have been some nice changes in the latest 2.1 release candidates that allow you to put a few things on the status bar at the top. So I have spent some time creating a little python script to put some stats and such up there.

Lets see how long I stick at this one.

Posted Tue Jan 15 11:01:40 2008 Tags: /tags/linux

Skype is eating my battery

I have just started using Skype on my laptop and so I installed the default version, 1.4.0.118. Then I had a play with the intel powertop tool and it was saying that Sype was waking my processor from it's sleep state 200 times a second which is not good for battery life. A quick search and I find that this is a known problem.

Luckily there are beta 2.0 versions Skype now available and this pretty much cures this. As a bonus it also has video support.

Posted Tue Nov 20 12:18:14 2007 Tags: /tags/linux

Setting Cities in OMWeather

There is a neat app for the homepage of the n800 that shows you a weather forcast for selected cities called OMWeather. If you can't find your home in the list then just visit the Weather.com search page and find your location. Then when you reach the page grab the code from the url just after it says '/local/' so in the UK it would be something like UKXX0241. Then pop that into the manual settings section of the omweather setup and you are good to go.

Posted Tue Aug 14 19:18:55 2007 Tags: /tags/linux

Bitlbee and weechat for a more keyboard based desktop

As I continue to change my desktop to be a little more geeky and keyboard based I have moved my IRC from pidgin (was gaim) or X-chat to WeeChat as I think that this will be a lot easier to script for intergration with wmii.

Next on my list was jabber chat, so I have migrated from Gaim to Bitlbee. This is slightly more extream as this is a IM to IRC gateway. You log your IRC client into a Bitlbee server and then all your buddies come up in that channel. I don't know how long it will last but it's fun to experiment!

Or perhaps I will just switch back to AWN and gimmie

Posted Tue Jun 19 19:18:34 2007 Tags: /tags/linux

Replacing the firmware on a Linksys WRT54G

I brought a WRT54G from Fon some time ago and since then have upgraded it to a fonerno and so today I decided to install the lastest test of X-wrt as usual I could not remember the atftp command so after a quick scan of the web I found this at the <a href="/cgi-bin/ikiwiki.cgi?page=OpenWrt&from=thoughtsplurge%2Fposts%2F2007%2F06%2F19%2FReplacing_the_firmware_on_a_Linksys_WRT54G&do=create" rel="nofollow">?OpenWrt forums:

atftp --trace --option "timeout 1" --option "mode octet" --put --local-file openwrt-xxx-x.x-xxx.bin 192.168.1.1

So pull the plug on your router run the command above, replaceing the correct firmware filename for xxx-x.x.-xxx, and plug your router in. It should load the new firmware and then reboot.

Sorted.

Posted Tue Jun 19 14:38:34 2007 Tags: /tags/linux
blog comments powered by Disqus