Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, October 2, 2010

HowTO : Install SQL-Ledger on Ubuntu 10.04

SQL-Ledger is a double-entry accounting/ERP system written in perl. It has been tested with PostgreSQL, Apache, Netscape, Mozilla, Galeon, Explorer, Links, Lynx, Konqueror, Voyager, W3M and Opera clients on Linux, FreeBSD, Solaris, Windows, Mac computers and PDA's.

Installing SQL-Ledger on Ubuntu 10.04

  1. Login as root
    sudo -i
  2. Download SQL-Ledger.
    wget -c http://www.sql-ledger.com/source/sql-ledger-2.8.30.tar.gz
    (sql-ledger-2.8.30 is the stable version, but 3.0 is on the way)
  3. Untar the files
    cp sql-ledger-2.8.30.tar.gz /usr/local 
    cd /usr/local 
    
    tar zxvf sql-ledger-2.8.30.tar.gz
  4. Setup SQL-Ledger
    cd /usr/local/sql-ledger
    perl setup.pl
    Checking for latest version number ....
    www.sql-ledger.com ... ok
    
                   SQL-Ledger ERP Installation
    
    (i)nstall 2.8.30 (from Internet)
    
    (d)ownload 2.8.30 (no installation)
    
    Enter: i
    
    Enter httpd owner [] : www-data
    
    Enter httpd group [] : www-data
    
    Status
    Downloading sql-ledger-2.8.30.tar.gz .... 
    www.sql-ledger.com .... ok
    Decompressing sql-ledger-2.8.30.tar.gz ... done
    Unpacking sql-ledger-2.8.30.tar ... done
    cleaning up ... done
    
    This is a new installation.
    
    Webserver directives were written to
    
      /etc/apache2/sql-ledger-httpd.conf
    Please add
    
    # SQL-Ledger
    Include /etc/apache2/sql-ledger-httpd.conf
    
    to your httpd configuration file and restart the web server.
    
    Display README (Y/n) : n
  5. Apache Configuration. Looking at the last step,
    #Webserver directives were written to
    
      /etc/apache2/sql-ledger-httpd.conf
    Please add
    
    # SQL-Ledger
    Include /etc/apache2/sql-ledger-httpd.conf
    
    to your httpd configuration file and restart the web server.
    
    Display README (Y/n) : n
    In Ubuntu, the configurations are entered in the file /etc/apache2/apache2.conf. So open the file and add the line as instructed above.
    vim /etc/apache2/apache2.conf
    Locate other incldues and add the SQL-Ledger Include. See how my apache2.conf file.
  6. Change permissions of some of the files so that the Apache Server can write to them.
    cd /usr/local/sql-ledger  
    chown -hR www-data.www-data users templates css spool
  7. Restart Your Apache Server
    /etc/init.d/apache2 restart
  8. Install PostgreSQL
    apt-get install postgresql postgresql-client
  9. Create a new user and database for sql-ledge
    su postgres
    createuser -d -P sql-ledger
    createdb sql-ledger
    createlang plpgsql template1
  10. Setup the database and tables. Fire up your browser and point to http://localhost/sql-ledger/admin.pl. Initial Password is admin.  Select the "Database Administration" link, enter the user you created in the previous step.  The "Create Dataset" link queries the server for existing datasets and displays them in a table. Enter a name for the new dataset (use lowercase letters only!) and select one of the Chart of Accounts and click on Continue.
  11. Create the User. Click "Add User"and remember to use the dataset you have just created.
  12. Start Your Accounting by pointing your browser to http://localhost/sql-ledger/login.pl

Wednesday, September 22, 2010

Using Ubuntu : Why should you try Ubuntu?

After having used Linux for almost seven year now, I have come to really appreciate it in many ways. Currently Ubuntu is my default distribution both for development and also on the server side. But if you are starting, Ubuntu is 
  • fast on booting and fully functional
  • good and modern operating system
  • free (“free as in free speech”)
  • secure and virus free
  • good on low specs computers
  • great as an office tool as well as a server operating system
  • good for all ages, it care for your 5 year old (Edubuntu) to hardcore hacker (Ubuntu Server)
Next: Using Ubuntu : What is Ubuntu?


Monday, September 20, 2010

HOWTo: Getting Zain E1550 to work on Ubuntu 10.04

The HUAWEI E1550 does not work on most boxes running Ubuntu 10.04. But thanks to Deo Shayo of UDOM, I can now make use of the modems on Ubuntu 10.04 LTS.

HowTo:-
  • Update your source list

    $ sudo apt-get update
  • Install the usb-modeswitch

    $ sudo apt-get install usb-modeswitch
  • Run the usb-modeswitch
    sudo usb-modeswitch
  • Setup the Mobile Broadband, normally and now should see the Zain listed under Tanzania

Monday, September 13, 2010

Tri Labs on Ubuntu Marketplace

There is a growing network of companies that provide local support for desktops and servers running Ubuntu. Find a company close to you, or get your own company listed in the marketplace.

Now Tri Labs is also on the listing.

Thursday, December 3, 2009

Use one keyboard and mouse on multiple cross platform computers



synergy: [noun] a mutually advantageous conjunction of distinct elements

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems.

I have this old computer that as use as a backup and multimedia server. I have hooked it to an overhead projector and a decent sound system, now you know what I am up to over the weekends. For all this time ssh and Remote Desktop Viewer have served me very faithully. But I started wondering is this it, can I use my mouse and keyboard on both machines but on different displays, and lo and behold, ladies and gentlemen I present to you Synergy.
So lets get to it.

Scenario

There is a Dell (Inspiron 1520) aka WorkStation, running Ubuntu 9.10 also the Synergy server and as a second machine, home built server aka Storage running Ubuntu 8.04LTS.
WorkStation: Side [left] | Hostname [feruzi.trilabs.co.tz] | IP Address [192.168.3.10]
Storage: Side [right] | Hostname [storage.trilabs.co.tz] | IP Address [192.168.3.9]

Installing from the Command Line

Start the terminal (you can also use Synaptic Package Manager) and run the following command on both machines.
$ sudo aptitude update && sudo aptitude install synergy
PLEASE NOTE: For MS Windows and MacOS users visit the site for more information.

Configuring the Synergy server

In your home directory create a file called
synergy.conf
and in in it is where the configureation for my set up.
section: screens
feruzi.trilabs.co.tz:
storage.trilabs.co.tz:
end
section: aliases
feruzi.trilabs.co.tz:
192.168.3.10
storage.trilabs.co.tz:
192.168.3.9
end
section: links
feruzi.trilabs.co.tz:
right = storage.trilabs.co.tz
storage.trilabs.co.tz:
left = feruzi.trilabs.co.tz
end
section: options
screenSaverSync = false
end

section: screens

Screen section is a list of screen names, one name per line, each followed by a colon. Names are arbitrary strings but they must be unique. The hostname of each computer is recommended, and that is what I have used.

section: aliases

aliases section is a list of screen names just like in the screens section except each screen is followed by a list of aliases, one per line, not followed by a colon. An alias is a screen name and must be unique. During screen name lookup each alias is equivalent to the screen name it aliases. Because my DNS was not setup properly I assigned it to my IP address.

section: links

links section is a list of screen names just like in the screens section except each screen is followed by a list of links, one per line. Each link has the form {left|right|up|down}[] = name[]. A link indicates which screen is adjacent in the given direction. So on the right of feruzi.trilabs.co.tz there is storage.trilabs.co.tz and on the left of storage.trilabs.co.tz there is feruzi.trilabs.co.tz.
PLEASE NOTE: There is more you can do here, again visit the site for more information.

section: options

options section is a list of lines of the form name = value. These set the global options. There is a lot of other options you can set, visit the site for more information.

Starting up Synergy server and clients


To start up the server, on feruzi.trilabs.co.tz run the following command,
$ synergys -f --config synergy.conf
the output should be something like this, depending on your setting and operating systems.
INFO: synergys.cpp,1042: Synergy server 1.3.1 on Linux 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:54:29 UTC 2009 i686
DEBUG: synergys.cpp,1051: opening configuration "synergy.conf"
DEBUG: synergys.cpp,1062: configuration read successfully
DEBUG: CXWindowsScreen.cpp,847: XOpenDisplay(":0.0")
DEBUG: CXWindowsScreenSaver.cpp,339: xscreensaver window: 0x00000000
DEBUG: CXWindowsScreen.cpp,117: screen shape: 0,0 1280x800
DEBUG: CXWindowsScreen.cpp,118: window is 0x04800004
DEBUG: CScreen.cpp,38: opened display
DEBUG: CXWindowsScreen.cpp,679: registered hotkey ScrollLock (id=ef14 mask=0000) as id=1
NOTE: synergys.cpp,500: started server
INFO: CServer.cpp,1141: screen "feruzi" shape changed

And the cliet, in this case on storage.trilabs.co.tz, ssh into the client machine and run the following command and we are ready to rumble.
$ synergyc -f --name storage 192.168.3.10
the output should be something like this, depending on your setting and operating systems.
INFO: synergyc.cpp,716: Synergy client 1.3.1 on Linux 2.6.27-15-generic #1 SMP Tue Oct 20 06:52:09 UTC 2009 i686
DEBUG: CXWindowsScreen.cpp,841: XOpenDisplay(":0.0")
DEBUG: CXWindowsScreenSaver.cpp,339: xscreensaver window: 0x00000000
DEBUG: CXWindowsScreen.cpp,111: screen shape: 0,0 1400x1050
DEBUG: CXWindowsScreen.cpp,112: window is 0x03000004
DEBUG: CScreen.cpp,38: opened display
NOTE: synergyc.cpp,330: started client
DEBUG: CXWindowsClipboard.cpp,313: open clipboard 0
DEBUG: CXWindowsClipboard.cpp,266: empty clipboard 0
DEBUG: CXWindowsClipboard.cpp,289: grabbed clipboard 0
DEBUG: CXWindowsClipboard.cpp,348: close clipboard 0
DEBUG: CXWindowsClipboard.cpp,313: open clipboard 1
DEBUG: CXWindowsClipboard.cpp,266: empty clipboard 1
DEBUG: CXWindowsClipboard.cpp,289: grabbed clipboard 1
DEBUG: CXWindowsClipboard.cpp,348: close clipboard 1
NOTE: synergyc.cpp,247: connected to server

And that is it. Have fun, questions and comments are welcome.

Friday, July 24, 2009

Watermark your Videos

fsp:Creative Series

Have you ever wanted to watermark your video with your name or company or whatever? I mean like how YouTube stamps its logo an all videos, it is easy that I thought. I have been working on it for a good one hour and guess what it works and its not rocket science, even I can do it.



Platform: the tools used
  • platform: Ubuntu Jaunty (9.04)
  • media player: mplayer
  • image editor: gimp
  • watermarking tool: ffmpeg using the vhook library
NOTE: The default ffmpeg on the Ubuntu repository does not have vhook enabled. You may have get the source code and compile it with vhook enabled.

Compiling ffmpeg
  1. Download the ffmpeg
  2. Untar it: tar jxfv ffmpeg-xx.xx.tar.bz2
  3. Get into the untared folder: cd ffmpeg-xx.xx/

  4. Configure with the vhook enabled: ./configure --enable-gpl --enable-nonfree --enable-vhook. Run ./configure --help to get a full list of options. NOTE: the . in the commands above is part of the command, so put it there.
  5. Compile and Install: make && make install
  6. vhook files will be located in the /usr/local/lib/vhook
Ingredients: the verges and spices
  • video to be watermarked:
  • the image to watermark the video. NOTE: the image background must be of color: #808080 and of the same size as the video.
Creating the watermarking images
  1. Play the video from the console/terminal to get the size of the video: mplayer thetrain.mpg
  2. Read the size of the video from the info displayed when mplayer loads the video, see the image below.
  3. So the create an image with the same size as the video, in this case it is 640x480 pixels. Remember the background of the image must be #808080, then add all that you want. Here is mine.
  4. Now we set, its time to cook

Cooking: frying and boiling
  • To make it easy, put all the ingredients in on pot, oops sorry, in one folder. The naviget on the terminal to that folder. Here is the generic structure of the command to watermark: ffmpeg -sameq -i original-video -vhook 'path-to-watermark.so-library -f overlaying-image' output-file. The sameq force the ffmpeg to maintain the same quality in and out. There is my cooking: ffmpeg -sameq -i thetrain.mpg -vhook '/usr/local/lib/vhook/watermark.so -f overlayer.png' thetrain.fsp.mpg.
  • Prepare the table and save the food. Use mplayer to try your newly watter marked file

Delicious: what goes to the table

See what we served on the table



Try It and tell me! Have fun guys!.






Afrigator