How do I query individual thumbnail-namespace attributes with the gio command?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












The gio shell command replaces the gvfs- suite for working with local and remote files on Gnome systems, using Gio over the Gvfs backend. For the most part it's quite effective, but I'm having a lot of difficulty understanding its tools for examining the boolean attributes in the thumbnail namespace.



gio info $URI will display all of the attributes for a supported file URI or local file path. gio info -a $selection $URI allows attribute namespaces or individual attributes to be queried. Mostly that works fine:



% gio info -a access test.png
uri: file:///var/tmp/test.png
attributes:
access::can-read: TRUE
access::can-write: TRUE
access::can-execute: FALSE
access::can-delete: TRUE
access::can-trash: FALSE
access::can-rename: TRUE

% gio info -a thumbnail test.png
uri: file:///var/tmp/test.png
attributes:
thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png
thumbnail::is-valid: TRUE


But if I try to query individual attributes, things get wonky once I'm in the thumbnail space:



% gio info -a access::can-read test.png
uri: file:///var/tmp/test.png
attributes:
access::can-read: TRUE

% gio info -a thumbnail::path test.png
uri: file:///var/tmp/test.png
attributes:
thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png

% gio info -a thumbnail::is-valid test.png
uri: file:///var/tmp/test.png
attributes:

% gio info -a thumbnail::failed test.png
uri: file:///var/tmp/test.png
attributes:


What's going on here? Why can't I query attributes like thumbnail::is-valid or thumbnail::failed individually? No matter what I do, gio info always produces no attribute output, whether the value is TRUE, FALSE, or if the attribute is absent entirely, which makes it awfully hard to determine which of those it is.



(Obviously I could query -a thumbnail and parse the output, this question is more about the confusing behavior of gio than about how to extract the values in question.)



I'm on a Fedora 26 machine, currently, with Gnome 3.24.3 and /usr/bin/gio from glib2-2.52.3-2.fc26.x86_64. The filesystem is ext4, and behavior is exactly the same for files in /home/ferd/Pictures as in these /var/tmp/ examples.



Update



At Sebastian's suggestion, filed as gnome bug #791325.







