Bug 173642 - [terminal] Cannot open serial terminal: rxtx requiring lockfiles on Linux
Summary: [terminal] Cannot open serial terminal: rxtx requiring lockfiles on Linux
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-09 09:17 EST by Martin Oberhuber CLA
Modified: 2007-10-16 14:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-02-09 09:17:44 EST
On Redhat Enterprise Linux WS4:
When I activate the Terminal view / settings dialog and switch to "Serial" connection type, I don't see any ports listed in the "Port" dropdown.

On stderr, I see lots of the following message printed:

check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
please see: How can I use Lock Files with rxtx? in INSTALL

It turns out that I can fix this on Redhat by editing /etc/group and adding my user id to the "lock" group. I also need to make /var/lock group-writable. Then, rxtx creates file /var/lock/LCK..ttyS0 and no more error messages are shown.

I think that the following needs to be fixed:

1. RXTX should have an option for disabling lockfiles at runtime, without
   having to recompile. Either via a System Property, or via some API.
   Some users don't have "root" access, just need to get going and dont 
   care about lockfiles. Commercial applications which embed RXTX need to
   make sure their products can actually be used. Also note that the old Sun
   javax.comm (with RXTX 1.4 jcl.jar) worked fine on my machine without any
   group id tweaks for lockfiles, so this is kind of a regression.

2. In the error message printed by RXTX, the following information should be 
   added:
   3a) Path of the file that RXTX tried to create -- knowing it was below
       /var/lock would have made it a lot easier for me to fix it
   3b) If (1) is done, information how to set the System Property for disabling
       lockfiles

3. RXTX INSTALL should be more explicit about having to add to group "lock"
   instead of "uucp" on modern Redhat Linux.

4. If there is a modern Linux Standard for locking devices (from normal user
   permissions, without fixing any group ids!) this standard should be used.

On the RXTX mailing list http://mailman.qbang.org/mailman/listinfo/rxtx the issue of lockfiles has been discussed quite a bit. A new version of RXTX seems to be due early march.
Comment 1 Martin Oberhuber CLA 2007-02-09 09:28:02 EST
An interesting posting from the rxtx mailing list addresses (1):
http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20060320/794221.html
Comment 2 Martin Oberhuber CLA 2007-10-16 14:48:11 EDT
An Eclipse-specific version of RXTX which does not need lockfiles is now available via Update Manager on this update site:
   http://rxtx.qbang.org/eclipse/
or for download, as an SDK or runtime:
   http://rxtx.qbang.org/eclipse/downloads/

Just install this into Eclipse and it'll work.