Re: [Fwd: yemc can't connect]




Adriaan

Yep!  You are correct!  These are exactly the symptoms reported if you try
to run the EMC as a common user.  The messages that you got are only the
first level of errors.  When you fix these, others will pop up like
mushrooms in the spring.  The specific set will change a bit depending on
the linux, rtlinux, and emc versions that you are using.

Hints at the direction of a solution to the problem can be found in the
handbook 

www.linuxcnc.org/handbook/faq/faqemcsafe.html

But I'll give you a quick condensation of the page below:

1--  Fred says

Easy way is to set up a normal Linux user account, say "ray", with a home
directory, say /home/ray.

Ray won't be able to run the EMC for three reasons: 
a. it requires running the /sbin/insmod, /sbin/rmmod, and /sbin/lsmod
programs to install/remove/list the EMC motion controller; 
b. it requires accessing /dev/mem to use the shared memory interface; 
c. it requires running privileged inb/outb instructions for the parallel port
IO. 

You can get around the first problem by changing the permissions on
/sbin/insmod and /sbin/rmmod so that they are "setuid root". This means
that they run as if root is running them. Set this up, as root, by doing: 
chmod u+s /sbin/insmod /sbin/rmmod /sbin/lsmod

2-- Fred says
You can do the same sort of thing with /dev/mem, by making it read-write
for everyone. As root, do:
chmod a+rw /dev/mem


3-- Will says
You need to (for rtlinux 2+)
chmod a+rw /dev/mbuff
 

4-- Fred says
You can change the permission on emc/plat/<whatever>/bin/bridgeportio so
that it runs setuid root also. As root, do:
chmod u+s /usr/local/nist/emc/plat/<whatever>/bin/bridgeportio

Ray says, "Here I also change ??task, emcsh, iosh, because I had some
problems with tuning and saving the ?.ini file when the EMC shuts down. 
And when I try to watch or change parport bits.

Fred says "To do this, do (as root):

root> chown root emc/plat/linux_2_2_14/bin/iosh
root> chmod u+s emc/plat/linux_2_2_14/bin/iosh

-5- Ray says
The last message that I got when I tried to start the new version was:
running EMC DISPLAY PROGRAM -- tkemc...
Error in startup script: /bin/ls: tcl/scripts: Permission denied
 while executing "exec /bin/ls $scriptdir"
 (file "plat/linux_2_2_14/bin/tkemc" line 570)
To fix this I ran the following command as root. 
root> chmod u+s /bin/ls

This is only needed if you run tkemc and/or the various scripts under that
menu item.

And that should get the EMC going as a user.  Please keep track of your
progress with this and report back so that we can add it to the faq page.

Thanks in advance.  Hope this helps

Ray


On Tue, 17 Apr 2001, you wrote:
> Lukas du Plessis wrote:
> > 
> >   ------------------------------------------------------------------------
> > 
> > Subject: Re: yemc can't connect
> Ray,
> 
> Sorry for bugging you about this again - I was off the list for a while,
> got busy with other things.
> 
> I tried running emc as a normal user, but the generic.run script has a
> couple of 'insmod' commands which can only be run as root. I also tried
> running emc as root and yemc as a normal user, but then I get the can't
> connect message again. 
> Normally I run as root from login (not su), and it works fine for xemc
> and tkemc.
> 
> Regards,
> 
> Adriaan Pelzer 
> 
> 
> > Date: Fri, 30 Mar 2001 09:33:51 -0500 (EST)
> > From: Ray <rehenry-at-up.net>
> > Reply-To: emc-at-nist.gov
> > To: Multiple recipients of list <emc-at-nist.gov>
> > References: <XFMail.010330085245.adriaan-at-trispen.com>
> > 
> > Adriaan
> > 
> > I tried yemc and it seemed to work fine here.  This was on my own compile
> > (03-31-2001) of the sourceforge repository.  I see that there has been some
> > work done on it recently.  I found that it wakes up in world mode.  To
> > home each joint individually, you need to change to joint mode.
> > 
> > I commonly run as a user rather than as root.  I get the can't connect
> > message when I have a terminal running under su and try to start the EMC
> > with it.
> > 
> > Ray
> > 
> > On Fri, 30 Mar 2001, Adriaan wrote:
> > > Hi list,
> > >
> > > Yesterday night I tried to use yemc for the first time. It can't connect to
> > > emc, while xemc works just fine. From the source there doen't seem to be much
> > > difference between the two when it comes to communicting with emc, same hooks,
> > > same variables, everything. The rest of the setup stayed the same. Tkemc also
> > > works fine.
> > > Any ideas?




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact