Friday, 17 August 2012

Musings on paying for my Open Source Software


So a little while ago I wrote a Ubuntu one plugin for KDE's dolphin. It works well enough but it is just a service menu and lacks the nice icons on the files and folders that the nautilus plugin has. This is due to an inherent limitation in dolphin plugins and in order to get this feature I would have to re-write the plugin as a version control plugin in C++. Unfortunately I'm working at the moment and don't really have the time but I could take a day or two off, write the plugin and put the files up on something like gumroad so people could pay to have them. Do you think people would pay for this ? I know I have several hundred installs directly from within dolphin and more from my website. What do you think about a license in which I give away the source with the app but say you can only edit it for your own needs and release it with a proper open source license (my personal preference is MIT) when a certain goal is reached? Is this a viable method of shipping software on Linux for larger projects with larger budgets and goals?
Lastly am I allowed to ask for money for a ubuntu one plugin? Since Canonical have copy right on Ubuntu. Other apps use ubuntu one is this any different? The U1 dev's seem sound enough and if it brings more people to the platform I'd say they'd be all for it but what do you guy's think?

Saturday, 7 July 2012

Install the Ubuntu One Dolphin plugin from within Dolphin

Quick update I've added the Ubuntu One Dolphin plugin to opendesktop.org so it should be in the "Download New Services" menu inside of dolphin itself soon for ease of install and use :)

http://opendesktop.org/content/show.php/Ubuntu+One+Dolphin+Plugin?content=152035

Sunday, 17 June 2012

Translate the Ubuntu One KDE plugin

If you want the plugin in your native language fill out the form below and I'll upload a new release with your language included later in the week :)

Translation form.

EDIT: Well done lads that was a heroic response :)

Here is the code with multi language added and licensed under the MIT license. (That basically means you can do whatever you like with it)


Figured I should start releasing in something other than tar balls. So hope you like git hub your probably going to be seeing a lot more where that came from.


We now have have:
  • Irish (Although this was me)
  • Finnish (3 Translations, We have some KDE lovers over there :) )
  • Hindi
  • German
  • Spanish
  • Bulgarian
  • Latvian
  • Norwegian
  • Dutch
  • Romanian
  • Greek
  • Danish (3 Translations from Denmark as well :) )
  • French
  • Portuguese
  • Catalan
  • Swedish
  • Polish
  • Arabic
  • Croatian
You should all be proud of your selfs.


Also here's the tar ball for every who like that method as well.



Note; I won't be uploading the tar ball as much because of git hub so if your language isn't included check github.

Saturday, 26 May 2012

KDE Ubuntu One Dolphin Plugin


So a while ago I switched to KDE because Unity wasn't really for me. While I've tried Unity again since and its much improved. I'm really liking KDE so I see no point in going back. However there were a few issues to overcome with my transition from Gnome 2 to KDE. Chief among them were the keyboard shortcuts and Ubuntu One Integration. Obviously the key board shortcuts were not a major issue because KDE is easily configurable but in terms of Ubuntu One it was a bit more of a struggle. There is a client out there  made by apachelogger but its old and still in alpha and the PPA didn't work for me. So I decided to use the Gnome client under KDE. Which worked but with a few issues.
  • KDE's file manager didn't have a plugin for Ubuntu One, like Nautilus does, so I had to use u1sdtool on the command line or the web interface to publish files and do other operations. 
  • It used the Gnome Keyring to store the token and I had to enter the password to it every time I logged in. 
  • The Control Panel was written in python and GTK and was ugly and slow under KDE.
As of 12.04 the Control Panel is now written in QT. So that issue is fixed. Also I learned that if I switch my login manger to lightdm it with automatically unlock gnome keyring if it has the same password as my login. So that was 2 issues down especially considering I like lightdm better than the kdm anyway.

That only  leaves the dolphin integration. Unfortunately the dolphin plugin was actually the only part of apache logger's Ubuntu One for KDE project that he didn't really like. He says it is no where near production quality. I therefore decided to roll up my sleeves and write my own.

First I decided to add some context context menus so I would be able to carry out common Ubuntu One operations without the need to use the console. So created a few .desktop files to configure them and created a ruby script to run the necessary commands.

#!/usr/bin/ruby

require "open3"

class UbuntuOne
  def unsync_folder input
    streams =  Open3.popen3 "u1sdtool --info="+input
    info = ""
    while(info != nil && !(info.include? "share_id"))
      info = streams[1].gets
    end
    if(info != nil)
      info["  share_id: "] = ""
      share_id = info.chomp
      exec "u1sdtool --delete-folder="+share_id
    end
  end

  def publish_file input
    streams =  Open3.popen3 "u1sdtool --publish-file="+input
    url = streams[1].gets
    puts url
    url["File is published at "] = ""
    streams.each do |i|
      i.close
    end
    exec "qdbus org.kde.klipper 
/klipper org.kde.klipper.klipper.setClipboardContents "+url
  end
end


#arg0 is the function to call
#arg1 is the file
input = ""
ARGV[1].each_char do |c| #put the spaces back
  if(c != " ")
    input += c
  else
    input += "\\ "
  end
end

puts ARGV[0]+" "+input
if(ARGV[0] == "unsync_folder")
  UbuntuOne.new.unsync_folder input
elsif ARGV[0] == "publish_file"
  UbuntuOne.new.publish_file input
else
  puts "Something went wrong :("
end

Note the ruby script only contains methods for the commands that needed some logic.

At the moment the menu for files support :
  • Publish and Copy Weblink 
  • Stop Publishing
And the menu for folders support:
  • Synchronize 
  • Stop Synchronizing
Honestly these context menus do nearly everything nautilus does except for showing you which files are in sync. Which means, I no longer have to drop to the command line to share files which is awesome.

To install the menu plugin just extract this tar ball into "home/yourusername/.kde/share/kde4/services/ServiceMenus/UbuntuOne/" and yes the tar ball was published with the plugin :)

If you have any issues or questions don't hesitate to ask.

I'm now going to take a look at apachelogger's old code for the version control plugin he wrote and the code for the git and svn dolphin plugins to see about showing what files are in sync, like nautilus does. I'm starting a job on Monday so I probably won't have the time for it for a while but I'll post it here whenever I finish it. Also on a side note I'll have to do it in C++ and I don't like C++ as a language but it'll get done ;)




Sunday, 11 March 2012

I'm in the Android Market

So I finally got off my back side and paid google to put a few of my apps in the Android Market or Google Play or what ever the hell they change the name to next. I have made a few minor update to Kings app and a big update not so much in code but in features to the Jupiter Broadcasting app.

The Jupiter Broadcasting app will now stream not just the audio stream but the video stream as well. This will only work on devices that have the codecs to support the stream so sorry if it doesn't work for you. Also, and this should be obvious but you never know,  it probably won't work over 3g ie. you connection needs to be fast enough to support the stream.

Also if you have installed these apps from my apks before you may want to uninstall them before getting them from the market. I signed them with a different key. So android will probably yell at you when you try and get it from the market.

Anyway here is the links to the market :
Jupiter Broadcasting
Kings App

And here is the updated source
Jupiter Broadcasting
Kings App


Lets say they are BSD licensed for the moment ie. do whatever you want with the code. If anyone wants to contribute anything back let me know and I'll setup a repo on google code or github.

Saturday, 24 December 2011

I think I might build my own tablet

So the raspberry pi looks like its gonna ship in January. Can't wait have so many great ideas of what to do with them. My favorite Idea is to make my own tablet.

I already have usb bluetooth and wifi dongles lying around so thats the connectivity taken care of. I'll need a Screen that there are linux drivers for. Although I'd like to find something cheaper than the one I linked too so if anyone has any ideas let me know. Maybe something that actually uses the RCA or HDI connectors on the raspberry pi. Then I'll get one of the kits for the old triple e's to turn them into a touch screen. The EEE's all shipped with Xandros at the start so I presume there are linux drivers for the kits out there somewhere. The last thing I'll need is some batteries I figure some of those solar powered lithium ion batteries used for back up charging phones and tablets would do. Probably try to use two, one sending power to the raspberry pi and the other to the monitor. For the case I'm think balsa wood and mechano but we will see how serious I get about this when I actually get a raspberry pi.

Software wise I'm going to be going with some linux distro obviously. Really which ever one has the best support for the raspberry pi is probably going to be my first choice. Then I'm going to either use kde's new plasma active interface as a desktop environment or hildon, which is the awesome interface used in maemo on the nokia n series Internet tablets. As for any other operating systems I might put on it, unless there is a really convincing argument for it android can suck it although I might try webOS after they open source it.

The most important thing about this entire design(if you could even call it that) is that I wont have to solder much because I can do many things but give me a soldering iron and I'm only going to get the job done after 3rd degree burns. Still can't wait till the raspberry pi comes out and I get a new toy to play with.

