Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Trouble installing LeoCAD program packs.

  1. #1
    Join Date
    Oct 2019
    Beans
    95

    Trouble installing LeoCAD program packs.

    Im trying to add additional brick parts for LeoCAD a building program. But i'm running into issue. the following sudo command below isn't working and can't create the necessary folder for dumping sipped parts files

    https://github.com/leozide/leocad/issues/239

    here is the intended command
    sudo mkdir /usr/share/leocad/library.bin
    but i receive a conflict error saying mkdir: cannot create directory ‘/usr/share/leocad/library.bin’: No such file or directory and yet there is a usr directory as seen here how do i get around this ?


    UPDATE


    Quote Originally Posted by Holger_Gehrke View Post
    Actually it isn't necessary to put anything in /usr/share/leocad because leocad has an option in the menu "View"->"Preferences"->tab "General"->field "Custom parts library" which allows you to set the directory where the program looks for parts. And 'library.bin' isn't supposed to be a directory, it's a file that contains the compressed official library. The person who packaged the program for Ubuntu opted for not including that file. Instead there's a separate package 'ldraw-parts' that installs uncompressed parts into '/usr/share/ldraw' which seems to be the second default location for leocad to search. Since there are other programs that can use these in this form while only leocad can use them compressed that choice makes sense. The library in the repositories seems to be about a year older than the current one on ldraw.org and has about 9500 parts compared to about 11800 for the newest official one.
    Quote Originally Posted by Holger_Gehrke View Post

    There's one small problem, though. Either the packager decided to compile leocad without support for archives or the version in the repositories is from before leocad gained that ability. So the easiest way to have a current library seems to be to download the library/ies from ldraw.org, unpack it/them into a directory in your home directory and point the option at that.

    Holger


    I just did this and it works under view>preferences>general>downloads>ldrawunf as custom folder but after i did this all of the other regular parts disappeared and only way to get them back is to point the custom parts seacrh at a alternate path like view>preferences>general>pictures and restart the program so i can see them. I really want to avoid this collision problem.
    Attached Images Attached Images
    Last edited by nocruoro; December 14th, 2019 at 12:06 PM.

  2. #2
    Join Date
    Dec 2014
    Beans
    2,590

    Re: Problem creating folder path for LeoCAD program

    The directory your screenshot shows is '/usr/share/doc/leocad'. That is different from '/usr/share/leocad/', isn't it ? The command 'mkdir' has an option '-p' or '--parents' for situations where you need to create a path of directories; 'sudo mkdir -p /usr/share/leocad/library.bin' will create the directory '/usr/share/leocad/' if it doesn't exist and the directory 'library.bin' inside that. Or you could run 'sudo mkdir /usr/share/leocad' and then 'sudo mkdir /usr/share/leocad/library.bin'

    Holger

  3. #3
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    Seeems to have worked, i'll send a further update later if it was succesful. Learning on ubuntu and sudo commands is hard work for me.
    Attached Images Attached Images

  4. #4
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    New problem. my computer wont let me move or copy the zip file into the new library folder. How do i get around this? Is there a sudo user command that can move the file (and enable such permissions by default with the mouse for future use?)

    currently the zip file is in the default downloads folder

    edit: plz help me?
    Last edited by nocruoro; November 13th, 2019 at 02:28 PM.

  5. #5
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    hello?

  6. #6
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    BUMP My problem is still not solved and haven't found reliable help on google. plz help me.

    The intention is: move file from documents from download folder to a library fold in a usr share folder but both....
    ctrl+c or right click and paste are both not working. what is the intended terminal command code for getting it through this restriction
    Last edited by nocruoro; November 14th, 2019 at 03:45 PM.

  7. #7
    Join Date
    May 2008
    Beans
    3,984
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Problem creating folder path for LeoCAD program

    If you want to move a file from your Downloads folder to a destination within /usr/share, you have to use admin rights with sudo.

    For example, if you want to move a theme from Downloads to /usr/share/themes

    Code:
    cd Downloads
    Code:
    sudo mv mytheme /usr/share/themes
    Substitute mytheme with the name of your file/folder

    Substiute themes for the destination you need within /usr/share

    Good luck

  8. #8
    Join Date
    Dec 2014
    Beans
    2,590

    Re: Problem creating folder path for LeoCAD program

    Actually it isn't necessary to put anything in /usr/share/leocad because leocad has an option in the menu "View"->"Preferences"->tab "General"->field "Custom parts library" which allows you to set the directory where the program looks for parts. And 'library.bin' isn't supposed to be a directory, it's a file that contains the compressed official library. The person who packaged the program for Ubuntu opted for not including that file. Instead there's a separate package 'ldraw-parts' that installs uncompressed parts into '/usr/share/ldraw' which seems to be the second default location for leocad to search. Since there are other programs that can use these in this form while only leocad can use them compressed that choice makes sense. The library in the repositories seems to be about a year older than the current one on ldraw.org and has about 9500 parts compared to about 11800 for the newest official one.

    There's one small problem, though. Either the packager decided to compile leocad without support for archives or the version in the repositories is from before leocad gained that ability. So the easiest way to have a current library seems to be to download the library/ies from ldraw.org, unpack it/them into a directory in your home directory and point the option at that.

    And if you should ever get into the situation where you really need to put a file somewhere outside of $HOME, there are several ways to do that. 'sudo' stands for 'switch user and do' and unless you tell sudo to switch to a specific user (with 'sudo -u username command') it will switch to root (the administrative user account that's basically allowed to do everything). So 'sudo' can be used with basically any command, 'cp source[s] target' for copying, 'mv source[s] target' for moving or anything else. Using sudo with graphical tools is generally considered to be a bad idea; graphical programs often create files in the home directory for their settings; if you run them with sudo then these files are owned by root and you can get into situations where all of a sudden you can't change options in the program. Using the '-H' option of 'sudo' tells sudo to use the home directory of the user it switches to and not the home of the actual user and is somewhat safer. There's also pkexec (policy kit execute), which can also be used to run programs with higher privileges. But the IMHO easiest way is to use the 'admin://' scheme in the file manager. How you do that depends on the file manager you use; not every file manager gives you a constantly visible address bar into which you could enter something like 'admin:///usr/share/leocad' (no, the three '/' are not a typo, two of them are part of the scheme notation and the third is part of an absolute path) ; Thunar on XUbuntu - which I am using - does; Nautilus - the file manager of main line Ubuntu - doesn't, but I think you can get a location field by hitting ctrl-L. After entering an URI with an 'admin://' scheme, you will be asked for your password. After entering it you can drag and drop files from another window into the one where the admin scheme is active.

    Holger

  9. #9
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    Quote Originally Posted by Holger_Gehrke View Post
    Actually it isn't necessary to put anything in /usr/share/leocad because leocad has an option in the menu "View"->"Preferences"->tab "General"->field "Custom parts library" which allows you to set the directory where the program looks for parts. And 'library.bin' isn't supposed to be a directory, it's a file that contains the compressed official library. The person who packaged the program for Ubuntu opted for not including that file. Instead there's a separate package 'ldraw-parts' that installs uncompressed parts into '/usr/share/ldraw' which seems to be the second default location for leocad to search. Since there are other programs that can use these in this form while only leocad can use them compressed that choice makes sense. The library in the repositories seems to be about a year older than the current one on ldraw.org and has about 9500 parts compared to about 11800 for the newest official one.

    There's one small problem, though. Either the packager decided to compile leocad without support for archives or the version in the repositories is from before leocad gained that ability. So the easiest way to have a current library seems to be to download the library/ies from ldraw.org, unpack it/them into a directory in your home directory and point the option at that.

    Holger
    I just did this and it works under view>preferences>general>downloads>ldrawunf as custom folder but after i did this all of the other regular parts disappeared and only way to get them back is to point the custom parts seacrh at a alternate path like view>preferences>general>pictures and restart the program so i can see them. I really want to avoid this collision problem.
    I am from Iceland.

  10. #10
    Join Date
    Oct 2019
    Beans
    95

    Re: Problem creating folder path for LeoCAD program

    bump
    I am from Iceland.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •