For compiling lemonpos, first make sure you have kde4 installed (kdelibs4, kdebase4, kdepimlibs4) and all of his
dependencies (qt4…). Then you can start compiling :

cd trunk
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 .. #here you put your path to kde4.
make
su
make install

When installing, you can see where it was installed, just in case you cant find a way to run lemon, write the location of the installation (the binary files are in /usr/bin or /usr/local/bin), also the menu entries are under something like “lost objects”.

copy the lemonrc file to your local .kde/share/config directory:
cp trunk/src/lemonrc /home/USER/.kde4/share/config/ #Replace USER with your username.

After compiling and installing lemonpos, you must proceed to the database creation before you can login and use lemonpos.

Things you will need:

  • MySql Installed and ready to use.
  • MySql’s root password
  • The script to create the database, located in the database_resource folder from lemonpos code. If you are using lemon POS 0.6 version, the file is also installed on your /usr/share/apps/lemon/ or /usr/local/share/apps/lemon/ depending on your system and configuration. But if you use *ubuntu with lemon POS 0.5 version this file is missing for such version you can get it here
  • .

Note that the script must be from the same version you installed. Different version may have a different database structure.

This task is very simple. All you have to do is to run the script as shown below:

cd trunk/database_resources
cat lemon_mysql.sql | mysql -u root -p

MySql will prompt for the password, type the mysql’s root password. If you dont know this, try searching the default password for your linux distribution.

If no errors are reported, you can start using lemonpos.

Now you can run lemonpos and squeeze. from your applications menu or by command. Note that if you run “lemon” and it is not found, maybe you installed at another location, try /usr/local/bin/lemon or /usr/local/bin/squeeze

