Monday, July 16, 2012

PirateBox Design Update

I am getting frustrated by using Kompozer for editing html/css. It has a "feature" of randomly messing up the link between the html and the css file. Now this causes the site to "fall apart". And no matter how I try to import the file again or add the link, it just wont work. I have to manually edit each line of the css by deleting the "#" in front of the line, linking it to the html file and then adding the "#" tags again. Don't know why does this happen, I figured out this "solution" after some sweating, but its still better than having to rewrite everything.

Anyway, I think I will leave the css within the html file and work with the internal style sheet until I'm finished. I will export it to a style.css file when I'm absolutely done with editing, so it won't cause no more headache.


So to make this work quickly and ready to use instead of just showing screenshots I had to simplify the upload form a little. Instead of making a new script and using php for uploading and handling the file, I just included a popup-style upload window that opens in a new page and uploading goes in a separate page without interruption to other processes.

So all the popup does is that it opens a new page to http://piratebox.lan:8080 (droopy) that allows uploading just like before. Sadly this means that there is no upload bar for the moment.

The second step will be to use another iframe for this to merge into the main page but there are some other issues to consider here with sizing and aligning etc. So first it will be a popup-like function. I think its acceptable.

Also forums must be added manually later. I might get a basic design for it, but later only. I first would like to have a working version.

What is included and what isn't

See Sneak-peek at PirateBox Design (new)
The site works at the moment, but as mentioned some functions are just initial and not final versions.

  • Chat, upload, download functions and all pages are loading and working as intended. (if not please report)
  • The design, especially that of the menu will be upgraded with some fancy effects using css.
  • Browser detection will be added in a later stage.
  • Upload progress bar and upload form built-in to the main page will be added later, at the moment it is a popup-style thing.
  • Add your own home.html file (or modify mine) that will be displayed when someone joins.
  • Forum is not included, if you already have your forum, you can add it easily.
  • As soon as my time allows I will write a simple script that downloads my design, unpacks it and copies it over to the www folder.
  • Please note I have not tested this design on my MR3020, just under Ubuntu. Not a fancy design or anything, I just don't know how small routers will be able to handle it.
Also, sorry for the messy file structure, for some reason I got errors when trying to put in a nice file structure. The page didn't load for some reason and the links were broken. I will look into this and try to fix it for next time.





After downloading the tar.gz file unpack it and copy the contents into your www folder, but before that backup your own files!

Download (also available in Download tab)

Also on Github now! (Latest version, use this!)

Tuesday, July 10, 2012

Sneak-peek at PirateBox Design (new)

I went from my original idea towards another design, I think this looks "cooler", little bit more advanced maybe and easier to see through as well. See printscreen below:

So far:
  • The layout will remain more or less the same as I am planning at the moment. 
  • Site uses iframe, so when upload is running you can still browse and chat, etc without interrupting the process.
  • There is a progress bar for the upload, only visible when you are actually uploading a file, will be quite handy when/if I make the upload work properly.
  • The chat is working fine. Moved it to separate page, so there is no excess drive/CPU usage when not needed.
  • The shown page above is the "About" page, when connected users get redirected to the Home page. My idea was that everyone can build a short Home page (that will be shown in the frame, so no hassle) and show that first to anyone who joins. A little info, etc.
  • Browse for files is also working as far as I could tell.

Work needs to be done on:
  • Upload script is not working at the moment. I have been trying to make it work fir the past few days in my free time (don't have much apparently) but there seems to be an issue with the php script handling the upload. Also need to allow php in the lighttpd settings, don't remember if its allowed by default or not.
  • Also trying to add a scrip that would detect mobile browsers from phone for example. These would be redirected to a simpler site. Not because of bandwith usage (no intenet plan used) but because of convenience. Maybe original, simple setup or something similar.
  • If I can make the upload script work, I might consider adding a function of uploading multiple files at a time, still in question.
  • I will test the design with as many computers as possible, iPads if I can get them etc. and see if it works OK.
This is just a quick update to say I am working on stuff, but because of the lack of time I am not progressing super-fast. Also I have to learn a lot in the meanwhile about css, html, scripting etc, so yes...I'll keep you posted.

If anyone has any ideas or questions (really...any) feel free to share/ask. Also as soon as I have a working "beta version" of my design I will upload it and post a link here.

Please check the more recent version: UPDATE

OneSwarm in Ubuntu

OneSwarm is a lightweight, anonymous P2P file sharing software. It is available for Windows, Linux and Mac as well, both 32 and 64 bit versions. While traditional P2P sharing programmes share data with anyone who ask for it, in OneSwarm you can limit who you want to share your files with. Friends only, chosen friends or public, its entirely up to you.

Check out to download and learn more.

It takes some time to learn using the software if you are new to it, but after that it comes with benefits and easy use.

Some basic setting when you start

Firstly you will need a server to connect to and some friend to transfer files. A good way to start is to add the following URL in both cases:
You find the link to add the server and friends list on the left hand side of the screen, see below:
Click Add server and copy in the URL provided above. Do the same with Add friends, choose "Subscribe to a friend feed from a community server" and paste the URL. You should have a number of friends and the longer you stay on the network the more will be discovered, the easier file sharing will be.

One issue so far, solved easily

A recent issue I had though was an error message when starting the software saying:
***Required thread seems to have died: OS Friend Connector

Now after looking at the forums I have found a post where it was said that a file could be corrupted and fixing this is easy. Go to your:
folder and delete your osf2f.friends file.
(Open your home folder, press Ctrl+H and look for the .oneswarm folder, navigate from there)
Use one of the backups available to recover this file, simple rename it and remove the .backup tag. The file is generated and updated with each new friend made on the network  anyway.
Your OneSwarm should be running now.

Saturday, July 7, 2012

USB Adapter Causes Freeze

Now I did mention in an earlier post the issues with upgrading to Ubuntu 12.04, all the hassle and pain with reinstalling the system. I was really hoping that a fresh install would solve all my problems and I can have a fresh, clean start. Turns out it's not that simple.

Problem description

Soon after my reinstall I have discovered yet another issue, namely a system freeze occurring when I plug or unplug my external, USB wifi card. This SL1504N (Realtek 8191S chipset) card was perfectly working in the previous version and it is working on Windows as well. The weird thing is, its not working only in 50% of the time. So basically its a lottery whether or not after a restart I get to use my card. If it doesn't work and I try to unplug it my system crashes, kernel warnings appear and there's nothing to be done the system is dead, this is followed by a rough power-off.
I don't know if this issue is in connection with another error message that I seem to get occasionally with nautilus, but even after reinstalling nautilus in the synaptic package manager both the freeze and error messages remained there.

Also, this might be linked to the USB card problem explained above, I am having shutdown hungs as well. The dots start to move, but that's about it, nothing happens.

I am quite disappointed at this point since instead of enjoying and using the new version of Ubuntu for other more productive tasks, I'm still stuck fixing the many errors of the upgrade.

I have tried reinstalling nautilus from the Synaptic package manager and fixing broken installs with:

sudo apt-get install -f
command, but they didn't work and I still get the system freeze or I'm simply stuck without my network card that I want to use.

Temporary fix

Now my wifi card is not detected from time to time. Today (after not using my Ubuntu for a while because of the above mentioned issues) I have discovered that if my system doesn't recognise the USB adapter then I shouldn't try to unplug it and plug it back in, because it will freeze as soon as I remove it. Instead what needs to be done is that the wifi should be switched of  on the hardware (On my HP laptop there is a swipe button to do this, I guess most of the laptops have something like this) and then I can unplug, re-plug, activate the hardware with the button and it will work (or it did today at least).


Shutdown hungs remain still an issue. Even after downloading 160 Mb of updates today it was still there and had to force shutdown. This issue will need some deeper investigation.