Comments (13)
from actions-for-nautilus.
I have installed the extension on a fresh Ubuntu 22.10 installation and it seems to work in general. A reminder of the installation process:
- Download and install the deb
- Alt-F2 (or open a terminal)
nautilus -q
This will install the deb and restart Nautilus in order to immediately see the extension.
You should then:
- Open the configurator - this will install the default/demo config for the user
- After about 30 seconds, open nautilus and right click on a folder - you should see something like this
Note the three items at the bottom (beforeOpen in Terminal
andProperties
) which are added by the extension.
You can then be sure that extension is installed and working (I am working on an alternative and cleaner approach to configuration update in Nautilus rather than the timer, but it's actually tougher than it seems :))
After that, the non-appearance of certain actions for certain files is almost certainly because the action hasn't been correctly configured.
However, having your configuration would allow me to confirm this in your particular use case.
from actions-for-nautilus.
@threed-factory-store - do you have any more help for me in addressing this?
from actions-for-nautilus.
This is so bizarre. I've responded to your emails, but my responses are not showing up here. So here goes:
It looks to me like it's not installed properly. Here's my config file and a screen shot of the right-click menu for an image file. The item I've added is to send an image to my blog. It's a bash script which works fine if I run it by itself.
Here's my config file:
{"actions": [{"type": "command", "label": "Run in python3", "command_line": "gnome-terminal -t "Running Python %b" --profile "No Close" -- python3 %b", "cwd": "%d", "max_items": 1, "mimetypes": ["text/x-python"]}, {"type": "command", "label": "Test all place holders", "command_line": "%O printf '%%s\n' '#b' %b '#B' %B '#c' %c '#d' %d '#D' %D '#f' %f '#F' %F '#h' %h '#m' %m '#M' %M '#n' %n '#o' %o '#O' %O '#p' %p '#s' %s '#u' %u '#U' %U '#w' %w '#W' %W '#x' %x '#X' %X | zenity --title "Test all place holders" --text-info", "use_shell": true}, {"type": "command", "label": "Open in gedit", "command_line": "gedit %F", "filetypes": ["!directory", "standard"]}, {"type": "menu", "label": "Folder Actions", "actions": [{"type": "command", "label": "Execute command here", "command_line": "$(zenity --entry --text "Enter command" --title "execute command in %f" --width 800)", "cwd": "%f", "use_shell": true, "max_items": 1, "filetypes": ["directory"]}, {"type": "command", "label": "Start HTTP server here", "command_line": "gnome-terminal -t "HTTP Server on %f" -- python3 -m http.server --bind 127.0.0.1", "cwd": "%f", "max_items": 1, "mimetypes": ["inode/directory"]}]}, {"type": "menu", "label": "Copy details", "actions": [{"type": "command", "label": "Copy name", "command_line": "echo -n %B | xclip -f -selection primary | xclip -selection clipboard", "use_shell": true}, {"type": "command", "label": "Copy path", "command_line": "echo -n %F | xclip -f -selection primary | xclip -selection clipboard", "use_shell": true}, {"type": "command", "label": "Copy URI", "command_line": "echo -n %U | xclip -f -selection primary | xclip -selection clipboard", "use_shell": true}]}, {"type": "command", "label": "Send To Blog", "command_line": "ImageToBlog "%F"", "use_shell": true, "min_items": 1, "max_items": 1, "permissions": "read"}]}
from actions-for-nautilus.
After it's installed, where is the app that shows the right-click menu, and how does it get run?
from actions-for-nautilus.
That config data is invalid JSON - it has had all the intra-string quote escapes removed. Bizarre. Download the one in the sources and place it in ${HOME}/.local/share/actions-for-nautilus
and rename it to config.json
.
Then stop and restart Nautilus (<ALT>F2
, enter nautilus -q
, then open Nautilus)
If you want to see debug messages, then follow this section of the README.
from actions-for-nautilus.
The main extension goes in /usr/share//nautilus-python/extensions/actions-for-nautilus
, whereas the configurator goes in /usr/share/actions-for-nautilus-configurator
. See the makefile for more info.
from actions-for-nautilus.
This is very odd. I did everything you asked, but it didn't help.
I thought I'd try running /usr/share/nautilus-python/extensions/actions-for-nautilus/actions_for_nautilus.py, and I got this error:
Traceback (most recent call last):
File "/usr/share/nautilus-python/extensions/actions-for-nautilus/./actions_for_nautilus.py", line 2, in
from gi.repository import Nautilus, GObject
ModuleNotFoundError: No module named 'gi'
So I looked into gi.repository (https://pygobject.readthedocs.io/en/latest/getting_started.html#ubuntu-getting-started) and found how to install it on Ubuntu:
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-4.0
I did that and it said there was nothing to install.
Then I put their hello.py on my system and ran it and it still said
Traceback (most recent call last):
File "/home/walt/.local/share/actions-for-nautilus/./hello.py", line 3, in
import gi
ModuleNotFoundError: No module named 'gi'
I'll be out of town for the next two days, but I'll dig into this more when I get home.
from actions-for-nautilus.
Had some time before I had to leave....
pip install PyGObject
gave me some errors which led me to...
sudo apt install pkg-config
after which I tried installing PyGObject again which gave me...
....
× Building wheel for pycairo (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/cairo
copying cairo/init.py -> build/lib.linux-x86_64-cpython-310/cairo
copying cairo/init.pyi -> build/lib.linux-x86_64-cpython-310/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-cpython-310/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
[end of output]
I don't know what's going on.
from actions-for-nautilus.
Been searchin'.
gi
should be here - /usr/lib/python3/dist-packages/gi
- get that out of the way first
If so, then I think for some reason python3 itself isn't configured to look there for the module...
from actions-for-nautilus.
https://bic-berkeley.github.io/psych-214-fall-2016/sys_path.html may help debug "where does python look for modules" - at least the first part tells you how to see the default places that python is looking in. For ME the sys.path
has the following elements:
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/home/ME/.local/lib/python3.10/site-packages
/usr/local/lib/python3.10/dist-packages
/usr/lib/python3/dist-packages
from actions-for-nautilus.
Hey, hey, hey! That was it!
My sys.path didn't list any dist-packages folders. I added /usr/lib/python3/dist-packages and now I see the menu items. Time to add mine and make the magic happen.
Thanks for diagnosing my Python problems Martin!
from actions-for-nautilus.
Hey, hey, hey! That was it!
My sys.path didn't list any dist-packages folders. I added /usr/lib/python3/dist-packages and now I see the menu items. Time to add mine and make the magic happen.
Thanks for diagnosing my Python problems Martin!
No problem. Glad to help
from actions-for-nautilus.
Related Issues (20)
- ShowIfTrue feature would be nice! HOT 2
- Open a terminal as root in a specific folder HOT 3
- Nautilus Desktop HOT 1
- JQuery gets 404 in configurator HOT 4
- how can I see the debug output? HOT 3
- Actions that I created find themselves in double in « Nautilus »... HOT 6
- not an issue, for the Wiki HOT 2
- actions-for-nautilus doesn't handle specials character in filenames... HOT 12
- Auto TAG debian package with github commit...
- Action that requires user input HOT 5
- hide/disable entries in the web interface HOT 1
- Static port for web interface HOT 2
- Blank page when starting AFN HOT 9
- Highlight Save button in Orange for unsaved settings HOT 1
- Using pipe to another command to display progress bar... HOT 1
- Does not work with commands that use placeholders
- Handling simple and double quotes in filenames... HOT 1
- Add commands to top of context menu HOT 2
- [Security] Port remains open after webpage is closed HOT 5
- How to direct command output to a file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actions-for-nautilus.