30 Responses to “Quick Setup”

  1. CombatWombat Says:

    Somethings I had to modify to get running on Ubuntu 8.04.1, with KDE4 installed:
    * The basic instructions are:

    cd trunk
    mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=/opt/kde4 .. #here you put your path to kde4. /usr/lib/kde4
    make
    sudo su
    make install

    Now, copy the lemonrc file to your local .kde/share/config directory:

    cp trunk/src/lemonrc /home/USER/.kde/share/config/ #Replace USER with your username.

    * After installation, you need to create a database and user on mysql, to do this:

    cd trunk/database_resources
    cat lemon_mysql.sql | mysql -u root -p
    sudo apt-get install libqt4-sql-mysql

    * If you want to create some demo products, do:

    mysqlimport -u root -p -v -L lemondb trunk/database_resources/*.txt

    Note: if you got an error, try changing the group and user for the products file to mysql:mysql

    * To start using lemon, type
    /usr/lib/kde4/bin/lemon

    Note the differences to your isntructions. Thanks! :-D

  2. help Says:

    I used your modified instructions but I still have no idea what my username or password should be. and when I go to squeeze to try to create one it crashes when I select ‘browse users’

  3. help Says:

    and I know user: admin password: linux is what it’s supposed to be, but no dice

  4. mchavezg Says:

    “help”: To which password do you refere?
    1.- lemonpos user/password is the one written in this document.
    2.- mysql password depends on your distribution. If you dont know this, try searching on mysql documentation about changing root’s password for mysql.

    Once you run the script successfully, you can use lemonpos, creating more users, changing passwords, etc…

  5. Barry Says:

    Is there a way to do this in phpmyadmin?

  6. Barry Says:

    I’ve got this working but I also need the username & password that you say:

    “1.- lemonpos user/password is the one written in this document.”

    Help!

  7. Barry Says:

    Got it!

  8. Phil Hughes Says:

    First, let me say that Lemon appears to be what I have been looking for. We are building an Eco-resort in Nicaragua, thus Spanish is what I need. All our computer systems (from general purpose to the way that controls our bio-filter sewage system will be running Linux–currently Kubuntu Hardy so the KDE interface fits.

    That said, what I see as the downside is no real discussion about the project, the product, documentation, … For example, I really did not see where Squeeze was directly refered to as what it does–I just figured it out by reading everything I could find.

    My personal suggestion would be to put up a wiki so it is easy for people to contribute the various bits of knowledge they gain. I also think it would encourage more participation.

  9. mchavezg Says:

    Thanks for your comments Phil, Its my plan to write some guides for the software, I started with the Quick Setup, I will continue with a Quick Startup guide for start using the two tools (lemon and squeeze). I stop including sample database because of the changing stage.

  10. Sherman Says:

    Ive installed lemonpos via Kubuntu repo and I find no lemondb anywhere on my system.
    I could really use a template file to start with.

    Ive been talking to people about Linux and some business owners have been talking to me about POS systems. Id really like to show them a demo of lemonpos. Is there anyway to get a copy of a database that I can show with?

    Thank you for all your hard work on this from I can see it looks great, and just what some of my friends are looking for.

  11. mchavezg Says:

    Sherman:

    I dont know how the kubuntu package is installed, and if it includes the database_resources folder in which the database-creation-script is located. On old version (0.4) this was not included (ubuntu package). Dont know if the newer is (0.5).

    One thing i must say: You must use the script from the lemonpos version you installed.

    About sample database, there is no one included yet for the 0.5 version (0.4 is very different).But its easy to create sample products using squeeze.

  12. dbs Says:

    No SQL resources included in the Ubuntu packages. It sure looks good, but the packaging in the binaries is not complete, and the startup has no bootstrap process.

    A suggestion – when Lemon starts up, if it gives a database error, ask if the person wants to create teh database, and feed the SQL script into the install. Sure the admin needs to create a database instance, but the table creation and setup should be seamless.

    The package looks interesting, but I cannot run it. I’ll have to move on.

    • mchavezg Says:

      Well, as im not the kubuntu package mantainer i cannot help with that. Any way i can post the script here for you and all other people who needs it.

      Wait for the file here or at the homepage (sourceforge).

  13. Luis Cordero Says:

    Hi there!

    I’m curious about trying lemon. I did the installation and everything worked fine. BUT when I start-up lemon I get the error message:

    “Lemon could not connect to the database and will terminate. Check if the database is running (mysql)”

    I am running Fedora 9. MYSQL is up and running. I can log-in as root and as lemon. So! I wonder what else I can check & try…

    BTW, I agree with the wiki idea. Maybe documenting the whole thing is an enormous tasks but the experience of other end-users can help both yourself and newbies.

    Thanks in advance,

    – Luis.

  14. mchavezg Says:

    Did you run the database creation script?
    some error when running the script?

    This problem may be because of:

    1.- No Mysql running
    2.- No database/user created (with script)
    3.- Bad user/password for (lemonclient) mysql
    4.- Bad configured acces for the lemonuser (mysql grant stuff)
    5.- A firewall blocking acess to mysql.

    The default created (by de script) user for mysql is “lemonclient”, and its granted to access from localhost. You can see the password in lemon_mysql.sql.

  15. Erik Says:

    how do i edit the configuration file if i cannot get into lemonpos? i need to change where the mysql database is but the program closes when it cant connect, this is a bigggggg flaw! change it next version!

    • mchavezg Says:

      The config file is stored in two places, any kde app tries frist to load from your home, for example:
      ~/.kde4/share/config/lemonrc

      if that is not found, it tries to load system-wide config at:
      /usr/local/share/config/lemonrc or /usr/share/config/lemonrc depending on your system.

      So, first, modify the one that is inside your home.

  16. chris Says:

    how can I make lemon use a mysql server on an other system

    • mchavezg Says:

      Use the configuration dialog to change the server address, user, and password.

      Change for both, lemon and squeeze.

      For lemon, run and login as admin. Then in the tool bar there is an configure icon, click it and go to ‘database’ section.
      For squeeze, run it, and click on the configure button on the right-top side of the window and go to database section.

      On 0.7 version, if lemon/squeeze cannot connect to database server, this dialog is shown.

  17. chris Says:

    lemon exits with an error about connecting to the mysql server on the local system before I can click on anything

    what do I have to do to the configuration files to make it use my external server

    • mchavezg Says:

      Are you using 0.6 or older version? There is a post and an the answer for which file to modify.

      But, version 0.7 fixes that inconvenient showing a database configuration dialog instead of terminating the application.

  18. chris Says:

    ok I got lemon woking, setup mysql on the host system tempararaly to get it to work so I could reconfigure it.

    that done it looks like a nice program I only have to get it to be able to charge for time and traveling distance, things that you don’t have to have in stack, so far all I can get it to bill fore it objects I have not fore time unless I make an item to represent an hour or something and say I have a ridiculous amount onhand.

    so is there a way to define labor rate in lemon and how, if not, consider it a suggestion for the next version.

    I am planing to open a small home based computer shop, so I need to be able to bill for services that might have different prices based on criteria, like time or other services, can lemon be programed to do that, give a discount on i service when ordered with another.

    • mchavezg Says:

      Well, time is a “measure”, so you can insert a new measure called ‘labor hours’ and insert products such as “Technical Support” sold by “labor hours” with price per ‘hour’ of ‘10.3′. So at lemon you can enter product “Technical Support” and a quantity of 3.5 ‘hours’. With the new way of inserting products, considering this product having code 123456789 you could enter 3.5×123456789 at the code inputbox and 3.5 hours of Technical Support will be inserted.
      This is the easiest way you can use lemonpos right now for this porpouse -dont need to wait for another version-.

      Click here to see an example

      Regarding discounts based on “grouped” products is not yet implemented. Well, I have a todo item for ‘grouped products’ but i have to plan it better at implementation level. My idea is having groups of products sold at lower price, but defined products per group, for example “1 coke + 1 hotdog” for 2 dollars, instead of “1 coke” for 1 dollar and “1 hotdog” for 2 dollars, which togheter are 3 dollars; but that group is exactly one hotdog and one coke, no more, no less.

  19. Sergio Says:

    In case you are using Ubuntu, there is the kde-devel package that will install the KDE4/Qt4 dependencies.

  20. rublar Says:

    No puedo compilar la version SVN ni en Madriva Cooker ni en Debian.
    El error que salta en ambas es el siguiente.

    [ 25%] Building CXX object src/CMakeFiles/lemon.dir/lemonview.o
    /root/kdenlive/lemonpos/src/lemonview.cpp:74: aviso: parámetro ‘parent’ sin uso
    /root/kdenlive/lemonpos/src/lemonview.cpp:142: aviso: parámetro ‘parent’ sin uso
    /root/kdenlive/lemonpos/src/lemonview.cpp:193: aviso: parámetro ‘parent’ sin uso
    /root/kdenlive/lemonpos/src/lemonview.cpp: In member function ‘void lemonView::finishCurrentTransaction()’:
    /root/kdenlive/lemonpos/src/lemonview.cpp:1282: error: no se encontró una función coincidente para la llamada a ‘Azahar::decrementProductStock(const long long unsigned int&, const double&, QDate)’
    /root/kdenlive/lemonpos/src/../dataAccess/azahar.h:137: nota: los candidatos son: bool Azahar::decrementProductStock(const qulonglong&, const double&, const qulonglong&, const qulonglong&, const QDate&)
    make[2]: *** [src/CMakeFiles/lemon.dir/lemonview.o] Error 1
    make[1]: *** [src/CMakeFiles/lemon.dir/all] Error 2

    Sinceramente no tengo ni idea de porqué sucede esto


  21. Firstly, thank you. This is a fine piece of work that takes GNU/Linux one step further.

    I’m not sure if i have over looked this, but I was interested in not only donating money for further development of this project, but interested in helping in any way possible with documenting, small bug fixes for this project or anything I can do to help.

  22. Davit Says:

    This think is so complicated and hard to understand for new in Linux world people.

    One ho to video tutorial would make life easier for everyone.


Leave a Reply