Installing when /opt is mapped to a network share?

Discussion forum for the Picoscope 6 Linux software
Post Reply
mprowe
Newbie
Posts: 0
Joined: Sun Jul 06, 2014 7:55 pm

Installing when /opt is mapped to a network share?

Post by mprowe »

Hi Linux users,

I really am very glad that pico are releasing this software under Linux, however, I have a small problem I'm hoping that someone can solve for me?

I am using SUSE 13.1 64bit and my /opt directory is linked to an NFS share. When I try an run the install, I get:

Code: Select all

Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /opt/picoscope/include/libps5000-1.5: cpio: chown failed - Operation not permitted
error: libps5000-1.5.1-3r02.x86_64: install failed
However, If I test the install on a "clean" machine (/opt is on the local file system), I have no problems.

Two routes seem open to me:
1. Change the install location. Unfortunately, my Linux skills don't extend to unpacking the RPM and editing the scripts.
2. Solve the copy/change ownership issue. Once again, I am stymied by the above skills limitations!!

Best regards, Martin

mario_
Site Admin
Site Admin
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm

Re: Installing when /opt is mapped to a network share?

Post by mario_ »

Hi Martin,

The workaround I propose is to make a mount with bind to another folder. Assuming you have root permission (enter via sudo su), run the following:

1. Create folder where you want to keep picoscope files, ie /usr/local/picoscope

Code: Select all

mkdir -p /usr/local/picoscope
2. Create mount point in your NFS share (if you don't have permission to do that - ask NFS admin if this is possible, if not... we'll try something else ;) )

Code: Select all

mkdir /opt/picoscope
3. Bind your local to remote location folder. This way all calls to remote location /opt/picoscope will be passed on to local folder:

Code: Select all

mount --bind /usr/local/picoscope /opt/picoscope
4. Install picoscope as you would normally do...

5. If step 4. worked, make the bind to be made on system start. To do that, edit file /etc/fstab and add following line at the bottom:

Code: Select all

/usr/local/picoscope    /opt/picoscope          none    bind            0 0

Mario

mprowe
Newbie
Posts: 0
Joined: Sun Jul 06, 2014 7:55 pm

Re: Installing when /opt is mapped to a network share?

Post by mprowe »

System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable) Parameter name: Display at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in :0 at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in :0 at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in :0 at System.Windows.Forms.XplatUI..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.Control..ctor () [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor () at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Control..ctor () [0x00000] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x00000] in :0 at System.Windows.Forms.UserControl..ctor () [0x00000] in :0 at fN..ctor () [0x00000] in :0 at (wrapper remoting-invoke-with-check) fN:.ctor () at cD.a () [0x00000] in :0 at ax.a () [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable) Parameter name: Display at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in :0 at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in :0 at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in :0 at System.Windows.Forms.XplatUI..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.Control..ctor () [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor () at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Control..ctor () [0x00000] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x00000] in :0 at System.Windows.Forms.UserControl..ctor () [0x00000] in :0 at fN..ctor () [0x00000] in :0 at (wrapper remoting-invoke-with-check) fN:.ctor () at cD.a () [0x00000] in :0 at ax.a () [0x00000] in :0 mprowe@gzunder:~>
This doesn't look good?
Reading the first few lines I note reference to X-Server and the environment variable "$DISPLAY".
Checking this out before mailing you, I see:

Code: Select all

gzunder:~ # X -version

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.14.3.901 (1.14.4 RC 1)
Release Date: 2013-10-26
X Protocol Version 11, Revision 0
Build Operating System: openSUSE SUSE LINUX
Current Operating System: Linux gzunder 3.11.10-17-desktop #1 SMP PREEMPT Mon Jun 16 15:28:13 UTC 2014 (fba7c1f) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.11.10-17-desktop root=UUID=fc65b592-4b18-42f5-af86-28af4c8d081f splash=verbose showopts i8042.nopnp
Build Date: 17 April 2014  05:37:34AM
 
Current version of pixman: 0.30.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
gzunder:~ # 
By the way, the above information is identical (ignoring UUIDs node names) to my working testbed.

Code: Select all

gzunder:~ # echo "$DISPLAY"
:0
gzunder:~ # 
I hope that you will be able to suggest further test and possible solutions?

Best regards, Martin
-->
Hi Mario,

Thank you for the advice on how to install Picoscope - it worked a treat. However....

I now have the next problem. It won't run. From your collogue, Hitesh, I got the advice to run the following tests.

1. USBTEST. Results below:

Code: Select all

mprowe@gzunder:~> /opt/picoscope/share/doc/libps3000a/usbtest

****************************************************************************
*                  Pico Technology Linux USB Diagnostics                   *
****************************************************************************

This script looks for Pico USB devices connected to your computer
and checks whether you are able to access them. If your user account
does not have permission to access the devices, the script will try
to suggest how to correct this for your particular Linux installation.

Press enter to continue...

Getting user and group information...
 - You are running this script as mprowe.                                                                                                            
 - You are in the following groups:                                                                                                                  
     users sys lp pico vboxusers                                                                                                                     

Please connect your Pico USB device and press enter to continue...

Pico USB device found: /dev/bus/usb/002/007

 - It belongs to root (which is not you) who has permissions rw-
 - The members of group pico (which you are in) have permissions rw-
 - Everyone else has permissions r--
 - You can write to this device and so will be able to use it.
mprowe@gzunder:~>
2. Run Picoscope as root. Results below:

Code: Select all

mprowe@gzunder:~> sudo picoscope
root's password:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in :0 
  at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in :0 
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in :0 
  at System.Windows.Forms.XplatUI..cctor () [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0 
  at System.Windows.Forms.Control..ctor () [0x00000] in :0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in :0 
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in :0 
  at System.Windows.Forms.UserControl..ctor () [0x00000] in :0 
  at fN..ctor () [0x00000] in :0 
  at (wrapper remoting-invoke-with-check) fN:.ctor ()
  at cD.a () [0x00000] in :0 
  at ax.a () [0x00000] in :0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.ArgumentNullException: Could not open display (X-Server required. Check you DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in :0 
  at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in :0 
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in :0 
  at System.Windows.Forms.XplatUI..cctor () [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in :0 
  at System.Windows.Forms.Control..ctor () [0x00000] in :0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in :0 
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in :0 
  at System.Windows.Forms.UserControl..ctor () [0x00000] in :0 
  at fN..ctor () [0x00000] in :0 
  at (wrapper remoting-invoke-with-check) fN:.ctor ()
  at cD.a () [0x00000] in :0 
  at ax.a () [0x00000] in :0 
mprowe@gzunder:~> 
This doesn't look good?
Reading the first few lines I note reference to X-Server and the environment variable "$DISPLAY".
Checking this out before mailing you, I see:

Code: Select all

gzunder:~ # X -version

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.14.3.901 (1.14.4 RC 1)
Release Date: 2013-10-26
X Protocol Version 11, Revision 0
Build Operating System: openSUSE SUSE LINUX
Current Operating System: Linux gzunder 3.11.10-17-desktop #1 SMP PREEMPT Mon Jun 16 15:28:13 UTC 2014 (fba7c1f) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.11.10-17-desktop root=UUID=fc65b592-4b18-42f5-af86-28af4c8d081f splash=verbose showopts i8042.nopnp
Build Date: 17 April 2014  05:37:34AM
 
Current version of pixman: 0.30.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
gzunder:~ # 
By the way, the above information is identical (ignoring UUIDs node names) to my working testbed.

Code: Select all

gzunder:~ # echo "$DISPLAY"
:0
gzunder:~ # 
I hope that you will be able to suggest further test and possible solutions?

Best regards, Martin