LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-31-2010, 11:15 PM   #1
Arella71
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Rep: Reputation: 0
Question Need Help installing the program Floreant Pos with Ubuntu 10.04


Hi I need an idiots guide/walk through on this one. This is a Java based program. I have java installed but do not understand the instructions found here. Any help on this is greatly appreciated. Please note that i just switched from windows and know very little of linux based systems.
 
Old 08-01-2010, 09:02 PM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
I get the impression there is a problem with one of the set-up scripts. Looking into it, I'll let you know.
 
Old 08-02-2010, 05:21 AM   #3
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
OK, save this to a file:

Code:
#! /bin/bash

java -cp lib/derbynet.jar org.apache.derby.drda.NetworkServerControl start -h localhost -p 1523 &
java -jar floreantpos.jar
Name it "start" or "startdb" or "start_server" or whatever you like. Then open a terminal and make the file executable:
chmod +x name_of_the_file
To "easify" using the terminal, I suggest you install nautilus-open-terminal. You can then right-click in the floreant directory, select "open terminal" and enter the command in the terminal that pops up.
When you are done, type ./name_of_your_file into the terminal and it should start.
 
Old 08-02-2010, 05:57 PM   #4
Arella71
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jay73 View Post
OK, save this to a file:

Code:
#! /bin/bash

java -cp lib/derbynet.jar org.apache.derby.drda.NetworkServerControl start -h localhost -p 1523 &
java -jar floreantpos.jar
Name it "start" or "startdb" or "start_server" or whatever you like. Then open a terminal and make the file executable:
chmod +x name_of_the_file
To "easify" using the terminal, I suggest you install nautilus-open-terminal. You can then right-click in the floreant directory, select "open terminal" and enter the command in the terminal that pops up.
When you are done, type ./name_of_your_file into the terminal and it should start.
Thank you so much Jay73, that worked great. Is there any way I can put a launcher on my desktop that will start my start file(that is what i named it) and then start the program?
 
Old 08-03-2010, 09:21 AM   #5
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Grrrr, I have just figured out why I was having so much trouble getting that database server started. The original start-server script was obviously written on a windows box...

I'll post a script as soon as I have it working.

Last edited by jay73; 08-03-2010 at 01:23 PM.
 
Old 08-03-2010, 03:07 PM   #6
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
This should do it. Put in your home directory, make executable and run.

Code:
#! /bin/bash

SCRIPTDIR=${HOME}/bin
FHOST=localhost
FPORT=1523
STARTSCRIPT=fstart
LAUNCHERSCRIPT=floreant
STOPSCRIPT=fstop

#create $HOME/bin if it does not exist
if [[ -z "$1" ]]; then
    printf "%s\n" "You need to add the full path to your \"floreantpos\" directory to the command"
    printf "%s\n" "For example: $(basename $0) ${HOME}/Downloads/floreantpos"
    exit 1
fi

[[ -x "$SCRIPTDIR" ]] || mkdir "$SCRIPTDIR"

#create the start-up script and place it in $HOME/bin
echo "
#! /bin/bash 

FPATH="$1"

cd \$FPATH && \
java -cp \${FPATH}/lib/derbynet.jar org.apache.derby.drda.NetworkServerControl start -h "$FHOST" -p "$FPORT"  &

exit 0
" > ${SCRIPTDIR}/$STARTSCRIPT || ( printf "%s\n" "Could not write to ${SCRIPTDIR}" && exit 1 )

#make the script executable
chmod u+x ${SCRIPTDIR}/$STARTSCRIPT || ( printf "%s\n" "Could not make $STARTSCRIPT executable" && exit 1 )

#insert call to start-up script into $HOME/.profile
echo "
#start floriant derby database server if the start script exists
if [[ -f ${SCRIPTDIR}/$STARTSCRIPT ]]; then
    ${SCRIPTDIR}/$STARTSCRIPT
fi
" >> $HOME/.profile || ( printf "%s\n bin/$STARTSCRIPT not found...exiting. " && exit 1 )

#now create the client launcher script
echo "
#! /bin/bash

FPATH="$1"

