! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar does not show a context menu on right-click when started via trash-pan...
Status:
RESOLVED: FIXED

Comments

Description Manuel Grießmayr 2019-09-30 22:13:36 CEST
When I click on the trash icon in the xfce panel with a left click then Thunar opens and shows me the content of the trash. But I cannot empty the trash from within Thunar. A context menu isn't available at the trash icon in the navigation bar of Thunar. Also there is no context menu at the space where the files are listed except for the files themselves.

When I simply open Thunar so that I will see the content of my home directory at first then everything works fine and the trash can be deleted. Also the context menu of the trash icon in the xfce panel does work.
Comment 1 Theo Linkspfeifer editbugs 2019-10-01 11:34:50 CEST
Any error messages in your ~/.xsession-errors log file? Also, did you try to reproduce this issue with another user account?

I did a quick test with my Xubuntu 19.10 installation, but I was not able to confirm the bug.
Comment 2 Manuel Grießmayr 2019-10-01 14:31:48 CEST
Created attachment 9062 
~/.xsession-errors

Here is the .xsession-error file which actually contains errors and warnings. Do you have an idea  what's the problem?
Comment 3 Manuel Grießmayr 2019-10-01 14:33:06 CEST
You're right. I created a test user and in this case everything works fine. What should I do now? It's not working with my default user.
Comment 4 alexxcons editbugs 2019-10-03 09:56:07 CEST
Created attachment 9075 
"Empty Trash" grayed out in location buttons

> A context menu isn't available at the trash icon in the navigation bar of Thunar.
You have the same bug like on thescreenshot ? That are the location buttons .. as well for me "empty trash" is grayed out there. To be fixed.

However I cannot observe the same bug on the tree-view/bookmark view ... can you ?

> Also there is no context menu at the space where the files are listed except for the files themselves.
You refer to the blanc location button on the very right, on which you can modify the address when clicked ? If so, that is expected behaviour ... which context menu you would expect there ?
( A screenshot would help, to be sure we talk about the same stuff )

> What should I do now?
Do you get the context menu on thge bookmark view / tree view item on the left ?
How about right click on an empty space when icon view is selected ?
You as well can empty the trash from command line.
Comment 5 alexxcons editbugs 2019-10-03 10:02:02 CEST
Created attachment 9076 
trash context menu on bookmark view

Thats the trash context menu I see on bookmark view, which seems not to suffer from the bug  (You have the trash bookmark ? It is possible to show/hide it !)
Comment 6 Manuel Grießmayr 2019-10-03 10:54:51 CEST
Created attachment 9077 
no context menu at red dots

@alexcons: I have the same issue like you're showing in attachment 9075  when simply launching thunar without clicking the panel trash icon. But I have no context menus available when launching the thunar via the trash panel icon. As I've seen now the missing context menu is not only missed when thunar shows the content of the trash but also every other location. As I've said everything works fine when I test with a new test user or I open Thunar not via the panel trash icon. Please see the red dots in the screenshot where I don't get a context menu.
Comment 7 alexxcons editbugs 2019-10-03 22:47:29 CEST
> But I have no context menus available when launching the thunar via the trash panel icon
Hah, finally I can reproduce your problem .. thunar shows this bug only when started via the tpa-plugin ! .. will see if I can figure out the cause.

Meanwhile I fixed this other bug "not possible to empty trash via pathbar context menu" for master and 4.14 branch:
https://git.xfce.org/xfce/thunar/commit/?id=31375b5ed76839d08c689651a14c7e931f3db6af
Comment 8 Theo Linkspfeifer editbugs 2019-10-22 14:45:39 CEST
I can trigger the bug in a clean session with the following D-Bus call:

$ dbus-send --print-reply --session --type=method_call --dest=org.xfce.Thunar /org/xfce/FileManager org.xfce.Trash.DisplayTrash string:":0.0" string:""

The important part is the Display string. Neither ":0" nor an empty string will expose the bug.
Comment 9 alexxcons editbugs 2019-10-22 22:37:00 CEST
Created attachment 9143 
a first patch

Thanks for the hint, that dbus call helps alot

> The important part is the Display string. Neither ":0" nor an empty string will expose the bug.
Strange thing. for me only empty string will work. ":0" still exposes the bug

The attached bug fixes the bug for me by always passing "empty string" in tpa .. though it would be nice to have thunar to be opened on the correct display.

.. so if you are motivated to test / do further debugging, that would be very welcome !

( It is required to install xfce4-panel from source to build thunar with tpa support ... than install thunar from source and restart the panel )
Comment 10 alexxcons editbugs 2019-10-22 23:14:17 CEST
Actually, since a simple dbus call as well can trigger the bug,  the problem should rather be fixed on the thunar side, in thunar-dbus-service.c  (thunar_dbus_service_display_trash)
Comment 11 Theo Linkspfeifer editbugs 2019-10-31 15:39:05 CET
I think we have to look here:
https://git.xfce.org/xfce/thunar/tree/thunar/thunar-gdk-extensions.c#n189

Display name ":0" is the short version of ":0.0", so the string comparison needs to be improved.
Comment 12 alexxcons editbugs 2019-11-02 23:21:08 CET
(In reply to Theo Linkspfeifer from comment #11)
> I think we have to look here:
> https://git.xfce.org/xfce/thunar/tree/thunar/thunar-gdk-extensions.c#n189
> 
> Display name ":0" is the short version of ":0.0", so the string comparison
> needs to be improved.

Nope, seems not to be the cause.
Even if I comment out the complete method "thunar_gdk_screen_open" and only put in "return gdk_screen_get_default ();" the bug still can be reproduced.
Comment 13 Theo Linkspfeifer editbugs 2019-11-03 00:20:05 CET
For a quick test change "strlen (display_name)" to "2".
Comment 14 alexxcons editbugs 2019-11-03 22:23:45 CET
Created attachment 9183 
patch

(In reply to Theo Linkspfeifer from comment #13)
> For a quick test change "strlen (display_name)" to "2".

Sorry, I was  wrong and you are right :F
For some reason I do not understand ,  it is not sufficient to kill the thunar daemon after installing from source for me .. only if I logout +re-login, the code change had an effect.

Attached a patch which fixes the bug by using the length of the passed display for comparison in addition to the existing comparison.
Could you please take a try ?
Comment 15 Theo Linkspfeifer editbugs 2019-11-03 23:14:58 CET
I can confirm that the patch fixes the bug.
Comment 16 Git Bot editbugs 2019-11-03 23:41:03 CET
Alexander Schwinn referenced this bugreport in commit 35744c4a21e16489e32bd3f7649ebb90bc27a57e

Thunar does not show a context menu on right-click when started via trash-panel-plugin (Bug #16000)

https://git.xfce.org/xfce/thunar/commit?id=35744c4a21e16489e32bd3f7649ebb90bc27a57e
Comment 17 Git Bot editbugs 2019-11-03 23:42:28 CET
Alexander Schwinn referenced this bugreport in commit 48b993b7245d25f28b16168a7f3e73c4d889fa75

Thunar does not show a context menu on right-click when started via trash-panel-plugin (Bug #16000)

https://git.xfce.org/xfce/thunar/commit?id=48b993b7245d25f28b16168a7f3e73c4d889fa75
Comment 18 alexxcons editbugs 2019-11-03 23:43:51 CET
(In reply to Theo Linkspfeifer from comment #15)
> I can confirm that the patch fixes the bug.
Thanks for all the hints and the testing !

Pushed to master and 4.14 branch, to be released in thunar 1.8.10
Comment 19 Manuel Grießmayr 2020-04-06 22:34:58 CEST
Sorry, I have this problem again with Xubuntu 20.04 64 bit Beta on real hardware (x86_64). Thunar version installed is 1.8.12.
Comment 20 Manuel Grießmayr 2020-04-12 20:30:32 CEST
I cannot explain this but it works again :) Maybe some updates during the beta...

Bug #16000

Reported by:
Manuel Grießmayr
Reported on: 2019-09-30
Last modified on: 2020-04-12

People

Assignee:
alexxcons
CC List:
2 users

Version

Attachments

~/.xsession-errors (25.44 KB, text/plain)
2019-10-01 14:31 CEST , Manuel Grießmayr
no flags
"Empty Trash" grayed out in location buttons (185.13 KB, image/png)
2019-10-03 09:56 CEST , alexxcons
no flags
trash context menu on bookmark view (186.12 KB, image/png)
2019-10-03 10:02 CEST , alexxcons
no flags
no context menu at red dots (50.12 KB, image/png)
2019-10-03 10:54 CEST , Manuel Grießmayr
no flags
a first patch (1.57 KB, patch)
2019-10-22 22:37 CEST , alexxcons
no flags
patch (971 bytes, patch)
2019-11-03 22:23 CET , alexxcons
no flags

Additional information