Feeds:
Posts
Comments

Last time I worked on SharpWired in Mono I found  a Window.Forms web browser controller issue. This is still not solved. And I have no idea how to do it. Anyways. Here is how I setup MonoDevelop in Ubuntu 10.10.

When you install the MonoDevelop package in Ubuntu you get the core package only. Then you add plugins to that. I installed the following packages (via apt-get)

  • monodevelop
  • monodevelop-versioncontrol
  • subversion
  • monodevelop-nunit

Then you can either check out the project in MonoDevelop or via the command line. I did it via the command line and when I opened the solution in MonoDevelop all files were marked as being under source control so you can (if you want to) work all within MonoDevelop.

To run the tests you mark the Tests project, go to the Run menu and Run unit tests.

If you need help on installing the Wired server we have a post on that to.

Mono web browser problem

Over the lasts week I’ve looked into running SharpWired in Mono (thanks Peter for the help!). We launched it and found 2 issues.

The first was pretty easy to fix. We had some calls to a Windows DLL to read the icons for the file tree. I fixed this by just removing it. Instead of using the Windows native icons I think I’ll use the Tango icons. This would solve that issue.

The second seems like quite a bit more headache. We use the property DocumentText in System.Windows.Forms.WebBrowser for the Chat and News windows. Setting this property is broken in Mono and I can’t find a way around it. I’m not sure how we will fix this yet. Too bad!

Update 110324: I asked a question on StackOverflow for how to fix this and got a workaround. Thanks a lot user65!

SharpWired demo

I did a quick demo of the features in SharpWired. Watch it in high quality on Youtube.

A list of all things I know today that stops us from releasing a version 1.0 of SharpWired:

  • File & folder download – Today it’s limited to downloading one file at the time
  • File & folder upload – Nothing done here at all
  • Resuming of file transfers – Nothing done here at all
  • Fixing issues when we start to run it on different computers
  • Giving the GUI quite a bit more love
  • Maybe an installer?
  • Maybe making it work on Mono – I don’t think this will be a huge problem. We have been checking compatibility with Mono all along the development.
  • Fixing current minor issues

I don’t think I’m good enough programmer to pull of the file & folder transfers. At least not by myself. But I think I can solve many of the other issues. If you are interested in helping out. Please contact us!

The Wired protocol allows for managing users and groups via the client but I’m not expecting to include that in a 1.0 release. If it happens, it happens.

Before you join read this

There are one other client called qwired that also could be finished. It might bee more mature than SharpWired but it is abandoned. It’s written in C++ with Qt.

Alex at ZankaSoftware has started to rewrite the protocol. This means that it will be incompatible with SharpWired. I personally don’t see it going anywhere but you decide yourself.

Every time I need to install the Zankasoftware Wired server there is something I’ve forgotten. This time I wrote down all steps needed to install it. I did this on Ubuntu 10.10 but it will probably work on most other systems as well.

The following little script will install the required libraries and download and install the Wired Unix server and wire (the console only client) with the user ola, the group ola, to the folder /home/ola/Applications/Wired

#!/bin/bash

wiredBaseDir=/home/ola/Applications/Wired
wiredUser=ola
wiredGroup=ola

sudo apt-get update
sudo -y apt-get install libssl-dev libreadline-dev

mkdir -p $wiredBaseDir/Sources

cd $wiredBaseDir/Sources
wget http://zankasoftware.com/dist/wired-latest.tar.gz
tar -xzf wired-latest.tar.gz
cd wired*
./configure --prefix=$wiredBaseDir --with-user=$wiredUser --with-group=$wiredGroup
make clean
make
make install

cd $wiredBaseDir/Sources
wget http://zankasoftware.com/dist/wire-latest.tar.gz
tar -xzf wire-latest.tar.gz
cd wire*
./configure --prefix=$wiredBaseDir
make clean
make
make install

Start the server with: /home/ola/Applications/Wired/wired/wiredctl start

Start wire with: /home/ola/Applications/Wired/bin/wire

It creates one account on the server:  admin with no password. So you will probably want to change that password. With the OSX client you can change the password in the client but wire can’t manage that so you’ll have to edit the users-file by hand.

I have a litle script to create users that might be handy. It creates a user with the “normal user privileges” so if you re-create the admin user you want to keep that privileges row.

This blog post is a bit rough, I'll try to explain in greater details later. The most important information is here. You'll just have to digg around a big to find it.

I put together an image for VirtualBox so you can help develop SharpWired. Download it via Bittorrent. I’m seeding it from my workstation so if there are no seeds available just wait. And if you can, please help me seed.

README.txt – The SharpWired Ubuntu VirtualBox image

This is a VirtualBox image for development of SharpWired. It includes the following:

Ubuntu Desktop 10.10

  • The 32 bit version of Ubuntu Desktop 10.10
  • The user sw with the password sw
  • All updates applied 2011-02-13

ZankaSoftware Unix Wired server

  • Server installed to: /home/sw/Applications/Wired/wired/
  • Softlink to start/stop/etc the server located in ~/bin/wiredctl
  • It Accepts the following arguments:
    • $ wiredctl start – start wired
    • $ wiredctl stop – stop wired
    • $ wiredctl restart – restart wired
    • $ wiredctl reload – send wired a SIGHUP, causing it to reload its configuration
    • $ wiredctl register – send wired a SIGUSR1, causing it to re-register with the tracker
    • $ wiredctl index – send wired a SIGUSR2, causing it to re-index the files
    • $ wiredctl config – show the configuration
    • $ wiredctl configtest – run a configuration syntax test
    • $ wiredctl certificate – generate a new OpenSSL certificate
    • $ wiredctl status – show a status screen
    • $ wiredctl help – show this information
  • Logging set to max with a max log file length of 5000 rows. Log file located at: /home/sw/Applications/Wired/wired/wired.log
  • Added one user with login: sw and password: sw
  • Server manual at ZankaSoftware
  • Added a script to create new users to ~/bin/generateWiredPassword.sh

ZankaSoftware Wire Unix command line client

  • Client installed to /home/sw/Applications/Wired/bin/wire with a softlink in ~/bin/wire
  • Added bookmark to login to the local wired server. Run it with: $ wire sw-local

SharpWired source code + MonoDevelop

  • Checked out a read-only version to /home/sw/Code/SharpWired from the SharpWired project page
  • If you want to commit a path do so via Google Code
  • If you become an active developper contact us via Google Code to get commit permissions
  • Loaded the solution file to MonoDevelop. It doesn’t compile though.

Links

The ZankaSoftware OSX client includes user management features. But no other client does. I’ve written a little script that will help you generate the user credentials string that you can put into the Wired server users file. It creates a user added to the group Users with the following permissions:

  • can get user info
  • can’t broadcast
  • can post news
  • can’t clear news
  • can download
  • can upload
  • can upload anywhere
  • can create folders
  • can’t move files
  • can’t delete files
  • can’t view drop boxes
  • can’t create accounts
  • can’t edit accounts
  • can’t delete accounts
  • can’t elevate privileges
  • can’t kick users
  • can’t ban users
  • can be kicked
  • unlimited download speed
  • unlimited upload speed
  • no download limit
  • no upload limit
  • can set chat topic

Copy the following to an executable script file called geenerateWiredPassword.sh that you execute with ./generateWiredPassword.sh login password. The output of the script can then be copied to the Wired server users file.

#!/bin/bash

#Permission strings
ADMINPERM="1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:1"
USERPERM="1:0:1:0:1:1:1:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1"
GUESTPERM="1:0:1:0:1:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
#Default group: "Users"

if [[ -n "$1" && -n "$2" ]] ; then
	POSPAR1="$1"
	POSPAR2="$2"
	passSHA1=$(echo -n $2 | openssl sha1)
	echo -e "\tInsert the following to your wired server users file:"
	echo -e "\t$1:$passSHA1:Users:"$USERPERM
	exit 0
else
	echo -e "\tERROR: Missing login and or password."
	echo -e "\tUSAGE: generateWiredPassword.sh login password"
	exit 1
fi
Follow

Get every new post delivered to your Inbox.