IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
487 stars 73 forks source link

With Parcellite unable to paste in SpaceFM #705

Closed lpvm closed 6 years ago

lpvm commented 6 years ago

When I copy or cut a file, the paste option is always dimmed. I can drag and drop from one pane to the other, though.

Why is the paste option dimmed? How to enable it?

IgnorantGuru commented 6 years ago

I haven't seen any other reports like this. If you don't have write access to the current directory, then Paste will be disabled. Move to a directory where you have write access, such as your home directory.

If that's not the problem, check the context of that menu item: In the right-click menu of the file list, please RIGHT-click on the Copy menu item and select Properties from the Design Menu. On the Context tab, check option 'Ignore Context / Show All' and click Ok.

Next, in the right-click menu of the file list, RIGHT-click on Paste if possible, and select Properties from the design menu. On the Context tab, make sure there are no rules listed in the rules box. If there are any rules, remove them. Then also UNcheck option 'Ignore Context / Show All' and click Ok.

That should correct the problem if it was due to a custom context setting causing that menu item to be disabled.

If that doesn't fix it, please provide the output of 'spacefm --version' and your full GTK version. Specify how you're copying the file (eg key shortcut or selecting Copy from menu), and any other details that may be relevant.

Starting the first instance of spacefm in a terminal may also provide some useful output, such as warnings.

lpvm commented 6 years ago

I have write permissions to the directories I'm trying to paste into. Regarding the right click in the copy menu, it's done. The right click on the Paste menu is not possible.

I'm using Void LInux with the following packages:

spacefm-1.0.5_1
gtk+-2.24.32_1                               The GTK+ toolkit (v2)
gtk+-devel-2.24.32_1                         The GTK+ toolkit (v2) - development files
gtk+3-3.22.26_1                              The GTK+ toolkit (v3)
gtk+3-devel-3.22.26_1                        The GTK+ toolkit (v3) - development files
gtk-doc-1.26_2                               Documentation tool for public library API
gtk-engine-murrine-0.98.2_5                  GTK2 engine to make your desktop look like a murrina
gtk-update-icon-cache-2.24.32_1              The GTK+ toolkit (v2) - The GTK+ update icon cache to
gtk-vnc-0.6.0_2                              VNC viewer widget for GTK
gtk-xfce-engine-3.2.0_2                      Xfce GTK+2 theme engine
gtkdialog-0.8.3_4                            A small utility for fast and easy GUI building
gtkimageview-1.6.4_1                         A widget that provides a zoomable and panable view of a GdkPixbuf
gtkmm-3.22.2_1                               C++ bindings for The GTK+ toolkit (v2)
gtkmm2-2.24.5_2                              C++ bindings for The GTK+ toolkit (v2)
gtksourceview-3.24.6_1                       Text widget that extends GTK+3 GtkTextView widget
and some others

xfce4-4.12.0_6
$ spacefm --version
spacefm 1.0.5
GTK2 UDEV INOTIFY DESKTOP SNOTIFY

Didn't change the shortcuts. It doesn't work neither with keyboard shortcuts, nor using the mouse.

Starting spacefm from the command line returns:

$ spacefm

(spacefm:25073): SpaceFM-WARNING **: No root settings found in /etc/spacefm/  Setting a root editor in Preferences should remove this warning on startup.   Otherwise commands run as root may present a security risk.
special mount changed: encfs (0:43) on /home/lupe/Db_claro

(spacefm:25073): SpaceFM-WARNING **: mime-type application/x-msdownload has no description (comment)
[h264 @ 0x7f24a404ab40] co located POCs unavailable
[h264 @ 0x7f24a404ab40] co located POCs unavailable
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f24a4049c00] decoding for stream 0 failed
[h264 @ 0x7f24a404a5c0] co located POCs unavailable
[h264 @ 0x7f24a404a5c0] co located POCs unavailable

Did a fusermount -u /home/lupe/Db_claro, tried again, same problem.

Tried spacefm-ng as well, but the problem remains, so went back to spacefm.

Started spacefm as root but the paste option is dimmed as well.

Can record my desktop if you want.

IgnorantGuru commented 6 years ago

Thanks. A few questions to narrow it down...

If you right-click on a file and select Copy, then put the cursor in the pathbar and select Paste, is the pathname of the file pasted into the pathbar? Or you can use a text editor or another FM to test the paste. iow, does it appear Copy is placing files on the clipboard?

Is Delete in the right-click menu also always disabled, or is it only disabled in directories where you have no write access?

jfyi, SpaceFM tests for write access here. That method dates back all the way and there has never been a report like this, so if it is due to write access permissions, something unusual must be involved, perhaps a build or library problem.