Friday, 16 December 2011

Humble Bundle Linux Hacks

The Humble Indie Bundle 4 was just released the other day and its awesome but one of the major differences between this bundle and some of the others is that every game has just been ported to Linux. Which is great more games on Linux is always a good thing much better than those royal bundle folks who sometimes don't even give us a single Linux game. The issue is that all of these are 1.0's so we have to be patient and wait for the developers to fix the couple of bugs which are going to come up. Unfortunately this mean we have to wait to play our games which sucks so here are a few hacks and general advice to get them up and running.


Note some of these are broad and will help the less well informed about Linux but some will help everyone.

Check for Updates
It may be obvious but the devs have new builds out very quickly the only game to not have a new build since the launch it bit trip runner. People are submitting bugs to the bugzillas and they are getting fixed so if there is a new build out give it a try.


  • Gratuitous Space Battles - I got a segfault when I tried to run it when it came out with the latest build its fixed :)
  • NightSky - Didn't run when I first tried it. Got the latest build today and it works perfectly

Bit.trip.runner
Didn't work out of the box. Firstly their was issues with their .deb package which according to the software center was of bad quality(and since it didn't run I agree with them). Anyway a nice redditor, hakdragron, found a neat little solution around the error I was getting:
GLIBCXX_3.4.15' not found (required by ./bit.trip.runner)
Its quite clever how he found out about this hack. He basically got the same error when running the jamestown game not from their script which basically tells the game to use the libraries that come with the game rather than the ones from your distro. So he wrote a little bash script to make the bit.trip.runner game use the libraries that came with jamestown.

So in my case its a script like this:

LD_LIBRARY_PATH=/home/shane/jamestown/x86:$LD_LIBRARY_PATH exec /home/shane/bit.trip.runner-1.0/bit.trip.runner/bit.trip.runner "$@"

The paths will be different for you but its just wherever jamestown is on your system and wherever bit.trip.runner is on you box. To be honest dependency issues like this aren't that big of a deal and I'm sure they will fix it soon.

Gratuitous Space Battles
So Gratuitous Space Battles worked after the update. Well thats not exactly true I was left with a black screen during the gameplay but thats much better than a Segmentation fault that stop you playing it entirely. This obviously would have made the game unplayable but all I had to do to fix this was turn off Gratuitous Shaders in the options menu. Then I was able to play the full game in all its glory.


Up to Date Distros
I know from development projects I've done in the past that there are only so many systems the developers will test on and rightly so god knows if they tested on every linux distro they would never get anytime to do anything but test. My best guess is they probably tested these four in this order and didn't bother with the rest.
  • Ubuntu 11.10
  • Fedora 16
  • OpenSuse 12.1
  • Arch
If you really want a game to run these are your best bet. I've heard a lot of good things especially from fedora and arch users about games working out of the box that simply don't on other systems. So if you have a spare usb key why not put a live persistant image of fedora on it and give the game you want a go. They will probably fix it to work with your current distro soon.

Use Proprietary Drivers
Sorry to those of you that are so against the idea of closed source applications that they are willing to take the performance hit but the games are likely to perform better on better drivers. Obviously if your on a nvidia chip set you don't have any choice the nouveau driver just isn't good enough for most of these games however AMD's open source drivers a very decent so while the games are more likely to run on the closed source drivers. They will probably work well enough in the open source ones.

Wine
I know you won't be running the linux version but wine is not an emulator its an api translator. The games will run at the same speed or very close to that and many of the games have excellent ratings on wine's appdb.


All tests done on a Ubuntu 11.04 Machine Running Gnome 2
Games that work out of the box(or download technically) as of 16 December
  • Jamestown
  • Gratuitous Space Battles
  • CaveStory+
  • NightSky
Games to go
  • Bit.trip.runner(Obviously not that big of an issue. Just dependencies I'm sure they will fix it soon)
  • Shank
    • Segmentation fault
    • Also read the bash script for launching shank some of the comments are brilliant
    • Gold rating on appdb so give it a go under wine
    • EDIT: Now works brilliantly 
  • Super Meat Boy
Hope this helped those of you who are struggling to get your games running. In all likelihood they will have fixed all of the games in time for the end of the bundle and if you haven't got a bundle yet go get one they are only a cent if your cheap but seriously pay a decent price for them and support indie developers and Linux as a platform for gaming.