Issues getting started from default CD install

  • StrangeGuy
  • StrangeGuy's Avatar Topic Author
  • Visitor
  • Visitor
21 Jul 2014 03:09 #48980 by StrangeGuy
I need a little help getting started with LinuxCNC user interface development. I have ran it from the CD and installed it to an SSD from the downloadable image twice. I'm getting the same errors each time. I've tried to search for these errors and need to ask for some help.

#1 I can run LinuxCNC using axis without issue. I can change the ini display = touchy and run without issue.
#2 I can select GladeVCP from the configuration picker and it runs fine.

#3 Something that should be very simple to do according to the well written tutorial written by John Thornton (gnipsel.com/glade/glade01b.html). I have created the two files and even downloaded them to my desktop and get the same result as below.
$ cd Desktop
~/Desktop$ python gui1.py
RTAPI: ERROR: could not open shared memory (errno=2)
Segmentation fault

Tried again with sudo and get
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
Segmentation fault

So I check the /etc/security/limits.conf file per the informational link and it has the correct setting. So I'm stuck for this one.

#4 So I move to this tutorial (gnipsel.com/linuxcnc/gui/gui03b.html). When I try to run it after a few seconds I get this error.

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
from: can't read /var/mail/gladevcp.gladebuilder
/usr/bin/gui3: line 11: syntax error near unexpected token `('
/usr/bin/gui3: line 11: `BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))'
3651
PID TTY STAT TIME COMMAND
3724
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

/var/mail folder is empty. So I'm stuck on this one as well.

Any assistance you can provide to get me going would be appreciated. If you could use more information let me know.

Please Log in or Create an account to join the conversation.

More
21 Jul 2014 16:51 #48996 by cncbasher
have you installed the glade packages additional to the standard cd install ?

sudo apt-get install glade

Please Log in or Create an account to join the conversation.

  • StrangeGuy
  • StrangeGuy's Avatar Topic Author
  • Visitor
  • Visitor
21 Jul 2014 20:14 #49001 by StrangeGuy
Replied by StrangeGuy on topic Issues getting started from default CD install
Yes I believe that I have. I installed glade "GTK+ 2 User Interface Builder" from the software center. When I run the apt-get it returns that I already have the newest version.

Please Log in or Create an account to join the conversation.

  • StrangeGuy
  • StrangeGuy's Avatar Topic Author
  • Visitor
  • Visitor
22 Jul 2014 02:53 - 22 Jul 2014 10:26 #49003 by StrangeGuy
Replied by StrangeGuy on topic Issues getting started from default CD install
To try and rule out hardware form being the issue I just completed the same tasks on a different machine running from the CD. It returned the same error, errno=2. Excepts this time it popped up that python 2.6 closed unexpectedly.

Can someone help me with this?

Edit: <
It's easy to duplicate my issue, I have done so now with three computers.
1. Download and burn the CD from here .
2. Boot up to the CD, install "GTK+ 2 User Interface Builder" from the software center.
3. Run a python/glade file such at files from here and here here ..
4. You get error RTAPI: ERROR: could not open shared memory (errno=2)

Moderator: if this post is in the wrong section please move it to get some attention as I'm stuck here. Thanks so much!
> Edit End
Last edit: 22 Jul 2014 10:26 by StrangeGuy. Reason: Adding additional info

Please Log in or Create an account to join the conversation.

More
22 Jul 2014 15:13 #49006 by ArcEye
Hi

I was hoping JT would chime in, he is obviously busy at present.

I don't use python or glade, but your error messages suggest you have packages missing

Make sure you have all these by trying to install them again

wiki.linuxcnc.org/cgi-bin/wiki.pl?Instal...ackages_for_gladevcp

The other thing that completely screws up python, is if you have windoze ^M charactors in the file because you used a windows editor or pasted from a windows browser at some point.

Open the file in gedit, do File > Save As and save it as the same name, but make sure the drop down menu at the bottom shows Unix / Linux and not windows

good luck

Please Log in or Create an account to join the conversation.

  • StrangeGuy
  • StrangeGuy's Avatar Topic Author
  • Visitor
  • Visitor
22 Jul 2014 23:40 - 22 Jul 2014 23:46 #49026 by StrangeGuy
Replied by StrangeGuy on topic Issues getting started from default CD install
Thank you for your reply.
The result of running the install script:
sudo apt-get install python-gnome2 python-glade2 python-numpy python-imaging python-xlib python-gtkglext1 python-configobj python-gtksourceview2 
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-gnome2 is already the newest version.
python-glade2 is already the newest version.
python-numpy is already the newest version.
python-imaging is already the newest version.
python-xlib is already the newest version.
python-xlib set to manually installed.
python-gtkglext1 is already the newest version.
python-gtkglext1 set to manually installed.
python-configobj is already the newest version.
python-configobj set to manually installed.
python-gtksourceview2 is already the newest version.
The following packages were automatically installed and are no longer required:
  user-setup localechooser-data
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Opened and re-saved the files. Still no change:
python gui1.py
RTAPI: ERROR: could not open shared memory (errno=2)
Segmentation fault

Files as downloaded and being used.



File Attachment:

File Name: gui1.glade
File Size:11 KB

File Attachment:

File Name: gui1.txt
File Size:1 KB
Attachments:
Last edit: 22 Jul 2014 23:46 by StrangeGuy.

Please Log in or Create an account to join the conversation.

  • StrangeGuy
  • StrangeGuy's Avatar Topic Author
  • Visitor
  • Visitor
23 Jul 2014 06:27 #49038 by StrangeGuy
Replied by StrangeGuy on topic Issues getting started from default CD install
I figured this out. It was a newbie error....
The step that I was missing was to launch LinuxCnc prior to running my python file in the terminal window. Which would make sense to have the shared memory error as they are connected. I guess that the error could have said "Can't run this without LinuxCnc running" or something like that. But anyway, moving on.

Please Log in or Create an account to join the conversation.

More
23 Jul 2014 15:29 #49045 by ArcEye
Glad you got it sorted

It was there but not necessarily obvious, as an earlier example did not require a running linuxcnc instance

11. Run the config again to see our custom screen now instead of Axis.

linuxcnc /home/john/linuxcnc/configs/gui3/axis.ini


regards

Please Log in or Create an account to join the conversation.

Moderators: mhaberlerHansU
Time to create page: 0.166 seconds
Powered by Kunena Forum