Biopowered - vegetable oil and biodiesel forum

General => Chatter => Topic started by: Julian on December 09, 2013, 09:45:47 PM

Title: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 09:45:47 PM
Aimed primarily at James (if you are around), but if anyone else can help I'd be very grateful.

It's probably a very simple problem but being a complete novice at Linux, and a Muppet at IT generally, I'm really struggling.

I’ve bought the electronics for this 3D printer and, I believe, worked out how it all hooks up.  To run it I need some software which is open source and readily available with what look to be very clear and concise instruction as follows ....

-----------------------------------------------

 Installing for all users

If you want RepRap to be available system-wide to all users, you will need to log in as the superuser to install it.

Assume you downloaded reprap-nnnnnn-yyyymmdd.zip into the directory /xxx/yyy. Move to the directory /usr/local, then unpack it:

Code: [Select]
# cd /usr/local
# unzip /xxx/yyy/reprap-nnnnnn-yyyymmdd.zip

Then move to the /usr/local/bin directory and create a short shell script called reprap using your favourite text editor (gedit in the example).

Code: [Select]
# cd /usr/local/bin
# gedit reprap

Copy and paste these three lines into the script, then save it:

Code: [Select]
#!/bin/sh
cd /usr/local/reprap-nnnnnn-yyyymmdd
./reprap

(Don't forget to replace the nnnnnn and the yyyymmdd with the right strings for your distribution file.)

Finally, set execute permission on the file:

Code: [Select]
# chmod 755 reprap
Any user will now be able to run the software just by typing the command "reprap".

There is a RepRap teardrop symbol in the file /usr/local/reprap-nnnnnn-yyyymmdd/reprap-icon.png which people can use if they add the program to their desktop or task-bar as a clickable executable. The program is /usr/local/bin/reprap .

If you want to save space, you can now delete the distribution .zip file:

Code: [Select]
# rm /xxx/yyy/reprap-nnnnnn-yyyymmdd.zip
-----------------------------------------------

There appear to be some additional instructions for 64 bit systems (which mine is), but that's another bridge to cross later perhaps.  For completeness this is the page where the instructions are located ...

http://reprap.org/wiki/Installing_RepRap_on_your_computer

I've managed to get the unzipped main directory located in  usr/local and some how (I've tried so many things) managed to create the reprap file in usr/local/bin.  I've run the chmod 755 reprap command which I beleive makes the file accessible to all, but each time I try and run the program using the reprap command, I get a "Permission denied" warning and nothing happens.

I've managed to find a command which lists permissions for bin and the result is ...

Code: [Select]

root@julian-HP:/usr/local/bin# ls -l
total 8
-rwxrwxr-x 1 root root 62 Dec  9 01:00 reprap
-rw-r--r-- 1 root root 62 Dec  9 00:49 reprap~

I'm now at the point of pulling out clumps of hair, any help (phrased as if talking to a 10 year old) would be greatly appreciated.





Title: Re: Off topic ... Some help with Linux please
Post by: Rotary-Motion on December 09, 2013, 09:54:02 PM
sack it go windows weeeeeeeeeeeee

 ;D
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 09:58:12 PM
Yup, sounds like a permissions problem.

What happens if you type

Code: [Select]
sudo reprap
Title: Re: Off topic ... Some help with Linux please
Post by: Rotary-Motion on December 09, 2013, 09:59:51 PM
im trying to contact someone into this but had no reply as of yet
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 10:04:54 PM
sack it go windows weeeeeeeeeeeee

 ;D

I have that load of dog excrement that is windows 8 and Im not convinced that it will run with that.  It's a case of having committed to Linux, I really need to brave it out (I might learn something in the process).

I managed to find the answer to the non-operational wireless card ... you had to "blacklist the very card you were trying to install!  All very logical really.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 10:07:21 PM
Yup, sounds like a permissions problem.

What happens if you type

Code: [Select]
sudo reprap

Thanks, James.

