Skip to main content

Craftware 1.17 on Arch Linux -- notes

Craftware a slicer for 3d printers is available for linux here.  It looks pretty good, and is supposedly multi threaded with support for hardware acceleration.

I can only find it  as a deb file, and there's nothing in the AUR for it.

I tried a few of the common methods for installing debs:


While it was able to create a package, upon installing it I got this error

loading packages... error: failed to prepare transaction (package architecture is not valid) :: package craftware-1.17.1-1-i686 does not have a valid architecture

So.. No good.

I tried just extracting the package content, and running the binary:

./craftware: error while loading shared libraries: libomp.so: cannot open shared object file: No such file or directory

and yes, it is installed.

$ ldconfig -v
         libomptarget.so -> libomptarget.so
         libomp.so -> libomp.so
         libzita-alsa-pcmi.so.0 -> libzita-alsa-pcmi.so.0.2.0

There is one thing that I haven't tried but that's because it just seems like a bad idea... That would be to add configuration to /etc/ld.so.conf.d/ to have the full library folder that comes with craftware available system wide.  Something to try in a vm or a container maybe...

I'm going to try to get a LXC / LXD container system setup on my machine for this:
  1. https://wiki.archlinux.org/index.php/Linux_Containers
    1. Setting  sysctl kernel.unprivileged_userns_clone=1
    2. Complete until step Host network configuration
  2. https://wiki.archlinux.org/index.php/LXD
  3. reboot
  4. https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/
    1. lxc exec --env DISPLAY=$DISPLAY guiapps -- sudo --login --user ubuntu
Failure: 


$ xclock

No protocol specified

Error: Can't open display: :0


(host) $ xhost +

(guest) $ xclock


 Success, but no glxgears yet.

Attempt to install nvida drivers in guest

$ sudo apt-get install nvidia-current

Failure...

Install latest drivers:
http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux

Failure... ....

Testing this out again on an intel graphics system this seems to work OK.  glxgears displays and glxinfo gives me correct information.

Something to try might be with a privileged container, IE create the container as in the step 4 link with -c security.privileged=true appended.  Other test might be to use alternate versions of Ubuntu/nvidia driver...

So Privlidged on Xenial dosn't work... Lets try a new container with bionic?

(guest) $ dmesg
...
[ 1056.949255] NVRM: API mismatch: the client has the version 396.24.02, but
[ 1056.949255] NVRM: this kernel module has the version 396.24.  Please
...

so it looks like there may be a version mismatch between Arch and Ubuntu.... well this ought to be fun...


So until I can get the host and guest on the same version of the ubuntu driver, I'm at an impass.  It looks like nvidia has a new driver released (396.24) so I'll wait for that to hit Ubuntu/Arch before I continue.

A quick note on the xhost issue.

So running xhost + is bad.  It give unauthenticated access to your x server from anywhere on the network.  Slightly better would be xhost local:  This command restricts access to just localhost processes, but still allows all localhost processes to connect to X, so not ideal.

the right way to do things is with the .Xauthority file, and the instructions in simos blog go over a basic setup and it's just supposed to work.  In my case it didin't, but I found the problem:

So in my case

(host|guest)$ xauth list
Host/unix:0  MIT-MAGIC-COOKIE-1  HostHexKey...

So as far as I can tell, because the .Xauthority file includes the hostname when it is passed to the guest and the guest tries to use the authentication it's rejected due to a hostname mismatch.

I was able to fix this with the following:

(guest)$ export XAUTHORITY=/home/ubuntu/.Xauthority-n
(guest)$ xauth add $DISPLAY . HostHexKey...

Now we can see that we have the same Key, but with the correct hostname:

(guest)$ xauth list
Guest/unix:0  MIT-MAGIC-COOKIE-1  HostHexKey...

and the command

(guest)$ xclock

works as expected.


Comments

  1. Caesars Palace: Caesars Palace's new casino, and a top-brand
    Caesars Palace is one of the world's top-brand 평택 출장마사지 casino resorts, with a full roster 충청남도 출장샵 of 인천광역 출장샵 exciting 대전광역 출장마사지 slot 통영 출장샵 machines, table games, video poker and a

    ReplyDelete

Post a Comment

Popular posts from this blog

8Bitdo NES 30 Pro on linux

This post will go over the setup I had to do to get my   8Bitdo  NES30 Pro controller working on my Arch linux desktop with steam.  This results in the system loading the xboxdrv automatically when the controller is connected, and unloading once finished. Firmware Update The first thing to tackle was the firmware update on the controller,  This may not be needed, but I like to keep my devices up to date. After some googling, I was able to find a program called fwupd  that's able to update the controller via a USB connection.  It's available for Arch in the community repo. The basic syntax of the command is: fwupdmgr get-devices fwupdmgr refresh fwupdmgr get-updatessudo fwupdmgr update The controller will need to be put into 'Firmware update mode'.  Be aware that the final command will also update all eligible firmware on your system, so If you don't want that, please dig into the documentation Bluetooth Connection Getting the controller co

Dropbox Nov 2018 workaround

So Dropbox is no longer supporting anything besides ext4 on linux as of Nov 7th 2018.  Here's how to work around that WITHOUT superuser permissions. First, create a sparse file of whatever size you'd like for your Dropbox folder. $ truncate -s 5G ~/.Dropbox.img Now we need to format this as ext4, But we want to make sure that we own the created file system, not the default of root. $ mkfs.ext4 -E root_owner=$(id -u $USER):$(id -g $USER) ~/.Dropbox.img Setup the loopback device with our EXT4 image $ udisksctl loop-setup -f ~/.Dropbox.img You may need to mount the device if it hasn't been already: $ udisksctl mount -b $CREATED_LOOP_DEVICE Check where our filesystem is mounted: $ mount | grep Dropbox.img Move any existing data from the previous dropbox folder to the new location: $ mv ~/Dropbox/{.,}* /$MOUNTPOINT/OF/DROPBOX/IMAGE/UUID$ Link our new folder back to the dropbox folder $ ln -s  /$MOUNTPOINT/OF/DROPBOX/IMAGE/UUID$/ ~/Dropbox You can now star