cd \$FPATH && java -jar -cp \".;lib\" floreantpos.jar

exit 0
" > ${SCRIPTDIR}/$LAUNCHERSCRIPT || ( printf "%s\n" "Could not write to ${SCRIPTDIR}" && exit 1 )

#and make it executable:
chmod u+x ${SCRIPTDIR}/$LAUNCHERSCRIPT || ( printf "%s\n" "Could not make $LAUNCHERSCRIPT executable" && exit 1 )

#create the script to stop the server
echo "
#! /bin/bash

FPATH="$1"

cd \$FPATH && \
java -cp \${FPATH}/lib/derbynet.jar org.apache.derby.drda.NetworkServerControl shutdown -h $FHOST -p $FPORT &

exit 0
" > ${SCRIPTDIR}/$STOPSCRIPT || ( printf "%s\n" "Could not write to ${SCRIPTDIR}" && exit 1 )

#make it executable
chmod u+x ${SCRIPTDIR}/$STOPSCRIPT || ( printf "%s\n" "Could not make $STOPSCRIPT executable" && exit 1 )

exit 0

Last edited by jay73; 08-03-2010 at 03:08 PM.
 
Old 08-05-2010, 01:43 PM   #7
Arella71
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Well, I did not realize that your original post started the server and then the application, but it does. I just had to put a quick launch on my desktop pointing to the file you had me make. As for this new one you posted it seems to be beyond me on how to do it. Thanks for your help
Quote:
Originally Posted by jay73 View Post
This should do it. Put in your home directory, make executable and run.

Last edited by Arella71; 08-05-2010 at 02:16 PM. Reason: Added quote brackets
 
Old 08-06-2010, 08:08 AM   #8
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Hi. The longer script does more or less the same as the shorter one, the main difference being that it starts the database automatically as soon as you log in and that it provides a way to bring the server down whenever you like.

What it does, in detail, is:
- create a startup script for the server
- create a launcher script for the GUI database client
- create a script to stop the database server
- make all three executable
- create a bin directory in your home directory if you haven't got one yet
- move the three scripts to that bin directory
- add the instruction to autostart the server on login to your .profile configuration file

I could have explained in detail how to do all that yourself but turning it into a script seemed more convenient.

The reason I came up with the new script is that there is a bit of a problem with the shorter one. Basically, it starts the server, then the GUI client. Since the two are independent, closing the GUI does not stop the server. The latter keeps running in the background so the next time you use the script to launch the GUI client, it tries to start the server but it fails because the server is still up. If you run the shorter script from a terminal, close the GUI and run the script again, the terminal should print a warning that the server could not be started. Of course not, it is still running. The client should still work, though. The real problem is that the server never gets properly stopped before you log out, which might in the long run lead to the database getting corrupted. It's OK while you're experimenting but I guess not once you have stored some valuable data.

With the three scripts that the longer script will generate, you have far more control. If you run these from a terminal:
fstart -> the server starts
floreant -> the client starts
fstop -> the server stops
As the fstart is added to .profile (the scripts sees to that), it is started automatically whenever you log in. So you'd only ever need need to run the "floreant" script, to launch the GUI. You can now do so as often as you want since the floreant script nicely leaves the server alone. When you intend to log out, you should run the "fstop" script just once, to bring the server down. This will assure that it gets a chance to shut down cleanly. As it's quite easy to forget running fstop, the task should probably be automated. You can add this this to your /etc/gdm/PostSession/Default file, right before the "exit 0" line:
if [ -f /home/your_username_here/bin/fstop]
/home/your_username_here/bin/fstop
fi
So if you wish to use the longer script, copy-past to a new file in your home directory, name it "setup", make it executable from the terminal (chmod +x setup) and run it (./setup). Check whether the bin directory and the three scripts have been generated and try them out. Log out and in, open a terminal and run floreant to launch the client and, after closing the GUI, fstop. If everything is working as expected , you can dispose of the original script.

Btw, you can add it to your menu by doing this:
- right-click the menu icon
- select "edit"
- select a category in the dialog that pops up (e.g. Office)
- select "new item"
- fill out the dialog:
name: floreant
command: floreant
description: a tool tip of your choice
if you click on the icon, you can navigate the system and select a custom icon.
Creating an icon works similarly, only you'd right-click your desktop and select "create launcher" to set it up.