You might also try starting with a fresh test config, just to eliminate a configuration issue:

killall spacefm
spacefm -c /tmp/spacefm-test
lpvm commented 6 years ago

Ok, let's narrow it down. Tried spacefm in my old laptop also using VoidLinux and it works fine. Although it has much less sotfware installed.

After Copy, can paste its path into the pathbar and into some text editor.

Delete is enabled.

$ touch TTT/aa
$ chmod 400 TTT/aa 
$ ls -la TTT/
-r--------   1 lupe lupe     0 fev 25 12:57 aa

Even so, spacefm deletes the file after asking for confirmation. I think that delete is working as intended.

The behavior is the same even when starting with a fresh test config.

lpvm commented 6 years ago

Just to say that I started a different Xorg session with $ startx -- :1 that initializes icewm but the strange behavior is the same.

IgnorantGuru commented 6 years ago

Thanks. One more question: Are Actions|Paste Target and Actions|Paste Link also always disabled like Paste is?

I'll schedule this for a walk through the code. It doesn't sound like it's an access issue, so sounds like either an issue with how the clipboard is read, which would be odd since SpaceFM copied to it, or some glitch with how that menu item is building.

Paste Target can be used as an approximate replacement for Paste. You can also import my IG Paste Into plugin and use that to replace Paste in the menu for now. It's functionally almost the same. Just right-click on a menu item near Paste, select New|Import|URL, and paste in this link. Then set a key shortcut as Ctrl+V.

lpvm commented 6 years ago

I include a video that shows what's happening. paste_problems_spacefm.ogv.zip

I'll try the workaround you mention.

ncmprhnsbl commented 6 years ago

what is that gtk theme?

lpvm commented 6 years ago

It's vertex-light.

ncmprhnsbl commented 6 years ago

ok.. i asked because sometimes gtk themes can cause problems.. but the vertex family is pretty good in that regard.. this is an odd one, i have been using spacefm on Void since 2015 with zero problems..

lpvm commented 6 years ago

The workaround using the IG Paste Into plugin works fine.

IgnorantGuru commented 6 years ago

Are Actions|Paste Target and Actions|Paste Link also always disabled like Paste is?

lpvm commented 6 years ago

Well, in a second look, maybe IG Paste Into is not working fine. Tell me if what I'm doing is the correct procedure. In the first pane, I copy a file. Move to the second (on the right), choose a directory and then Extras | Paste Into. Is this the way to do it? What happens now (maybe I was not so attentive before), is that the file is not pasted, but the directory on this second panel changes to the one of the origin of the file (left panel). The two panels are showing the same directory.

As for the latest question, yes, Actions | Paste Target and Paste Link are always disabled.

IgnorantGuru commented 6 years ago

That is the correct usage of Paste Into, but is not the correct behavior - the plugin script does not change the dir of the panel. However, when only text is on the clipboard, it is pasted it into the pathbar, which is probably causing the dir change. You probably need to uncheck option Ignore Context/Show All on the Context tab of a menu item, then you'll see Paste Into is also disabled due to no files on the clipboard.

Given your answers, it appears that detection of files on the clipboard is not working correctly on your system, which is inexplicable. Given that this has never arisen before, this may not indicate a problem in SpaceFM's code, but a problem with the clipboard functions on your system, or with GTK/GDK, for whatever reason.

Personally, I would uninstall and try building alpha using the net installer, as a rebuild might correct it if there was a package/library problem on Void. Otherwise, reinstallation of GTK or other system components may be required.

lpvm commented 6 years ago

Ok, it's solved. Although not explained. But given your words, I removed the clipboard manager I use Parcellite and the Paste function already works fine. What is yet to be seen is if it is Parcellite de per se, or some configuration of the application that is interfering with spacefm.
Maybe you could install Parcellite in your system to try to replicate the bad behavior. The options enabled in my system are: [Behavior] Use Copy (Ctrl-C) Use Primary (Selection) Save history Restore Empty Trim Whitespace Confirm before clearing history [Display] Current entry on top Show in a single line Multiuser [Hotkeys]

F12 NB: I closed `Parcellite`, opened it again while `spacefm` was running and `Paste` still works. Closed `spacefm` and opened it again and `Paste` works.
IgnorantGuru commented 6 years ago

Sounds like Parcellite has an intermittent bug which interferes with normal use of the clipboard. SpaceFM's use of the copy files functions is fairly routine so not much to go wrong there, and compatibility has been good. I'm not likely to investigate this unless SpaceFM's use of the clipboard is shown to be out of spec. Thanks for the followup.

Feel free to post below any additional information related to this issue.