Archive for September, 2009


In Linux
29Sep 09

Sockso is a cross platform music server and requires no installation. It runs on a standalone PC or Server. This guide is for running Sockso on a Server platform,   to install and run with a GUI on a PC refer to the Sockso Web site.

Sockso gives you the ability to stream all your music  – Supports MP3, OGG Vorbis, Flac and WMA,  anytime, anywhere via a web interface through your browser.  All that you require is Flash on your client end and a decent internet connection minimum should have at least IEEE 802.11g (54M) Wifi connection for smooth operation.

Sockso requires Sun Java only, no Apache or other web server is require to run.

So,  lets start:

1 )

Sockso requires Sun Java to work. You should install the following packages.

sudo apt-get install sun-java6-bin sun-java6-fonts sun-java6-jre unzip

2 )

Download the latest version of Sockso. The current version is 1.2 at the time of this writing.

wget http://sockso.googlecode.com/files/sockso-1.2.zip

unzip sockso-1.2.zip

sudo mkdir /usr/share/sockso

sudo cp -R /home/user/sockso-1.2/* /usr/share/sockso/

sudo mkdir /var/sockso
sudo chmod -R 0755 /var/sockso

Step )

Run the Sockso at command prompt.

sudo sh /usr/share/sockso/linux.sh --nogui --datadir /var/sockso

To add your music collection, enter the directory path for all you music.  You can enter multiple paths eg. If you had to different directories with music, /home/user/music and /home/user2/mp3, just run the following command to populate your collection:

#SockSo#>coladd /home/samiux/music
#SockSo#>coladd /home/mary/mp3

To list all collection directory paths, use the following command.
collist

To delete a directory from the collection, use the following command.
coldel

Adding users to Sockso.

#SockSo#>useradd samiux <your_password_here> samiux@gmail.com

To exit the #SockSo#> command prompt.
exit

4)

Copy the init.d script to /etc/init.d/

sudo cp /usr/share/sockso/scripts/init.d/sockso /etc/init.d/sockso.pl

Create a sockso script file.

sudo nano /etc/init.d/sockso

-------- CUT HERE ---------
#!/bin/bash

perl /etc/init.d/sockso.pl $1

exit 0
-------- CUT HERE ---------

Edit the sockso.pl as the following.

sudo nano /etc/init.d/sockso.pl

system( 'sh linux.sh --nogui --datadir /var/sockso > /dev/null 2>&1 &' );

use constant SOCKSO_DIR => "/usr/share/sockso/";

5)

Make the scripts executable:

sudo chmod +x /etc/init.d/sockso
sudo chmod +x /etc/init.d/sockso.pl

Now, you can start the sockso with the following command

sudo /etc/init.d/sockso start

You can also stop the sockso with the following command.

sudo /etc/init.d/sockso stop

To connect to your Sockso Web Interface enter the IP or FQDN of your server.

http://192.168.0.1:4444

6)

To run the script automatically after reboot update the rc.d with.

sudo update-rc.d sockso defaults

Using MySQL as a backend

By default Sockso uses the Java database engine HSQLDB. This provides a nice fast easy way to get a database up and running in an application and works excellently for most uses of Sockso.

With a very large collection you may run into some performance problems and possibly “out of memory” errors when accessing some of the pages.   In these cases you have the option of changing the database engine Sockso uses, and for this MySQL support is available.

NB: Sockso requires MySQL 5+

1) Download Sockso’s Optional Components

You will need to install the optional components first to use MySQL.

2) Create the database

You  will need to create a MySQL database for Sockso to use. It doesn’t need to have any tables in it, Sockso will create all of these when it starts up, but the database does need to exist.

3) Start Sockso with MySQL

When the database is created, start Sockso with the following command line switches (changing the values to match your set up obviously) which tell it to use MySQL, and the connection information for the database.

$> java -jar sockso.jar --dbtype=mysql \
      --dbhost=localhost \
      --dbuser=myuser \
      --dbpass=secret \
      --dbname=socksodb

Sockso will now be running with MySQL.

NB: This will be a completely blank database.

NOTEs :

  • Make sure you have stopped the Sockso before reboot or shutdown; otherwise, the mp3 databases would be corrupted. If so, you should delete everything inside /var/sockso and redo the Step 3.
  • · Broadcasting copyrighted music can lead to heavy fines or even lawsuits.
  • For more detailed information and questions refer to the Sockso Website http://sockso.pu-gh.com/ or forums http://forums.pu-gh.com/

In Linux
28Sep 09

This is the quick and easy way,  compared to going to the Java website downloading then installing etc etc etc.

sudo apt-get install openjdk-6-jre
sudo update-alternatives –config java
java -version


All done :)


In Linux
28Sep 09

Ever had the issue with which you wish to send a file to someone when you are chatting via IM or in the middle of a gaming session etc and find its too big to send via your IM client and emailing is too much trouble at the time.  Well this small application is for you.  Its quick, efficient and easy.

There are a lot of tools to tackle this problem. For large scale communities there are dozens of   networks. However, they don’t work for small local networks. One way is to put your stuff  on a local  server to share, but maintaining this can be tedious. Tools like the ingenious npush/npoll are extremely helpful, provided that both parties have it installed, SAFT/sendfile also aims to solve this problem, but needs a permanently running daemon…

Woof (Web Offer One File) tries a different approach. It assumes that everybody has a web-browser or a commandline web-client installed. Woof is a small simple stupid webserver that can easily be invoked on a single file. Your partner can access the file with tools he trusts (e.g. wget). No need to enter passwords on keyboards where you don’t know about keyboard sniffers, no need to start a huge lot of infrastructure, just do a

     $ woof filename

and tell the recipient the URL woof spits out. When he got that file, woof will quit and everything is done.

And when someone wants to send you a file, woof has a switch to offer itself, so he can get woof and offer a file to you.

Prerequisites and usage

Woof needs Python on a unix’ish operating system. Some people have used it successfully on Windows within the cygwin environment.

    Usage: woof [-i <ip_addr>] [-p <port>] [-c <count>] <file>

           woof [-i <ip_addr>] [-p <port>] [-c <count>] [-z|-j|-Z|-u] <dir>

           woof [-i <ip_addr>] [-p <port>] [-c <count>] -s

    Serves a single file <count> times via http on port <port> on IP

    address <ip_addr>.

    When a directory is specified, an tar archive gets served. By default

    it is gzip compressed. You can specify -z for gzip compression,

    -j for bzip2 compression, -Z for ZIP compression or -u for no compression.

    You can configure your default compression method in the configuration

    file described below.

    When -s is specified instead of a filename, woof distributes itself.

    defaults: count = 1, port = 8080

    You can specify different defaults in two locations: /etc/woofrc

    and ~/.woofrc can be INI-style config files containing the default

    port and the default count. The file in the home directory takes

    precedence. The compression methods are "off", "gz", "bz2" or "zip".

    Sample file:

        [main]

        port = 8008

        count = 2

        ip = 127.0.0.1

        compressed = gz

It can be downloaded from HERE

Subscribe to RSS

  • Tag Cloud

  • Categories

  • Recent Posts

  • Login/Register

Syndicate