You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Where do nautilus scripts go ?

Author (Read 5645 times)

0 Members and 3 Guests are viewing this topic.

Re: Where do nautilus scripts go ?
« Reply #9 on: April 05, 2019, 08:12:11 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
@nateliv thanks for the update :)
 

Re: Where do nautilus scripts go ?
« Reply #8 on: February 01, 2019, 04:39:32 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
I forgot to write, the scripts in my bin folder, to run them I dont use -
Code: [Select]
scriptname.shI just type the

Code: [Select]
scriptnameon the command line, hit enter and it runs.
I don't know if it matters, or which is the best way, I just followed the way from the book when first learning to how to do it.
 

Re: Where do nautilus scripts go ?
« Reply #7 on: February 01, 2019, 04:08:15 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
Yes I have looked at the link.
With the nautilus one "the" thing that caught my eye was, it is a baby step forward from what I currently already do with scripts.
eg; make the script, drop it in a directory, and make it executable.

The nautilus example just required a different directory to drop the scripts in to.
The difference between the 2 directories is the nautilus one enables scripts to be selected and run from the context menu instead of the command line.
It would involve learning new to me code for inside the shell script, that on its own is enough learning wise for additional outside of the book at this stage.
 

Re: Where do nautilus scripts go ?
« Reply #6 on: February 01, 2019, 02:37:08 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 237
    Posts
  • Reputation: 40
  • Linux Lite Member
    • View Profile
    • WKDfm Radio | WKDfm Chat

  • CPU: AMD Turion(tm) 64 x 2 Mobile Technology TL-60

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480

  • Kernel: 5.x
Custom-actions will allow you to do similar and add your scripts to the context menu, that link I gave explains how to do this.
Owner and DJ at WKDfm Radio ( www.wkdfm.co.uk )
 

Re: Where do nautilus scripts go ?
« Reply #5 on: February 01, 2019, 02:29:47 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
I have similar done, but slightly differently, the Linux Command Line book, which is what I am using, chapter 28, it was a few chapters before the shell scripting, it showed to change the path to include the folder using the terminal command, which is what I done, and I made the bin folder in Home directory etc.


I can run the scripts from the command line, you can see the system information one on the blog link after it is run.

It was on Fedora magazine I was looking at something else, (mindmaps) and noticed an article about running apps without opening the gui, via the script run by selecting from the right context menu in Nautilus, ran FSearch on LL found nautilus files and thought Id give it a try on LL, as I learn shell scripting and command line on LL, from this book, and the help of members  :) .
On Fedora I use a different book Linux Bible to learn different things.
« Last Edit: February 01, 2019, 02:33:16 AM by bitsnpcs »
 

Re: Where do nautilus scripts go ?
« Reply #4 on: February 01, 2019, 01:48:49 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 237
    Posts
  • Reputation: 40
  • Linux Lite Member
    • View Profile
    • WKDfm Radio | WKDfm Chat

  • CPU: AMD Turion(tm) 64 x 2 Mobile Technology TL-60

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480

  • Kernel: 5.x
No probs, what you can do is check .profile in your home folder has the following lines:

Code: [Select]
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

Then create a bin dir in your home folder.

Code: [Select]
mkdir ~/bin
put all your bash scripts in bin and make them executable

Code: [Select]
chmod +x ~/bin/*
You may need a reboot to make sure everything works.
You should now be able to start any script in bin via terminal in any folder with:

Code: [Select]
scriptname.sh
Make life easier by creating launchers for you bash scripts :)
Have fun :)
« Last Edit: February 01, 2019, 02:19:10 AM by DeepThought »
Owner and DJ at WKDfm Radio ( www.wkdfm.co.uk )
 

Re: Where do nautilus scripts go ?
« Reply #3 on: February 01, 2019, 01:36:03 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
Thank You.I realise thanks to your help my error that it's Thunar :-[ .
I was looking to use shell scripts as it is what I am learning currently, it was more for  practicing/experimenting with that than needing an actual function.
 

Re: Where do nautilus scripts go ?
« Reply #2 on: February 01, 2019, 12:31:24 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 237
    Posts
  • Reputation: 40
  • Linux Lite Member
    • View Profile
    • WKDfm Radio | WKDfm Chat

  • CPU: AMD Turion(tm) 64 x 2 Mobile Technology TL-60

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480

  • Kernel: 5.x
Thunar works slightly different to Nautilus. This might help :

Code: [Select]
https://docs.xfce.org/xfce/thunar/custom-actions
Owner and DJ at WKDfm Radio ( www.wkdfm.co.uk )
 

Where do nautilus scripts go ?
« Reply #1 on: February 01, 2019, 12:22:51 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
Hello,

it says to add nautilus scripts here -

Code: [Select]
~/.local/share/nautilus/scripts/

there is no nautilus directory in the share directory, I have tried creating the nautilus directory in share directory, and the scripts directory inside this, nautilus doesn't pick up the scripts, (it doesn't add "scripts" to its right click context menu on a file in Documents directory of Home directory, so a script can be selected from this to run on the selected file/s).



 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section