You are Here:
Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.



Where do nautilus scripts go ?

Author (Read 476 times)

0 Members and 1 Guest are viewing this topic.

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

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
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).



 


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

DeepThought

  • Forum Regular
  • ***
  • 151
    Posts
  • Country: wales
  • Reputation: 30
  • Linux Lite Member
    • WKDfm Radio | WKDfm Chat

  • Linux Lite: 4.2 64bit

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

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480
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 )
 

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

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
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 #3 on: February 01, 2019, 01:48:49 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 151
    Posts
  • Country: wales
  • Reputation: 30
  • Linux Lite Member
    • WKDfm Radio | WKDfm Chat

  • Linux Lite: 4.2 64bit

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

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480
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 #4 on: February 01, 2019, 02:29:47 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
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 #5 on: February 01, 2019, 02:37:08 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 151
    Posts
  • Country: wales
  • Reputation: 30
  • Linux Lite Member
    • WKDfm Radio | WKDfm Chat

  • Linux Lite: 4.2 64bit

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

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480
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 #6 on: February 01, 2019, 04:08:15 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
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 #7 on: February 01, 2019, 04:39:32 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
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 #8 on: March 26, 2019, 07:33:17 AM »
 

nateliv

  • New to Forums
  • *
  • 14
    Posts
  • Country: dz
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
I had a look at that and I have some good news: nautilus-open-terminal will be included in Bea. This will allow to open a terminal from any folder from nautilus.. through the context menu.

I test nautilus-gksu which allows to open a folder as root but I found it buggy. It doesn't work with metaaddresses.. (computer and home for instance), and for some reason it opens two windows instead of one. Also it is hard to see which windows are open as root, and which aren't. So I decided not to include that.






Bluestacks Kodi Lucky Patcher
Last Edit: March 28, 2019, 11:25:32 AM by nateliv
 

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

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3185
    Posts
  • Country: 00
  • Reputation: 300

  • Linux Lite: 3.2 64bit
@nateliv thanks for the update :)
 


Tags:
 


Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.