Archive for the ‘Mono’ Category

XML-RPC Blogging Plugin for Tomboy

Tuesday, April 19th, 2005

This plugin lets you post Tomboy notes to a weblog through the magic of XML-RPC. Attached is the source (goes in tomboy-[ver]/Tomboy/Plugins/) and a diff/patch against the cvs tomboy-[ver]/Tomboy/Plugins/Makefile.am.

Notes:

  • needs XmlRpcCS. Mono 1.1.x users, check my guide for installing it.
  • there’s no pref’s dialog, you need gnome-blog, it currently reads your gnome-blog settings from GConf
  • currently only supports the MetaWeblog API (MovableType, etc.)
  • does not support post editing
  • currently just uploads whatever the text value of the note is. If your blog supports setting a default formatting style (like Markdown), just use that in your note and it should show up properly.

Some ideas for enhancement:

  • keep track of postID’s in an extra XML field (like width and height are now). This would allow you to upload a post, then edit/update it within Tomboy.
  • move pref’s to Tomboy’s preferences dialog and GConf settings?
  • let you sync your notes with your weblog. This would update your blog with local Tomboy changes, as well as pull down other posts not made from Tomboy into Tomboy.
  • maybe a different icon?

Enjoy, feel free to enhance/update/improve/etc.

And yes, this post was made with it. ;)

XmlRpcCS with Mono >1.1.x

Tuesday, April 19th, 2005

I was trying to work on some XML-RPC craziness under Mono, and came across XmlRpcCS and a nice tutorial. Problem is, since I’m running Mono 1.1.4, I could reference the built XmlRpcCS.dll assembly at compile-time with no problems, but the resulting program would die with:

WARNING **: Could not find assembly XmlRpcCS, references from
  ~/source/monoblog/monoblog.exe (assemblyref_index=3)

This is because with Mono 1.1.x, it seems you must register signed assemblies with gacutil. In order to do this with XmlRpcCS, you need to do the following:

  1. Download the XmlRpcCS source file and unzip it.
  2. cd to the XmlRpcCS directory and run “sn -k XmlRpcCS.snk” to generate your keyfile.
  3. Edit the makefile and change the CSFLAGS line to “CSFLAGS=-define:__MONO__ -delaysign-
  4. Edit src/nwc/xmlrpc/AssemblyInfo.cs and add the following lines:

    [assembly: AssemblyDelaySign(false)]

    [assembly: AssemblyKeyFile("XmlRpcCS.snk")]

  5. Run make

  6. Run “sudo gacutil -i XmlRpcCS.dll -package XmlRpcCS

Now when you need to compile against XmlRpcCS, just add “-r /usr/lib/mono/XmlRpcCS/XmlRpcCS.dll“, and it should work fine.

Browser History Searching

Tuesday, April 5th, 2005

Britt ran into me today while I was hacking around on a toy program of mine. Basically, I’d gotten fed up with having 5000 Firefox tabs open at once, with no proper way to search through my history or bookmarks, so I decided there needed to be a better way. I started playing with Gecko# and got a bit caught up in getting something half-usable out. Since the last thing the world needs is another web browser, I’ll probably just polish it off some more and put up the source to help out (or possibly confuse!) anyone else who wants to do some Gecko# hacking beyond a 5 minute browser. I did finally discover the old Mac app I was doubtlessly inspired by, TrailBlazer.

Anyway, onto the main reason for abandoning it, my conversation with Britt made me realize that even beyond the silliness of trying to create another browser, I was also reinventing the wheel in numerous other ways. It would probably be much easier to hack the functionality I’m looking for onto Beagle. Guess I’ll need to set up an inotify-enabled kernel.

Speaking of which, I need to do quite a bit of kernel hacking in less than a month anyway, with 3-4 large kernel modification projects ahead of me. Thankfully, due to my inability to read a syllabus, I finished all my projects for another course two weeks ahead of time, so I won’t have that looming over my head.

MonoDevelop on Debian

Thursday, February 24th, 2005

I upgraded mono to the latest Debian package (1.0.5-2), and it went and broke MonoDevelop.

$ /usr/bin/cli --debug /usr/share/dotnet/monodevelop/bin/MonoDevelop.exe
Creating DefaultWorkbench

(MonoDevelop:9543): Gtk-WARNING **: Error loading icon: Failed to open file 
'/home/data/resources/icons/Icons.SharpDevelopIcon': No such file or 
directory

I tried using the Ubuntu package (monodevelop_0.5.1-3_i386, one revision higher than the monodevelop_0.5.1-2_i386 provided by Debian), but it does the exact same thing (except the executable is placed in a different structure under /usr/lib/monodevelop, and the /usr/bin/monodevelop script uses mono instead of cli). Doing something silly like copying the /usr/share/dotnet/monodevelop/data directory to /home makes the icon error go away, but MonoDevelop still does not start. I even tried rebuilding the monodevelop package with the new mono install, but it does the same thing. I suspect it’s related to this bug.

Update: It has randomly decided to start working again.