Cash drawer only opens for root user

Hello everyone,

I am putting together a DIY Point Of Sale (POS) system using openbravo pos as the software and openSUSE 11.4 GNOME as the operating system. I am running into difficulty with the cash drawer. It’s a UPOS 2020 USB cash drawer and is fully recognised by openSUSE.

My problem is that after I put in the config into openbravo POS is doesn’t work. Out of curiousity I decided to run the program as root, redo the config and it now works fine. So I figure it’s a permissions issue.
Does anyone have any idea how I can have my normal user use the device. It’s on /dev/ttyUSB0 btw.

Thanks for any help provided!

Hi there,

I had this same issue accessing an Arduino as a non-root user. I would say try the steps at: Arduino - openSUSE

“chmod 777 /dev/ttyUSB0
or alternatively add your user to the uucp group.”

I would see if adding the user to uucp works.

Cheers,
Lews Therin

Udev sets the ownership, as this command will show

ls -l /dev/ttyUSB*

Add the relevant user to the appropriate group.

Write a udev rule that sets the ownership and permission and put it in /etc/udev/rules.d.

Thanks for the suggestions guys. I was wondering what the command was to view the permissions. Still a bit of a command line n00b :wink:
Will try all suggestions when I am back working on it this evening.

On 08/16/2011 02:46 AM, Dexter1979 wrote:
>
> Thanks for the suggestions guys. I was wondering what the command was to
> view the permissions. Still a bit of a command line n00b :wink:
> Will try all suggestions when I am back working on it this evening.

The command ‘ls -l’ show permissions (among other things). Using ‘man ls’ will
show you all the bells and whistles.

Hello all,

Just a quick update on this issue. I completely forgot to post the solution. Thanks to everyone for pointing me in the right direction. Here’s what I did.

Adding the user to uucp didn’t work.

After looking at the device with “ls -l /dev/ttyUSB0” I was shown the following:

trulygifted@TrulyGifted:/dev> ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Sep  6 19:55 /dev/ttyUSB0

It showed dialout as one of the groups. The link posted by LewsTherinTelemon mentioned Arduino so I googled that. The Fedora page mentions a few more groups to be added to.

After all this it was a simple matter of adding my user to the following groups:

  1. uucp
  2. lock
  3. dialout

I did this in the Gnome Desktop by going to YAST - Security and Users - User and Group management. I clicked on my user, then edit at the bottom left, Click on the Details tab in the window that opens and tick the boxes next to the groups mentioned above. Click OK twice, logout and back in and it’s sorted!

So now any user belonging to dialout (IIRC this used to be a default group for users) can open the cash drawer? :smiley:

So now any user belonging to dialout (IIRC this used to be a default group for users) can open the cash drawer?

:smiley:
…or create a ‘bean_counters’ group and write the associated udev rule! :wink:

Hehehe. Or maybe a gfc_culprits group. :smiley: