Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Saturday, 12 January 2013

Create Desktop Launcher to start OpenERP server

Many end user don't know how to start OpenERP server from the terminal. Desktop launcher is the best way to start the OpenERP server for the non technical end user. Start up service is another way to start the OpenERP server automatically.
for that you need to install gnome panel. Install gnome-panel by running below command in ubuntu terminaAl.
sudo apt-get install gnome-panel  

Make a bash script which will run the OpenERP server. To make bash script create new file and write script as below.

#!/bin/bashcd <<path to openerp server>>#e.g. /home/mypc/openerp/server/python openerp-server --addons ../addons/,../openerp-web/addons/
and save it with .sh extension e.g server_start.sh 

now again write this in terminal 


gnome-desktop-item-edit --create-new ~/Desktop
 it will open a window as 

Add Launcher name as you wish. in the command give the path of the bash file(make sure the file is executable). and click ok. it will create a icon on the desktop.

Tuesday, 6 November 2012

List Used Port in Ubantu

netstat is the command which prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
change the user as root using
sudo -i
netstat -tulpn
 

it will list all the local address on the local system used by the program.

Tuesday, 29 May 2012

Ubuntu Libdmtx installation Guide

To install libdmtx first of all we have to configured the machine compatible to libdmtx library:
for that you have to install some python packages.

The required packages are :

(1) python-dev
    This will include the all header file of the c which is requierd for libdmtx library e.g python.h
    sudo apt-get install python-dev

(2) git
    This will install the git which is repository
    sudo apt-get install git

(3) libdmtx-utils
    libdmtx-utils is required for the libdmtx library which includes c file and all header file
    sudo apt-get install libdmtx-utils

(4)  libdmtx-dev
    libdmtx-dev is required for the libdmtx python wrapper.
    sudo apt-get install libdmtx-dev


Now we have to setup the libdmtx library,

(1) first change the directory to
    cd /usr/share/doc/libdmtx-dev/examples/python

(2)unzip pydmtx.py.gz
    sudo gunzip pydmtx.py.gz

(3)unzip pydmtxmodule.c.gz
    sudo gunzip pydmtxmodule.c.gz

(4) installing the setup of libdmtx
    sudo python setup.py install

(5) Thats it!!

now test if the installation

run this python code in your python interpreter:

        from pydmtx import DataMatrix
        from PIL import Image


        # Write a Data Matrix barcode
        dm_write = DataMatrix()
        dm_write.encode("Hello, world!")
        dm_write.save("/home/hello.png", "png")


        # Read a Data Matrix barcode
        dm_read = DataMatrix()
        img = Image.open("/home/hello.png")


        print dm_read.decode(img.size[0], img.size[1], buffer(img.tostring()))
        print dm_read.count()
        print dm_read.message(1)
        print dm_read.stats(1)