Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: how to install a script

  1. #1
    Join Date
    Jun 2008
    Location
    Across The Pond
    Beans
    954
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    how to install a script

    I need to add this script to Scribus, however, I have never worked with scripts before. It seems as though it ought to be a simple matter of copying, pasting, and saving to /usr/share/scribus/scripts, but I notice all the files there are .py or .pyc files. I shouldn't think I would need a full blown course in Python to add someone else's script, but before I do something stupid, would someone please tell me how to do this?
    "Everybody is ignorant, only on different subjects." Will Rogers

  2. #2
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,209
    Distro
    Ubuntu Budgie Development Release

    Re: how to install a script

    I'm not familiar with Scribus , but the scripts I have used required making the text file executable from the the text file's proprieties. Right Click > Properties > Permissions > Execute.
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

  3. #3
    Join Date
    Jun 2008
    Location
    Across The Pond
    Beans
    954
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: how to install a script

    Quote Originally Posted by Frogs Hair View Post
    I'm not familiar with Scribus , but the scripts I have used required making the text file executable from the the text file's proprieties. Right Click > Properties > Permissions > Execute.
    Thanks Frogs Hair. Putting your reply into my own words, I copy and paste the script to a text file (and save as a ? file), then make the file executable. I'll see what happens

    UPDATE: I can't save it to /usr/share/scribus/scripts. I get

    Code:
    Can't open file to write.
    Nor is there an option to execute in permissions.
    Last edited by Buntu Bunny; November 23rd, 2013 at 04:57 PM.
    "Everybody is ignorant, only on different subjects." Will Rogers

  4. #4
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,209
    Distro
    Ubuntu Budgie Development Release

    Re: how to install a script

    Use gedit to create the text file.
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

  5. #5
    Join Date
    Aug 2013
    Location
    Colorado, US
    Beans
    220
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    Re: how to install a script

    You can also make it executable in the terminal by
    Code:
    chmod u+x scriptname
    As I am a big fan of GUI tools since more of them become available with each release of Ubuntu and other Linux distro's I also believe learning things through the command line are equally important especially when dealing with scripting. With the chmod command that is basically how you set something to executable, but maybe through your time of scripting especially if you ever are the admin of something you will have to set the permission for the user, group and other as well which will require some knowledge of using the terminal

    Information about User groups and permissions with information on using chmod:
    https://help.ubuntu.com/community/FilePermissions

    Tutorial for using chmod:
    http://catcode.com/teachmod/

    Have fun
    We all know Linux is great... it does infinite loops in 5 seconds.
    - Linus Torvald

  6. #6
    Join Date
    Jun 2008
    Location
    Across The Pond
    Beans
    954
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: how to install a script

    Frogs Hair, that was a step forward, but apparently I have to do this as root because I don't have permission to write the file to /usr/share/scribus/scripts.

    Quote Originally Posted by grier-devon View Post
    You can also make it executable in the terminal by
    Code:
    chmod u+x scriptname
    As I am a big fan of GUI tools since more of them become available with each release of Ubuntu and other Linux distro's I also believe learning things through the command line are equally important especially when dealing with scripting. With the chmod command that is basically how you set something to executable, but maybe through your time of scripting especially if you ever are the admin of something you will have to set the permission for the user, group and other as well which will require some knowledge of using the terminal

    Information about User groups and permissions with information on using chmod:
    https://help.ubuntu.com/community/FilePermissions

    Tutorial for using chmod:
    http://catcode.com/teachmod/

    Have fun
    grier-devon, a huge +1 to learning the command line. Even making it executable, I'll still have to get it to the correct directory, which brings me back to root.

    I can see that I have my learning work cut out for me.
    "Everybody is ignorant, only on different subjects." Will Rogers

  7. #7
    Join Date
    Aug 2013
    Location
    Colorado, US
    Beans
    220
    Distro
    Ubuntu Mate 18.04 Bionic Beaver

    Re: how to install a script

    Quote Originally Posted by Buntu Bunny View Post
    Frogs Hair, that was a step forward, but apparently I have to do this as root because I don't have permission to write the file to /usr/share/scribus/scripts.



    grier-devon, a huge +1 to learning the command line. Even making it executable, I'll still have to get it to the correct directory, which brings me back to root.

    I can see that I have my learning work cut out for me.
    Are you using "cp" to copy? Yet again if the system is requiring root privileges using the command line has it's added benefits. I am sure there is a way to have admin privileges in the GUI but that is something I am unsure of, here is the man page for using "cp". If you try "cp" and it says you do not have the privileges throw a "sudo" infront of the command to be prompted for your password to give yourself privileges. If you are having a hard time with cp let us know and we will help you.
    We all know Linux is great... it does infinite loops in 5 seconds.
    - Linus Torvald

  8. #8
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,209
    Distro
    Ubuntu Budgie Development Release

    Re: how to install a script

    As with everything in the file system have elevated privileges are required to make changes. The chmod commands are useful as well if you want to use the terminal and if not use the following
    Code:
    gksudo nautilus
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

  9. #9
    Join Date
    Jun 2008
    Location
    Across The Pond
    Beans
    954
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: how to install a script

    Quote Originally Posted by grier-devon View Post
    ... <snip> ... If you are having a hard time with cp let us know and we will help you.
    I will do that. I have to get to work now, but will come back to this later.

    Quote Originally Posted by Frogs Hair View Post
    As with everything in the file system have elevated privileges are required to make changes. The chmod commands are useful as well if you want to use the terminal and if not use the following
    Code:
    gksudo nautilus
    Rather, for me, thunar(?)
    "Everybody is ignorant, only on different subjects." Will Rogers

  10. #10
    Join Date
    Jun 2008
    Location
    Across The Pond
    Beans
    954
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: how to install a script

    Follow-up: I finally got this conquered. For anyone else looking for similar information, Scribus has a scripter - Script > show console. It was a simple matter of pasting the script into the console and saving the script in the correct directory, usr/share/scribus/scripts.

    This is in Scribus 1.4, however, I will need to prepare the manuscript in 1.5 because I need its PDF/X-1 capabilities to submit to the printer. I still need to find out if 1.5 will recognize the corrected text, or if I'll need to do the whole thing all over again!!! But that's a whole 'nother ballgame.

    If it isn't chickens, it's feathers.

    Update: Scribus 1.5 does indeed acknowledge the script changes. That's a relief.
    Last edited by Buntu Bunny; March 18th, 2014 at 05:26 PM.
    "Everybody is ignorant, only on different subjects." Will Rogers

Page 1 of 2 12 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
  •