! 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 !
Exo GTK+ 3 port - Userspace virtual filesystem (GVfs) - Out of service
Status:
RESOLVED: FIXED

Comments

Description poma 2016-07-14 23:08:18 CEST
Ref.
Merge in GTK3 changes provided by Jonas Kümmerlin (https://github.com/rgcjonas/exo-gtk3).
http://git.xfce.org/xfce/exo/commit/?id=c4b7735

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GTK+ 2

$ exo-open --version | head -1
exo-open 0.10.7git-20160606git85d6526

$ thunar computer:/ network:/ trash:/
OK

$ exo-open computer:/ network:/ trash:/
OK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GTK+ 3

$ exo-open --version | head -1
exo-open 0.10.7git-20160712git92861c1

$ thunar computer:/ network:/ trash:/
OK

$ exo-open computer:/ network:/ trash:/
Thunar: Failed to open "computer:/": Operation not supported
Thunar: Failed to open "network:/": Operation not supported
Thunar: Failed to open "trash:/": Operation not supported
Comment 1 Derk te Bokkel 2016-07-15 18:41:14 CEST
exo gtk+:3 .. also does not open regular files with thunar ..
all "Preferred Applications"  also do not open  .. problem with the exo-open
command
Comment 2 Derk te Bokkel 2016-07-15 18:59:11 CEST
to be more specific

exo-open --launch  <any-command> fails

in xfce4-terminal:

exo-open --launch FileManager
RC=0 derk@zlink1 ~ $ No protocol specified

(exo-helper-1:16676): Gtk-WARNING **: cannot open display: :0.0


on a gtk+:2 based machine this works normally.. filemanager launches
Comment 3 Derk te Bokkel 2016-07-15 20:05:31 CEST
thunar  left hand treeview panel directories open
thunar main window .. neither files nor directories will open on left 
double click  

in main panel:

file/directory right click menu .. missing the following items: open, open in new tab, open in new window, send to>, cut, copy, paste, move to trash, Delete, rename


file/directory right click menu has the following .. create folder, create document>, open terminal here, zoom in, zoom out, normal size, properties
Comment 4 Derk te Bokkel 2016-07-15 20:09:09 CEST
this is current git version  of thunar .. (all xfce4 files are current git versions) rebuilt against exo gtk3
Comment 5 Derk te Bokkel 2016-07-15 20:56:48 CEST
an interesting exercise:

used thunar-1.6.10 compiled against exo-gtk3  

first file open works if you use right click menu it keeps working until you double click a file.    then it only opens that file using either method .. and selecting any other file or directory .. still opens that specific initial double clicked file.

if you double click a  directory nothing opens any more and right click menu open entries etc. described above disappear..
Comment 6 Derk te Bokkel 2016-07-15 21:09:08 CEST
same behaviour as in comment 5 for thunar git version .. of course -- nearly identical code.  :)

hope this helps diagnose some issues..
Comment 7 Derk te Bokkel 2016-07-15 22:28:48 CEST
additional playing .. switching view types restores right click menu again

actually  the errors only seem to happen with the detailed list view .. my normal default

using either icon view or compact list view .. files and directories open normally without errors ..

so something in detailed list view is error prone ..
Comment 8 Derk te Bokkel 2016-07-15 23:51:43 CEST
$ thunar computer:/ network:/ trash:/   .. works fine

this is my version of the initial error:

$ exo-open computer:/ network:/ trash:/
No protocol specified

(exo-helper-1:19697): Gtk-WARNING **: cannot open display: :0.0
No protocol specified

(exo-helper-1:19700): Gtk-WARNING **: cannot open display: :0.0
No protocol specified

(exo-helper-1:19703): Gtk-WARNING **: cannot open display: :0.0
Comment 9 Derk te Bokkel 2016-07-16 00:20:03 CEST
grep exo-open * in thunar src gives:

thunar # grep exo-open *
thunar-exec.c:    g_string_append (command_line, "exo-open --launch TerminalEmulator ");
thunar-file.c:                  argv[0] = g_strdup ("exo-open");


exo-open in gtk+3 version is flawed .. so neither of these works .. as well
Comment 10 ToZ editbugs 2016-07-16 14:21:16 CEST
Created attachment 6738 
exo GTK3 xauth patch

With respect to comment #2, I was getting the same error messages with the GTK3 build:

Gtk-WARNING **: cannot open display: :0.0

The following patch, which also sets the XAUTHORITY environment variable, fixes the issue for me.

(Did not test thunar build against exo GTK3)
Comment 11 ToZ editbugs 2016-07-16 14:37:21 CEST
Created attachment 6739 
exo GTK3 xauth patch V2

A better version of patch that checks for existence of xauthority before adding it to envp and also frees memory afterwards.
Comment 12 Derk te Bokkel 2016-07-16 16:45:41 CEST
your 2nd patch fixes the display issue for exo-open but not this:

exo-open computer:/ network:/ trash:/
Thunar: Failed to open "computer:/": Operation not supported


also thunar issue can be better diagnosed
starting as follows:

$exo-open --launch FileManager
$ 

using icon view and compact list view we get no output .. switching to details view .. no output .. but double clicking on any thing gives the following 


(Thunar:12067): Gtk-CRITICAL **: IA__gtk_tree_selection_set_select_function: assertion 'func != NULL' failed

(Thunar:12067): Gtk-CRITICAL **: IA__gtk_tree_selection_set_select_function: assertion 'func != NULL' failed

(Thunar:12067): Gtk-CRITICAL **: IA__gtk_tree_selection_set_select_function: assertion 'func != NULL' failed
Comment 13 Derk te Bokkel 2016-07-16 19:09:33 CEST
exo-open computer:/ network:/ trash:/

these lines do not print until the "warning dialogs (with similar message) are clicked

Thunar: Failed to open "trash:/": Operation not supported
Thunar: Failed to open "network:/": Operation not supported
Thunar: Failed to open "computer:/": Operation not supported

that is why only one in previous comment .. as I quit thunar ..
so exo-open internal command starting thunar is malformed for gtk3?
Comment 14 ToZ editbugs 2016-07-16 19:13:34 CEST
Created attachment 6740 
exo GTK3 no envp patch

Try this patch.

I noticed that in both exo-helper.c and exo-execute.c, there was a change to the deprecated gdk_spawn_on_screen() function to use the newer g_spawn_async() function. The old function didn't pass any environment variables (I'm assuming in this case it just uses the current set of user environment variables), whereas in the new code, it passes environment variables via the variable envp. However, it only seems to pass DISPLAY. Adding XAUTHORITY to this list fixed some of the problems but not all. 

This patch removes the passing of the envp parameter and goes back to the previous default. It fixes both the exo-open --launch calls and the exo-open computer:/ network:/ trash:/ calls. I'm not sure how this affects the thunar build against exo GTK3.

If this patch is to be accepted, there is also erroneous code now that prepared the envp parameter that should also be removed.

If the envp parameter is to be used, then we need to determine exactly which environment variables are required for exo to work in these scenarios and make sure they are all passed.
Comment 15 Derk te Bokkel 2016-07-16 19:55:35 CEST
yes the exo_noenv.patch by itself that fixes the File Manager also "Preferred Applications" work too! .. I forgot to check those functions earlier ..

the "Open terminal here" command in thunar now works again as well ..

detailed list view in thunar still has issues so that is unrelated to exo-open issue .. but still effected by the overall exo gtk+3 patch ..
Comment 16 Derk te Bokkel 2016-07-16 21:56:17 CEST
exo_tree_view_new() is the only call in thunar-details-view.c .. effected by the update .. and is only called in thunar-details-view.c by thunar .. so might well be the source of the details view issues


the other exo call in thunar-details-view.c to exo_binding_new()   was not touched in the most recent git exo update
Comment 17 Derk te Bokkel 2016-07-16 22:08:01 CEST
ah bug 6230 returns .. in the updated code .. same issues ..
Comment 18 Derk te Bokkel 2016-07-16 22:53:15 CEST
is the call at line 382  correct as patched


  /* see bug http://bugzilla.xfce.org/show_bug.cgi?id=6230 for more information */
  if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == (GtkTreeSelectionFunc) exo_noop_false))
    {
      /* just reset the select function (previously set to exo_noop_false),
       * there's no clean way to do this, so what the heck.
       */
382--->      gtk_tree_selection_set_select_function (selection, NULL, NULL, NULL);
    }

patch diff:

   /* see bug http://bugzilla.xfce.org/show_bug.cgi?id=6230 for more information */
-  if (G_LIKELY (selection->user_func == (GtkTreeSelectionFunc) exo_noop_false))
+  if (G_LIKELY (gtk_tree_selection_get_select_function (selection) == (GtkTreeSelectionFunc) exo_noop_false))
     {
       /* just reset the select function (previously set to exo_noop_false),
        * there's no clean way to do this, so what the heck.
        */
-      selection->user_func = NULL;
+      gtk_tree_selection_set_select_function (selection, NULL, NULL, NULL);
     }

does line 382---> really clear ... selection->user_func .. because it does not seem to! as the bug has returned  ..
 
Are the remarks in bug 6230 .. comments 11,12,13 still relevant?
Comment 19 Derk te Bokkel 2016-07-17 00:59:11 CEST
actually user_func does not seem to exist and removing those lines of code " added in bug 6230" does nothing to change the error .. time to dig deeper ..

anybody know why .. nick's remark in comment 13 of bug 6230 ..
"...However the real bug seems to be gtk_tree_view_get_path_at_pos() in exo_tree_view_button_press_event() which doesn't return a path at the 2nd click, while it does in gtk 2.18." .. was never dealt with?

I don't really know how this works so .. i'm out of my depth here .. can read the code but don't really understand it.  gtk+ is a mystery to me
Comment 20 Derk te Bokkel 2016-07-17 02:12:23 CEST
more diagnostics 

though it seems that the selection item is not cleared when using the mouse single or double click style with the detailed list view .. 

once a click to open selection has been made this way .. it is frozen and is not cleared .. once the item is open.. 

so any click will return the same thing as long as you are in the same directory 

.. moving out of the directory makes mouse unresponsive in thunar main window .. 

opening a new window or tab sets up a new responsive area .. until and item is "cicked to open" and each window or tab locked to opening only the mouse selected file .. flipping back and forth each area will open only the file selected in each .. changing directories kills the responses ..

thats it for now..
Comment 21 poma 2016-08-17 17:38:19 CEST
(In reply to Derk te Bokkel from comment #15)
> yes the exo_noenv.patch by itself that fixes the File Manager also
> "Preferred Applications" work too! .. I forgot to check those functions
> earlier ..
> 
> the "Open terminal here" command in thunar now works again as well ..
> 
> detailed list view in thunar still has issues so that is unrelated to
> exo-open issue .. but still effected by the overall exo gtk+3 patch ..

Detailed List View issue - Exo GTK+ 3 port
https://bugzilla.xfce.org/show_bug.cgi?id=12772
Comment 22 poma 2016-08-17 17:39:14 CEST
$ exo-open --version | head -1
exo-open 0.11.1git-20160817gitf98abb0

$ thunar --version | head -1
Thunar 1.6.10git-20160629gitfebb417 (Xfce 4.12)
Comment 23 Derk te Bokkel 2016-08-17 18:14:18 CEST
.. I follow the git versions .. closely .. ignoring translations mostly .. but all code updates are done as frequently as they are "released" to git.xfce.org :)

Bug #12698

Reported by:
poma
Reported on: 2016-07-14
Last modified on: 2016-08-24

People

Assignee:
Nick Schermer
CC List:
5 users

Version

Version:
unspecified

Attachments

exo GTK3 xauth patch (896 bytes, patch)
2016-07-16 14:21 CEST , ToZ
no flags
exo GTK3 xauth patch V2 (1018 bytes, patch)
2016-07-16 14:37 CEST , ToZ
no flags
exo GTK3 no envp patch (1.12 KB, patch)
2016-07-16 19:13 CEST , ToZ
no flags

Additional information