This is the result (what I've been getting for three evenings)

Code: [Select]
julian@julian-HP:~$ sudo reprap
[sudo] password for julian:
/usr/local/bin/reprap: 3: /usr/local/bin/reprap: ./reprap: Permission denied
julian@julian-HP:~$
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 10:48:46 PM
could you do an
Code: [Select]
ls -l in
Code: [Select]
/usr/local/ please?
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 10:50:38 PM
Code: [Select]
julian@julian-HP:~$ cd /usr/local/
julian@julian-HP:/usr/local$ ls -l
total 40
drwxrwxr-x 2 root root 4096 Dec  9 01:00 bin
drwxr-xr-x 2 root root 4096 Feb 13  2013 etc
drwxr-xr-x 2 root root 4096 Feb 13  2013 games
drwxr-xr-x 2 root root 4096 Feb 13  2013 include
drwxr-xr-x 2 root root 4096 Dec  6 23:43 java
drwxr-xr-x 3 root root 4096 Feb 13  2013 lib
lrwxrwxrwx 1 root root    9 Jun 27 19:27 man -> share/man
drwxrwxrwx 4 root root 4096 Dec  9 00:23 reprap
drwxr-xr-x 2 root root 4096 Feb 13  2013 sbin
drwxr-xr-x 7 root root 4096 Feb 13  2013 share
drwxr-xr-x 2 root root 4096 Feb 13  2013 src
julian@julian-HP:/usr/local$

Title: Re: Off topic ... Some help with Linux please
Post by: julianf on December 09, 2013, 11:05:19 PM
its a long time since ive used linux, but the second file on the list -

-rw-r--r-- 1 root root 62 Dec  9 00:49 reprap~


is not executable.

if it needs to be, chmod 777
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:11:09 PM
its a long time since ive used linux, but the second file on the list -

-rw-r--r-- 1 root root 62 Dec  9 00:49 reprap~


is not executable.

if it needs to be, chmod 777

Yes the reprap file needs to be executible.  Not sure why two files are showing up as there is only one in the directory, but I've tried
Code: [Select]
chmod 755 reprap
and

Code: [Select]
chmod 777 reprap
Numerous times to no avail.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:11:59 PM
Ok, first hurdle is to get the software running, then make it accessible to all users later (do you really need that?)

So to undo what you've done so far:

Code: [Select]
sudo rm -r /usr/local/reprap
sudo rm -r /usr/local/bin/rep*

(I think....might need tweaking)

Then

Code: [Select]
cd ~/
wget https://github.com/reprap/release/blob/master/reprap-mendel-20120421.zip
unzip reprap-mendel-20120421.zip

Then try running it:

Code: [Select]
cd reprap-mendel-20120421
./reprap

I think the permission denied message is a red herring. It's been installed as root and you're trying to run it as Julian.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:19:16 PM
Ok thanks, I'll plough through that lot, give me a mo.
It doesn't have to be accessible to all ... I'm the only user anyway, I just wanted the quickest way to get to the software and all users seemed logical.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:22:02 PM
Making something available to all is more difficult in linux. The above essentially moves the executables to your home directory - only you can access them there.
Title: Re: Off topic ... Some help with Linux please
Post by: julianf on December 09, 2013, 11:30:23 PM
isnt he logged on as root?

(my days of linux ended arround red hat 6 time - for years i had a box doing 'stuff' that had no gui, and not even a monitor or keyboard attached - but its all very hazy now!)
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:31:33 PM
This is the last bit, seems to say it can't find things ....

j
Code: [Select]
ulian@julian-HP:~$ cd ~/
julian@julian-HP:~$ wget https://github.com/reprap/release/blob/master/reprap-mendel-20120421.zip
--2013-12-09 23:49:00--  https://github.com/reprap/release/blob/master/reprap-mendel-20120421.zip
Resolving github.com (github.com)... 192.30.252.128
Connecting to github.com (github.com)|192.30.252.128|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24360 (24K) [text/html]
Saving to: `reprap-mendel-20120421.zip'

100%[======================================>] 24,360      --.-K/s   in 0.02s   

2013-12-09 23:49:00 (1.40 MB/s) - `reprap-mendel-20120421.zip' saved [24360/24360]

julian@julian-HP:~$ unzip reprap-mendel-20120421.zipcd reprap-mendel-20120421
unzip:  cannot find or open reprap-mendel-20120421.zipcd, reprap-mendel-20120421.zipcd.zip or reprap-mendel-20120421.zipcd.ZIP.
julian@julian-HP:~$ ./reprap
bash: ./reprap: Is a directory
julian@julian-HP:~$

I've obviously rushed into this without knowing the basics, but when you say running it as root and julian, is that indicated by the text in front of the @ sign?  If so I'm sure I've tried in both.

I did try copying the unzipped directory to home, making a bin directory and putting the reprap file in the but that didn;t seem to work ... most probably something I cocked up though.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:38:55 PM
julian@julian-HP:~$ unzip reprap-mendel-20120421.zipcd reprap-mendel-20120421
unzip:  cannot find or open reprap-mendel-20120421.zipcd, reprap-mendel-20120421.zipcd.zip or reprap-mendel-20120421.zipcd.ZIP.

This bit should be two lines

Code: [Select]
unzip reprap-mendel-20120421.zip
then

Code: [Select]
cd reprap-mendel-20120421
and finally

Code: [Select]
./reprap
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:40:36 PM
Oh, sorry ... I'll try again
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:41:13 PM
isnt he logged on as root?

(my days of linux ended arround red hat 6 time - for years i had a box doing 'stuff' that had no gui, and not even a monitor or keyboard attached - but its all very hazy now!)

No, he's alternating between running a new shell as root and running as Julian. I can't quite pin down the exact problem here, but that is I think where it lies. Specifically with the command to run a new shell in the script.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:42:38 PM
You know you can use the tab key to autfill most of this?

Quote
unzip re
followed by the tab key should fill in the rest.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:48:31 PM
Code: [Select]
julian@julian-HP:~$ unzip reprap-mendel-20120421.zip
Archive:  reprap-mendel-20120421.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of reprap-mendel-20120421.zip or
        reprap-mendel-20120421.zip.zip, and cannot find reprap-mendel-20120421.zip.ZIP, period.
julian@julian-HP:~$ cd reprap-mendel-20120421
bash: cd: reprap-mendel-20120421: No such file or directory
julian@julian-HP:~$ ./reprap
bash: ./reprap: Is a directory
julian@julian-HP:~$


Sorry for the delay, forum seen to be locking up, other pages are ok.

Didn't know about the tab key ... remember you're dealing with a 10 year old with the typing skills of s chimp!
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 09, 2013, 11:51:05 PM
Yup, sorry. Screwed up slightly.

Despite downloading a .zip file - it's empty.

I'll write it out again in the morning.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:56:34 PM
I've just checked. I do have a directory "reprap" c/w all files already in "Home" and a new "bin" directory containing the file "reprap".  Are they of any use?

On thing I did  notice was a discrepancy (there appear to be two version on the reprap wiki) in the reprap file in the bin directory.  I tried both versions to  o avail.   Is it possible to work out from the files in the reprap directory what the reprap file in the bin directory should be?

These were the two versions ...

Code: [Select]
#!/bin/sh
cd /usr/local/reprap-nnnnnn-yyyymmdd
./reprap

Code: [Select]
#!/bin/sh
cd /usr/local/reprap 64bit-mendel-20100719
./reprap

Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 09, 2013, 11:57:45 PM
Yup, sorry. Screwed up slightly.

Despite downloading a .zip file - it's empty.

I'll write it out again in the morning.

OK, no problem, thanks ever so much for your help tonight.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 12:01:43 AM
Sorry, copied the files wrong.

One was ...

reprap 64bit-mendel-20100719

and the other

reprap 20100719

I think!
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 07:29:52 AM
Having a bin directory is only necessary if it's in /usr/local/

If the folders are in your home directory then you don't need a bin or the script file.

I'm not sure where we are now exactly. You should remove any reprap directories, bin directories that you've created, and script files before doing the below.

First check we're in the home directory

Code: [Select]
cd ~/
Then we get the file (we have to get the master .zip from github which gives us an extra step)

Code: [Select]
wget https://github.com/reprap/release/archive/master.zip
Extract the .zip

Code: [Select]
unzip master.zip
cd into the created directory

Code: [Select]
cd release-master
unzip the file we should have got before

Code: [Select]
unzip reprap-mendel-20120421.zip
Now, we're one directory deep so we'll move the directory just created to your home folder and rename it to something a little more friendly at the same time

Code: [Select]
mv reprap-mendel-20120421 ~/reprap
So now we have the files in the folder "reprap" inside your home directory

Finally we cd into our new directory:

Code: [Select]
cd ~/reprap/
And run the program

Code: [Select]
./reprap
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 09:19:04 AM
I did a lot of playing last night based on what you said about being easier to run all this from the home folder and ended up with a load of, what appeared to be Java warnings.  At one point unzipping the 2012 reprap file I got messages that the file was corrupt and found a 2010 file that seemed OK, however I'll clear all the stuff I put in the home folder and proceed as you suggest.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 09:27:37 AM
Hmm, very similar to what I got last night ....

Code: [Select]
julian@julian-HP:~/reprap$ ./reprap
java.lang.UnsatisfiedLinkError: /home/julian/reprap/librxtxSerial.so: /home/julian/reprap/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "RepRap" java.lang.UnsatisfiedLinkError: /home/julian/reprap/librxtxSerial.so: /home/julian/reprap/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:844)
at java.lang.System.loadLibrary(System.java:1051)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at org.reprap.comms.GCodeReaderAndWriter.openSerialConnection(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.init(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.<init>(Unknown Source)
at org.reprap.machines.GCodeRepRap.<init>(Unknown Source)
at org.reprap.machines.MachineFactory.create(Unknown Source)
at org.reprap.Main.<init>(Unknown Source)
at org.reprap.Main$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
at java.awt.EventQueue.access$300(EventQueue.java:96)
at java.awt.EventQueue$2.run(EventQueue.java:634)
at java.awt.EventQueue$2.run(EventQueue.java:632)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
julian@julian-HP:~/reprap$
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 09:32:08 AM
There is some stuff at the bottom of this page ...

http://reprap.org/wiki/Installing_RepRap_on_your_computer

That covers using the software with 64 bit Ubuntu (which is what I'm running).  Is that worth a try?


Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 09:55:03 AM
Yes, quite correct. You don't make it easy for yourself!  :o

Try

Code: [Select]
cd ~/reprap/
we'll install the 64 bit version of the necessary Java libraries

Code: [Select]
sudo apt-get install libjava3d-jni
And point the symbolic link (think 'shortcut' in Windows terms) at the new library version

Code: [Select]
ln -sf /usr/lib/jni/libj3dcore-ogl.so
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:02:02 AM
I have assumed that you've installed Java?

Code: [Select]
sudo apt-get install openjdk-7-jre if you haven't
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:03:04 AM
Nothing seem to happen with the first command ...

Code: [Select]
julian@julian-HP:~$ cd ~/reprap/
julian@julian-HP:~/reprap$


Followed the second bit and got this, looks like it didn't do too much, might they have been installed previously?

Code: [Select]
julian@julian-HP:~$ sudo apt-get install libjava3d-jni
[sudo] password for julian:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjava3d-jni is already the newest version.
libjava3d-jni set to manually installed.
The following packages were automatically installed and are no longer required:
  libpcsclite1:i386 libnss3:i386 linux-headers-3.2.0-56
  icedtea-6-jre-cacao:i386 openjdk-6-jre-headless:i386
  icedtea-6-jre-jamvm:i386 linux-headers-3.2.0-56-generic libnspr4:i386
  libxss1 libnss3-1d:i386
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
julian@julian-HP:~$ ln -sf /usr/lib/jni/libj3dcore-ogl.so
julian@julian-HP:~$

Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:06:03 AM
Nothing seem to happen with the first command ...

That's fine. We're moving into the reprap directory.

The second shows it's already installed. What happens if you try the third? And then try running it?
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:06:19 AM
I have (I think)

At one point I found a command to check, something like "java version" which returned stuff saying JDK was installed.

Should I try
Code: [Select]
sudo apt-get install openjdk-7-jre anyway
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:08:00 AM
Nope,

Just this one (to check we're in the right place)

Code: [Select]
cd ~/reprap
Then

Code: [Select]
ln -sf /usr/lib/jni/libj3dcore-ogl.so
And finally

Code: [Select]
./reprap
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:08:53 AM
You did see this from the reprap site:

Quote
and may run on 64-bit Linux but this is untested.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:12:27 AM
Nope,

Just this one (to check we're in the right place)

Code: [Select]
cd ~/reprap
Then

Code: [Select]
ln -sf /usr/lib/jni/libj3dcore-ogl.so

And finally

Code: [Select]
./reprap

Still get the java warnings ...

Code: [Select]
julian@julian-HP:~$ cd ~/reprap
julian@julian-HP:~/reprap$ ln -sf /usr/lib/jni/libj3dcore-ogl.so
julian@julian-HP:~/reprap$ ./reprap
java.lang.UnsatisfiedLinkError: /home/julian/reprap/librxtxSerial.so: /home/julian/reprap/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "RepRap" java.lang.UnsatisfiedLinkError: /home/julian/reprap/librxtxSerial.so: /home/julian/reprap/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:844)
at java.lang.System.loadLibrary(System.java:1051)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at org.reprap.comms.GCodeReaderAndWriter.openSerialConnection(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.init(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.<init>(Unknown Source)
at org.reprap.machines.GCodeRepRap.<init>(Unknown Source)
at org.reprap.machines.MachineFactory.create(Unknown Source)
at org.reprap.Main.<init>(Unknown Source)
at org.reprap.Main$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
at java.awt.EventQueue.access$300(EventQueue.java:96)
at java.awt.EventQueue$2.run(EventQueue.java:634)
at java.awt.EventQueue$2.run(EventQueue.java:632)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
julian@julian-HP:~/reprap$

I did see that, but looking at the age of the file, I'd have thought they would have sorted things by now.  Would 32 bit Linux have been any better?
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:16:45 AM
Would 32 bit Linux have been any better?

Oh so very much!

So the trouble here is incompatibility between the 32 bit version of Java (for which the software is written) and the 64 bit that's running on your machine.

Try this:

Code: [Select]
sudo aptitude install libjava3d-java
sudo aptitude install libjava3d-jni

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxSerial.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/

sudo cp /usr/share/java/vecmath-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
sudo cp /usr/share/java/j3d*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/



Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:19:40 AM
Doesn't seem to like the first command ...

Code: [Select]
julian@julian-HP:~$ sudo aptitude install libjava3d-java
[sudo] password for julian:
sudo: aptitude: command not found
julian@julian-HP:~$

Is it worth trying the others?
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:23:02 AM
Quite right. Serves me right for not reading them properly.

Code: [Select]
sudo apt-get install libjava3d-java
sudo apt-get install libjava3d-jni

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxSerial.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/

sudo cp /usr/share/java/vecmath-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
sudo cp /usr/share/java/j3d*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:26:31 AM
Didn't seem to like the third one either ...

Code: [Select]
julian@julian-HP:~$ sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
cp: cannot create regular file `/usr/lib/jvm/java-6-sun/jre/lib/amd64/': No such file or directory
julian@julian-HP:~$
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 10, 2013, 10:40:04 AM
Well, I'm a little stumped. I'm not familiar enough with Java to sort this.

Where's Tony? He's the real Linux guru...

You might also try asking on the reprap forums. I'm sure someone must have run into this before.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:43:53 AM
I was just typing this when you replied ...

James, I'm conscious of how much of your time this is taking up.  It's been a struggle to get this far with Linux, especially with the wireless card problem, but would it make my life simpler in the long run if I started again with a 32 bit version?

But if you think the Linux side of things is sorted, perhaps some guidance from Tony might help ... any chance of a hand, Tony?

 
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 10:45:58 AM
I have tried searching the forum, but the search doesn't seem to work.  As you say, it must have cropped up before.
Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 10, 2013, 11:31:09 AM
Yes your best bet is to try 32-bit, but not initially by installing 32-bit Linux on your machine.  Get yourself a virtual machine, as per instructions here (assuming you are on Ubuntu 12.04)

http://www.webupd8.org/2012/06/how-to-install-vmware-player-in-ubuntu.html

Then you can try all manner of experimental crazyness on that without worrying about trashing the machine you're using.  If reprap is USB/serial contolled (no idea not looked into it) then this should work fine from the virtual machine anyway.  So for everythign else you can enjoy the benefit of 64-bit but for reprap if it's firmly stuck in 32-bit land, you've got the VM.

I would say that in general most experimental home project Linux stuff is likely to only be well supported on 32-bit distros.  No doubt this will change over the years.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 12:16:10 PM
Thanks James and thanks Tony, I'll give your suggestion a bash later today.  FYI I am on Ubuntu 12.04 and reprap board  is piggy backed on to an Arduino which connects via USB.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 10, 2013, 06:05:46 PM
Hmm, that went well.  Tried to download the software having given them my life story to register, only to get a message saying that I'm unable to download and to contact customer support.  Now waiting for customer support to come back.

Mean time I've done some Googling and have seen a suggestion that to run 32 bit on a 64 bit machine all you need to do is download the 32 bit library (just one command).  That seem a little bit too easy ... does it sound viable to the experts?
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 11, 2013, 12:22:14 AM
Heard back from customer support ... not being too supportive though ....


Hi Julian,

Thank you for contacting VMware Global Support Services.

My name is Vijesh Mithran,and I have been assigned to work on your support request. The Support Request No. is 13414650812.

I understand that when you download product software in your My VMware portal, you are getting the error 'Unable to process your request. Please contact Customer Care'.

I apologize for the inconvenience this has caused you.

We are already aware of this issue, and our VMware Product Engineering team is working on this towards resolving it as soon as possible.

At this time, there is no estimated time for resolution.

Regards,
Vijesh Mithran
VMware Global Support Services

Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 11, 2013, 07:41:24 AM
I would say the library is worth a try - no reason why not if it's supported!
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 11, 2013, 08:27:12 PM
Yeah, 32 bit Java might do the trick.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 11, 2013, 10:02:29 PM
Well, a lot of water under the bridge since the last post, but still no working software!

I tried the 32 bit librarys thing and that didn't work.  The nice man at VMware came back to me both by phone and email (all credit to VMware) to say his downloads were working and I downloaded the package, but installing it looked to be more difficult than perceiving with the 32 vs 64 bit issues.

I went back to the reprap installation instructions ( http://reprap.org/wiki/Installing_RepRap_on_your_computer ) and had another go at them.  I seemed to get a little further but hit a wall with the "gentoo amd64 ... "  instruction.

I was a little confused by exactly what was meant by "cd /path/to/your/host/software".  I used the "su" command which I think put me in the right location and gave me higher level access ... Appreciate some one confirming this please.  (often information on basic stuff isn't readily available on the web ... I did try and look)

Any how this Gentoo seems to be yet another version of Linux (there are so many) and when I run the instruction above I get ...

Code: [Select]
julian@julian-HP:~$ su
Password:
root@julian-HP:/home/julian# gentoo amd64 ...

** (gentoo:2706): WARNING **: The connection is closed
gentoo: To run as root, envoke with the '--root-ok' option
root@julian-HP:/home/julian#

Can't find what '--root-ok' is, searches don't seem to bring up any helpful info (at least none I understand!)

The next command ...

Code: [Select]
emerge sun-java3d-bin
tells me that emerge is not a valid command and makes some suggestions that don't appear relevant.

It would appear that emerge is something special to Gentoo and I'm missing files of directories in, I think it was the bin directoryin which they are located ... I'm still searching.

I know it's an imposition but any assistance in this line of enquiry would be welcomed ... I'm really struggling!
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 12:22:48 AM
Hooray, a small success at last ... I've got the Arduino working.  A small step for mankind, a giant leap for Julian. It's sitting here with a flashing LED and I can change the frequency of the flashes by changing the code on the computer.

Oh, the wonders of technology!
Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 12, 2013, 08:33:12 AM
Yes Gentoo is another linux.  Replace emerge xxx with apt-get install xxx

Ignore the # gentoo line, the # means comment in that case.

Actually their page is very confusing, because in some places they appear to use hash as "type at the command prompt" and sometimes as a comment as the line would appear in a text file.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 11:36:29 AM
No luck I'm afraid ...

Code: [Select]
root@julian-HP:/home/julian# sudo apt-get install librxtx-java
Reading package lists... Done
Building dependency tree       
Reading state information... Done
librxtx-java is already the newest version.
librxtx-java set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
root@julian-HP:/home/julian# ln -sf /usr/lib/librxtxSerial.so .
root@julian-HP:/home/julian# apt-get install rxtx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package rxtx
root@julian-HP:/home/julian#


To my simplistic brain it looks like rxtx is already downloaded (unsurprising as I run the first part of the instructions several times before) but the get-apt install rxtx can't find it.  I'm a little confused with the root@ julian ... #  and the julian@julian ... $ stuff.  Am I performing these operations in the right place?


Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 12:26:54 PM
As far as I can gather rxtx is a way of getting Java to use ports.  I found this page if it's any help ... http://rxtx.qbang.org/wiki/index.php/FAQ

I have this version of  java JDK installed ...

Code: [Select]
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.4)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
julian@julian-HP:~$


Looks like rxtx installation instructions are here ... http://rxtx.qbang.org/wiki/index.php/Installation_on_Linux

A little more complicated that described on the reprap page  should I have a bash at following those?


Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 12, 2013, 05:58:22 PM
I think you're digging yourself into a hole here.

The software is written in Java - so Java must work. Which is difficult on a 64 bit machine for reasons that are beyond me (true of Windows installations also).

I suggest you try this:  http://reprap.org/wiki/Portable_USB_Ubuntu_RepRap_Host (http://reprap.org/wiki/Portable_USB_Ubuntu_RepRap_Host)
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 07:00:24 PM
I think you're digging yourself into a hole here.

The software is written in Java - so Java must work. Which is difficult on a 64 bit machine for reasons that are beyond me (true of Windows installations also).

I suggest you try this:  http://reprap.org/wiki/Portable_USB_Ubuntu_RepRap_Host (http://reprap.org/wiki/Portable_USB_Ubuntu_RepRap_Host)

Good find with that page, I've done a lot of searching but missed that.  I'd sort of had a similar idea.  I have an old Toshiba lap top, knackered battery, so has to run off the mains.  It runs XP very slowly, so  I was thinking of wiping that, installing a 32 bit Linux version and having it as a dedicated machine for the printer.  The printer will always need power so no big shakes if the laptop does too.

Is this a viable route to take?
If so, what flavour of Linux and what version is most likely to be best suited?

Any 3D design work could be done on a faster machine and transferred to the Reprap software on the Tosh. as an STL file (whatever that is).

Having done much surfing today, only a few people seem to have cracked this 64/32 bit issue for reprap. 

PS  I've been merrily excavating large holes since this stuff arrived in the post!
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 07:29:13 PM
Also, I guess, what version of Java should be installed if it makes a difference.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 12, 2013, 08:07:17 PM
This is my favourite flavour:

http://www.linuxmint.com/download.php (http://www.linuxmint.com/download.php)

Any version of Java should be fine. Again, my default flavour is Oracle. But then I haven't tried anything else for ages.
Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 12, 2013, 08:29:13 PM
Mint is my favourite flavour too, based on Ubuntu so full of apt-get lovelyness.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 12, 2013, 08:36:41 PM
I remember you saying that when I was looking at dual booting this machine.  Aesthetically (that’s' about as technical as I get) I think it looks great, but I went with Ubuntu because it seemed the most commonly used and best supported (not in this case though!)

I'll give Mint a try then, assuming what applies to Ubuntu applys to Mint too, I just haven’t seen Mint mentioned on any of the reprap pages.

It looks like reprap was put together concurrent with Java 5 so that might be the best starting point, similarly with the flavour of Linux, I should, perhaps choose a build of a similar age.

The Toshiba is a 1.5GHz, 128MB SDRAM, with a 20GB hard drive.

Do you think I'll have a fighting chance with that set up?
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 13, 2013, 06:29:07 AM
That should be OK.

I think the XFCE desktop is the lightest.

Underneath, Mint and Ubuntu are the same - so all of the commands are identical.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 13, 2013, 11:47:57 AM
Was up till 3:30 am this morning playing.

Looks like the old lap top is a no go.  It won't boot from a pen drive. Having managed to fit Mint 12 on a CD, although you can tell it to boot from a CD both on a splash screen and in the BIOS (I think it's the BIOS), it refuses to do so.

I tried booting it off the CD whilst running Windows and this looked promising, with a couple of options to choose, but neither of those worked, just got some warning of not enough windows "back something" which I think Googled as not enough memory.

I tried copying the CD to the hard drive and running it that way ... same problem.  So gave up on the Tosh/Linux combo.

AS the Tosh was 32 bit I thought I'd try the windows version (which is actually the same file)  Unzip it and run a .bat file according to the instructions.  This resulted in another DOS type screen listing various problems (can't remember the content ... as by this time the brain was completely fuddled).  At this point I ruled out the Tosh altogether.

Went back to the new laptop and tried the windows install on that ... same DOS screen.  At this point the logburner was running low and I seriously considered feedig it both laptops.

Considering what a clever bit if software this must be, taking a 3D file, splitting it into layers, giving the edges a specified thickness and creating a %age fill for the solid parts, working out how much plastic will be used and most probably a whole lot more, then compiling the result in a format to feed to the Ardwino t drive 3 axises an an extruder, it beggars belief that so little attention has been paid to getting the bloody thing to run!  Shame 'cos I had high hopes for the dedicated Tosh idea.

Very late at this point, but I found a thread which, at one point, someone said reprap was out of date and replaced by something called printrun, yet later in the same thread, people were offering assistance with reprap again.  All most confusing.

So, I'm going to investigate print run and seriously consider removing Ubuntu and putting a 32 bit Mint on the new laptop.  The saga continues!

Very much appreciate all the help offered to date.  I know it's an imposition, but any further ideas would be welcome.



Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 13, 2013, 01:00:42 PM
If it helps I use Mint 15 full time on my laptop and don't miss Windows a jot.  It's the first Linux desktop that I've ever been happy to stick with.

Plus if you forward the ssh port on your router to it, it's possible for one of us to ssh in remotely and have a tinker to see if we can make any headway.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 13, 2013, 01:26:07 PM
With the exception of the farce over the last week or so, I've been far happier doing everyday stuff with linux, using it is like windows of years ago, where as now it windows tries take over and organise your life.  My windows 8 seems to crawl it's way through half a dozen upgrades every other time it's turned on ... it's just pants compared to Linux in my humble opinion.

Yes, very happy to ssh port (what ever that is ... assume give you access to my PC), if either or both of you don't mind spending a bit of time on this.  I'll either have to do some googling on how to do it or rely on you for instruction.

This morning I have been mainly .... looking at the java side of the new laptop.  It would appear that I have two versions installed 6 and 7, which I understand isn't a good thing.  I appear to be running on 6, which isn't a good thing according to the reprap installation page, and the Java 3D side of things (required for reprap), isn't working.  There are pages you can visit which test if it's running by displaying a spinning cube ... and mine isn't  spinning.

I'll have a look at ssh.
Title: Re: Off topic ... Some help with Linux please
Post by: Tony on December 13, 2013, 01:36:51 PM
I have a feeling that Mint has some kind of "get help" thing built in which might allow remote desktop type access which may be easier.  I'll have a read up about it tonight.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 13, 2013, 02:08:18 PM
I should add that the Java line of enquiry was based on James's remark that he thought Java was the (a) problem, not through any knowledge on my part.

Thanks, Tony.  Isn't it a bit like remote desk top?  When I had a proper job I could set things up so I could drive my work PC when I was at home ... very useful.

If this ssh works, provided the windows area of this machine remains intact, I very happy for you to trash the whole Linux portion and start again, if that's what it takes.  Could be an advantage as I’ve been getting the odd warning that the system isn't running properly ... unsurprising after my amateurish bumblings.

Unfortunately I have to go out tonight ... meeting my daughters future in laws for the first time, so can’t get out of it. 
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 13, 2013, 02:25:16 PM
In dash on this machine I have a shared desktop facility, which allows either viewing or use.  Looks quite easy to set up, but then so did reprap!

Only bit that looks involved is UPnP stuff on the router, so I'll have a route around in the router and try and learn a little bit about that.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 13, 2013, 04:25:02 PM

Unfortunately I have to go out tonight ... meeting my daughters future in laws for the first time, so can’t get out of it.

Stat that, there seems to be a problem with the restaurant booking, I may be about after all.  If you want to try tonight, just post or PM, if I'm around, I'll respond.
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 14, 2013, 08:26:16 PM
Still battling with this, trying to sort out the Java.  I've removed all the Java files and reinstalled Java 7 via an install in the software centre.  Java 3D isn't available via the software centre so I found some instructions to install it.

They include the command  cd /usr/java/jdk1.6.0_01/jre   but the usr/java directory is empty, I assume the down load via the software centre must have put it elsewhere.  if I remove Java again could one of the intrepid Linux users talk me through getting java into the usr/java directory please?
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 15, 2013, 12:14:55 PM
Java 3D isn't available via the software centre so I found some instructions to install it.

Could you point me in the direction of these instructions?
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 15, 2013, 02:01:40 PM
Java 3D isn't available via the software centre so I found some instructions to install it.

Could you point me in the direction of these instructions?

The ones on the orical site appear to be a broken link, so I've been using these ... http://download.java.net/media/java3d/builds/release/1.5.1/README-download.html

I don't think even Java 7 is installing properly/in the right place, as the orical page where you can test it returns no results.  Currently back on the old Tosh. laptop in XP, giving that another go.  The Orical page which removes old versions of java tells me java is no installed on the Tosh.  When I try to load the latest version I get a warning that it's loaded with a corrupt file, so I'm trying to load an older version just to be able to purge the Tosh. of all existing java.

I've removed viruses quicker and easer than this in the past.  I'm sure the problem is me, but this is completely doing my head in ATM.  Really appreciate any assistance you can offer!

I'm happy to set up a VPN if you think it will make it any easer to assist.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 15, 2013, 03:48:29 PM
Well, Java 3D is meant to run under the JDK (Java Development Kit) so you need to download and install that first. That'll give you the directory required above.

Then, download the Java 3D package, move it to the directory mentioned and run it.

There is no mention of needing Java 3D on the rep rap page - just the JRE (Java Runtime Environment). The JDK is pretty heavy duty!

I'm happy to have a go.

Do this:
Code: [Select]
sudo apt-get install openssh-server
Then check it works:

Code: [Select]
ssh your-username@127.0.0.1
Should present you with a login screen. Close the window - no need to log in.

Then you need to allow port 22 through on your router. You'll need to log in to the configuration webpage and look for port forwarding or something similar. You want to forward port 22 from the WAN/internet to the IP of your computer (type ifconfig at the command line if you don't know what it is) I can't be more specific than than I'm afraid!

I'll need a root username and password. Probs best sent by PM ;)
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 15, 2013, 04:23:54 PM
No new screen I'm afraid, I get this ...
Code: [Select]
julian@julian-HP:~$ ssh your-username@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is 9a:d9:94:c4:3a:d7:8b:25:56:2d:53:d5:21:2e:47:2a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
your-username@127.0.0.1's password:
Permission denied, please try again.
your-username@127.0.0.1's password:
Permission denied, please try again.
your-username@127.0.0.1's password:

Mean time I'll go and try and do the port 22 stuff on the router.

I thought as part of the install on Linux java 3d was required, but then I've tried so many different things my brain's totally fried!

I'll pm the PW and UN now.
Title: Re: Off topic ... Some help with Linux please
Post by: therecklessengineer on December 15, 2013, 04:28:52 PM
by your-username I meant replace it with your username. ;)

But it still attempted to connect and got a response, so it's working.

When you've got the router set up right PM me your IP address - easily got by googling "whats my IP"
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 15, 2013, 04:42:30 PM
Can't quickly find where to allow port 22, but I have got allow remote access, which I've enabled ...

URL: https://91.125.148.238:57269
 
Username: tech
 
 
Password: ********  ... same as Linux password.


Any good?
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 15, 2013, 04:44:17 PM
Sorry, I see what you mean about the user name ... gives you some idea of the level of intelligence with which you're dealing!
Title: Re: Off topic ... Some help with Linux please
Post by: Julian on December 15, 2013, 05:10:45 PM
Are you on skype?