share|improve this question


























    up vote
    1
    down vote

    favorite












    The gio shell command replaces the gvfs- suite for working with local and remote files on Gnome systems, using Gio over the Gvfs backend. For the most part it's quite effective, but I'm having a lot of difficulty understanding its tools for examining the boolean attributes in the thumbnail namespace.



    gio info $URI will display all of the attributes for a supported file URI or local file path. gio info -a $selection $URI allows attribute namespaces or individual attributes to be queried. Mostly that works fine:



    % gio info -a access test.png
    uri: file:///var/tmp/test.png
    attributes:
    access::can-read: TRUE
    access::can-write: TRUE
    access::can-execute: FALSE
    access::can-delete: TRUE
    access::can-trash: FALSE
    access::can-rename: TRUE

    % gio info -a thumbnail test.png
    uri: file:///var/tmp/test.png
    attributes:
    thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png
    thumbnail::is-valid: TRUE


    But if I try to query individual attributes, things get wonky once I'm in the thumbnail space:



    % gio info -a access::can-read test.png
    uri: file:///var/tmp/test.png
    attributes:
    access::can-read: TRUE

    % gio info -a thumbnail::path test.png
    uri: file:///var/tmp/test.png
    attributes:
    thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png

    % gio info -a thumbnail::is-valid test.png
    uri: file:///var/tmp/test.png
    attributes:

    % gio info -a thumbnail::failed test.png
    uri: file:///var/tmp/test.png
    attributes:


    What's going on here? Why can't I query attributes like thumbnail::is-valid or thumbnail::failed individually? No matter what I do, gio info always produces no attribute output, whether the value is TRUE, FALSE, or if the attribute is absent entirely, which makes it awfully hard to determine which of those it is.



    (Obviously I could query -a thumbnail and parse the output, this question is more about the confusing behavior of gio than about how to extract the values in question.)



    I'm on a Fedora 26 machine, currently, with Gnome 3.24.3 and /usr/bin/gio from glib2-2.52.3-2.fc26.x86_64. The filesystem is ext4, and behavior is exactly the same for files in /home/ferd/Pictures as in these /var/tmp/ examples.



    Update



    At Sebastian's suggestion, filed as gnome bug #791325.







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      The gio shell command replaces the gvfs- suite for working with local and remote files on Gnome systems, using Gio over the Gvfs backend. For the most part it's quite effective, but I'm having a lot of difficulty understanding its tools for examining the boolean attributes in the thumbnail namespace.



      gio info $URI will display all of the attributes for a supported file URI or local file path. gio info -a $selection $URI allows attribute namespaces or individual attributes to be queried. Mostly that works fine:



      % gio info -a access test.png
      uri: file:///var/tmp/test.png
      attributes:
      access::can-read: TRUE
      access::can-write: TRUE
      access::can-execute: FALSE
      access::can-delete: TRUE
      access::can-trash: FALSE
      access::can-rename: TRUE

      % gio info -a thumbnail test.png
      uri: file:///var/tmp/test.png
      attributes:
      thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png
      thumbnail::is-valid: TRUE


      But if I try to query individual attributes, things get wonky once I'm in the thumbnail space:



      % gio info -a access::can-read test.png
      uri: file:///var/tmp/test.png
      attributes:
      access::can-read: TRUE

      % gio info -a thumbnail::path test.png
      uri: file:///var/tmp/test.png
      attributes:
      thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png

      % gio info -a thumbnail::is-valid test.png
      uri: file:///var/tmp/test.png
      attributes:

      % gio info -a thumbnail::failed test.png
      uri: file:///var/tmp/test.png
      attributes:


      What's going on here? Why can't I query attributes like thumbnail::is-valid or thumbnail::failed individually? No matter what I do, gio info always produces no attribute output, whether the value is TRUE, FALSE, or if the attribute is absent entirely, which makes it awfully hard to determine which of those it is.



      (Obviously I could query -a thumbnail and parse the output, this question is more about the confusing behavior of gio than about how to extract the values in question.)



      I'm on a Fedora 26 machine, currently, with Gnome 3.24.3 and /usr/bin/gio from glib2-2.52.3-2.fc26.x86_64. The filesystem is ext4, and behavior is exactly the same for files in /home/ferd/Pictures as in these /var/tmp/ examples.



      Update



      At Sebastian's suggestion, filed as gnome bug #791325.







      share|improve this question














      The gio shell command replaces the gvfs- suite for working with local and remote files on Gnome systems, using Gio over the Gvfs backend. For the most part it's quite effective, but I'm having a lot of difficulty understanding its tools for examining the boolean attributes in the thumbnail namespace.



      gio info $URI will display all of the attributes for a supported file URI or local file path. gio info -a $selection $URI allows attribute namespaces or individual attributes to be queried. Mostly that works fine:



      % gio info -a access test.png
      uri: file:///var/tmp/test.png
      attributes:
      access::can-read: TRUE
      access::can-write: TRUE
      access::can-execute: FALSE
      access::can-delete: TRUE
      access::can-trash: FALSE
      access::can-rename: TRUE

      % gio info -a thumbnail test.png
      uri: file:///var/tmp/test.png
      attributes:
      thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png
      thumbnail::is-valid: TRUE


      But if I try to query individual attributes, things get wonky once I'm in the thumbnail space:



      % gio info -a access::can-read test.png
      uri: file:///var/tmp/test.png
      attributes:
      access::can-read: TRUE

      % gio info -a thumbnail::path test.png
      uri: file:///var/tmp/test.png
      attributes:
      thumbnail::path: /home/ferd/.cache/thumbnails/large/0953b0d1f71f9066deee9ac3fb72243b.png

      % gio info -a thumbnail::is-valid test.png
      uri: file:///var/tmp/test.png
      attributes:

      % gio info -a thumbnail::failed test.png
      uri: file:///var/tmp/test.png
      attributes:


      What's going on here? Why can't I query attributes like thumbnail::is-valid or thumbnail::failed individually? No matter what I do, gio info always produces no attribute output, whether the value is TRUE, FALSE, or if the attribute is absent entirely, which makes it awfully hard to determine which of those it is.



      (Obviously I could query -a thumbnail and parse the output, this question is more about the confusing behavior of gio than about how to extract the values in question.)



      I'm on a Fedora 26 machine, currently, with Gnome 3.24.3 and /usr/bin/gio from glib2-2.52.3-2.fc26.x86_64. The filesystem is ext4, and behavior is exactly the same for files in /home/ferd/Pictures as in these /var/tmp/ examples.



      Update



      At Sebastian's suggestion, filed as gnome bug #791325.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 6 '17 at 21:37

























      asked Dec 6 '17 at 3:04









      FeRD

      344210




      344210




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          This is not really an issue with the gio command, but rather how this attribute is generated. The code where the attribute is generated is found in glib/gio/glocalfileinfo.c. This line is responsible for behavior you are seeing. It causes the is-valid attribute to only be generated if the query includes the path as well. I don't know if this is done intentionally, because the validity of the thumbnail is connected to its path or if this is just bug. You can file a bug report and bring this to the attention of the developers.






          share|improve this answer




















          • That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
            – FeRD
            Dec 6 '17 at 10:57











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409086%2fhow-do-i-query-individual-thumbnail-namespace-attributes-with-the-gio-command%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          This is not really an issue with the gio command, but rather how this attribute is generated. The code where the attribute is generated is found in glib/gio/glocalfileinfo.c. This line is responsible for behavior you are seeing. It causes the is-valid attribute to only be generated if the query includes the path as well. I don't know if this is done intentionally, because the validity of the thumbnail is connected to its path or if this is just bug. You can file a bug report and bring this to the attention of the developers.






          share|improve this answer




















          • That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
            – FeRD
            Dec 6 '17 at 10:57















          up vote
          3
          down vote



          accepted










          This is not really an issue with the gio command, but rather how this attribute is generated. The code where the attribute is generated is found in glib/gio/glocalfileinfo.c. This line is responsible for behavior you are seeing. It causes the is-valid attribute to only be generated if the query includes the path as well. I don't know if this is done intentionally, because the validity of the thumbnail is connected to its path or if this is just bug. You can file a bug report and bring this to the attention of the developers.






          share|improve this answer




















          • That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
            – FeRD
            Dec 6 '17 at 10:57













          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          This is not really an issue with the gio command, but rather how this attribute is generated. The code where the attribute is generated is found in glib/gio/glocalfileinfo.c. This line is responsible for behavior you are seeing. It causes the is-valid attribute to only be generated if the query includes the path as well. I don't know if this is done intentionally, because the validity of the thumbnail is connected to its path or if this is just bug. You can file a bug report and bring this to the attention of the developers.






          share|improve this answer












          This is not really an issue with the gio command, but rather how this attribute is generated. The code where the attribute is generated is found in glib/gio/glocalfileinfo.c. This line is responsible for behavior you are seeing. It causes the is-valid attribute to only be generated if the query includes the path as well. I don't know if this is done intentionally, because the validity of the thumbnail is connected to its path or if this is just bug. You can file a bug report and bring this to the attention of the developers.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 6 '17 at 10:45









          Sebastian

          48112




          48112











          • That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
            – FeRD
            Dec 6 '17 at 10:57

















          • That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
            – FeRD
            Dec 6 '17 at 10:57
















          That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
          – FeRD
          Dec 6 '17 at 10:57





          That is truly fascinating, and truly weird. You're quite correct: I can query the thumbnail:: booleans using gio info as long as I also query the thumbnail::path — even if it's not present! gio info -a thumbnail::path,thumbnail::failed $file for a file with a failed thumbnail will output the thumbnail::failed: TRUE result, whereas querying it without the path will not. ...That seems way too wonky to be working as intended, I'm definitely going to file a bug. Thanks.
          – FeRD
          Dec 6 '17 at 10:57


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409086%2fhow-do-i-query-individual-thumbnail-namespace-attributes-with-the-gio-command%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay