[NBLUG/talk] xminicom

ME dugan at passwall.com
Sun Jun 29 13:59:00 PDT 2003


Jim Bianchi said:
>
> 	xminicom won't run when invoked by a user. It WILL run (and
> connect) when invoked by root. I've had this problem before, but never
> really solved it -- it never seemed a biggie since I so seldom used
> minicom or xminicom. Now, I'd really like to be able to use it as a user
> (as opposed to suing to root). The system is RH 8.0 on my Dell laptop. It
> says something about 'Device /dev/ttyS4 access failed: Permission denied.'
>
> 	/dev/modem is symlinked to /dev/ttyS4 and seems to be the correct
> device for such use. Both these files are world everythingable. minicom
> (no x), comes up and gives me the 'Device..' line (as above). xminicom
> opens a window long enough to print that line (but not read it), and then
> shuts down.
>
> 	Any hints on where to check and what to do in order to get this to
> work?

Yes. Often, you will find devices owned by a specific user and group.
Usually, distros will include a group called "modem". The "best" solution
(IMO) is to see if you have a group (check /etc/group) called "modem" or
"dialup" or "dialout" something like that.

Then,
# ls -l /dev/ttyS4
See what group owns it. If it is owned by "modem" or "dialup" or some
similar group, then as root, edit /etc/group and add yourself to the list.

Example:
[snip from /etc/group]
dialout:x:20:
[end snip]

becomes:
[snip from /etc/group]
dialout:x:20:YOURUSERNAME
[end snip]

If it is just group-owned by root, and you have one of those mentioned
groups (like modem, dialup or dialout" then chown the device file:
#chown root.dialout /dev/ttyS4

Then after you have set that, also make sure that the group has read an
write permission to the device:
# ls -l /dev/ttyS4

If the premissions are like:
crw-rw----
then the group that owns the device can read and write to it.
If it is not set this way, then:
# chmod 660 /dev/ttyS4


In the end, her is an example:
# ls -l /dev/ttyS4
crw-rw----    1 root     dialout    4,  68 Mar 14  2002 /dev/ttyS4

Now most shells open when changes are made to /etc/groups dont
automagically reload new group premissions/membership while you are in the
open shell. I believe there are ways to do this while in your shell
(depending upon the shell) but the *best* way is to just log out and then
log back in again. (If you are logged into X this means logging out of X
and then logging back in again. If you are logged into a console
getty-style TTY, then just logout and log back in.)

Once you do this, if root can use /dev/ttyS4 with minicom, then the
username you added to the group should also be able to do this.

HTH,
-ME




More information about the talk mailing list