[QUESTION] Running on VM - Ubuntu
A Python library to create and deploy cross-platform native context
Brought to you by:
saleguas
Originally created by: L3str4nge
Hello, I am trying create fast command but it seems not working. Did someone tried create context menus on VM?
My configuration:
HOST: Windows 7 64bit
GUEST: Ubuntu 20.04 64bit
Running on Virtual Box 6.1
Thank's for any help.
Originally posted by: saleguas
I did all my testing in an Ubuntu 20.04 VM, so it should work. Did you restart nautilus after running the command? And please post your code. Thanks.
Originally posted by: L3str4nge
then
nautilus -q
then open file manager. Maybe i am missing something?Originally posted by: saleguas
Does the entry appear on the context menu? The way it interacts on Linux is quite weird and the shell being ran isn't the same shell that you probably have open (you won't have any output).
Originally posted by: susarlanikhilesh
I tried the same. I'm also unable to see the context menu. What else should be done? @saleguas
Originally posted by: susarlanikhilesh
As you mentioned it doesn't execute in the same shell.
I wrote bash scripts
one.sh is the filename
!/bin/sh
echo one.sh: pid is "$$"
python3 simple_fast_command.py
. ./two.sh
echo done with "$0"
two.sh is the filename#!/bin/bash
echo two.sh: pid is "$$"
nautilus -q
the output after I run one.sh
one.sh: pid is 37341
/home/nikki/.local/share/
two.sh: pid is 37341
done with one.sh
So, typically they ran on same processes or terminal.
But still I don't see context menu.
Let me know if I missed anything else.
Originally posted by: susarlanikhilesh
/usr/lib/python2.7/dist-packages/gi/types.py:220: Warning: type name 'Example Fast Command 1+ExampleMenuProvider' contains invalid characters
gi.type_register(cls, namespace.get('__gtype_name__'))
Traceback (most recent call last):
File "/home/nikki/.local/share/nautilus-python/extensions/Example Fast Command 1.py", line 21, in <module>
class ExampleMenuProvider(GObject.GObject, Nautilus.MenuProvider):
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 229, in init
super(GObjectMeta, cls).init(name, bases, dict</module>)
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 208, in init
cls._type_register(cls.dict)
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 220, in _type_register
_gi.type_register(cls, namespace.get('gtype_name'))
RuntimeError: could not create new GType: Example Fast Command 1+ExampleMenuProvider (subclass of GObject)
Nautilus-Share-Message: 20:44:54.088: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
Instead of running nautilus -q, I ran nautilus -w.
Then I got the above error
Originally posted by: thescribe11
Try replacing the spaces in "Example Fast Command 1" or replacing them with underscores.
Originally posted by: susarlanikhilesh
Thank you. It worked. I am able to see the context menu @thescribe11
Originally posted by: thescribe11
This afternoon I'll work on a PR to add automatic name validation.