Last edited by jay73; 08-06-2010 at 10:38 AM.
 
Old 08-25-2010, 01:30 AM   #9
nicknefarious
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Rep: Reputation: 0
FloreantPOS

Jay,

Thanks for the script however I can't seem to get it to work. Your initial simple script gets things running however when I try to run your second longer script it does nothing, no error messages, nothing.

Any chance you are still around and can help out a little more?

Thanks,

Nick
 
Old 08-25-2010, 03:47 AM   #10
nicknefarious
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Rep: Reputation: 0
@nick - you are a moron

Hey after re-reading again and using my brain, everything is working just fine. Thanks Jay, a huge help.

Cheers,

Nick

Quote:
Originally Posted by nicknefarious View Post
Jay,

Thanks for the script however I can't seem to get it to work. Your initial simple script gets things running however when I try to run your second longer script it does nothing, no error messages, nothing.

Any chance you are still around and can help out a little more?

Thanks,

Nick
 
Old 08-25-2010, 04:12 AM   #11
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
OK, great. I tested it on my own computer so I would be surprised if it did not work.

As posted before, the script sets the computer up to automate pretty much everything; it is the user's responsibility stop the server, though (see my previous post). If anyone is interested, I could offer some tips on automating that part, too. I'm afraid it would work on Ubuntu (and derivatives like Mint) only as the system init procedure (upstart) is rather different from other distros.
 
Old 11-26-2010, 02:04 AM   #12
nicknefarious
LQ Newbie
 
Registered: Aug 2010
Posts: 8

Rep: Reputation: 0
Printer for POS System

Hi all,

Jay73/or anyone else who's as good at helping out, I was hoping for another hand. I know this isn't only related to FLoreantPOS but any POS system but here goes...

I have just bought a Zonerich (Chinese Brand) POS Receipt Printer Model No. AB-T88 (USB).

I have connected it to an XP Virtual Machine (Maverick 64-bit host laptop, XP 32-bit Guest) and been able to install it easily and successfully printed a test message from there.

I have been unable to install it however in Ubuntu Maverick (32-bit desktop) as I am unsure of the process to follow. I have tried in CUPS and it doesn't seem to be recognised.

As well as installing it in Maverick I want to make use of it through FloreantPOS. I didn't actually try to print a receipt from the printer with Floreant installed in the XP VM yet.

I have Floreant installed and working in Ubuntu Maverick 32-bit Desktop but without the printer it's virtually useless.

Can you direct me as to how I can install this printer. Do I need drivers? I have some drivers provided by the manufacturer though I didn't need them when installing in XP. It was instantly recognised and installed. (They are windows drivers with a gpd file)

I also noticed in the Virtualbox USB connections that the printer was being recognised as Zonerich Printer - so some connection was being made there... but how do I get from that to adding it as a printer and being able to print from it using Floreant in Maverick? At the moment I can't see or select the printer to configure it in Floreant. Floreant is java-based. And can't get it to appear when using Ubuntu Printing menu to add a new printer. My existing USB HP Full-Sized printer installed just fine. Automatically.

Any help or direction is much appreciated.

A big cheers again,

Nick
 
Old 10-24-2011, 02:52 AM   #13
cameltech
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
Smile

Hi... can we use any android phone / tab for taking orders ? can we run floreant POS on an android ? please reply.
 
  


Reply

Tags
help, install


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing a Windows program in Ubuntu using Wine donrc Ubuntu 5 11-29-2009 02:27 PM
Hello pos renderdan LinuxQuestions.org Member Intro 1 09-17-2009 11:00 PM
POS tagger Pravab Programming 1 05-06-2007 08:51 PM
LXer: Volante POS Systems Announces Secure Linux POS Solution for ... LXer Syndicated Linux News 0 12-14-2006 08:54 PM
yahoo pos talkinggoat Linux - Software 3 02-13-2004 01:38 AM


All times are GMT -5. The time now is 02:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration