Giter VIP home page Giter VIP logo

Comments (17)

lephuongbg avatar lephuongbg commented on September 27, 2024 1

Please re-open this issue.

xprop -help 2>&1 > /dev/null actually returns 1 because -help is an invalid option.

We can use xprop -grammar 2>&1 > /dev/null instead.

from done.

jriddy avatar jriddy commented on September 27, 2024 1

@lephuongbg the version you linked to has -help as an option in the manpage. Any idea why it's telling you it's an invalid option?

I assumed it is an invalid option due to its return code. Re-checked and in the man page it does list -help as an option. So xprop -help seems to fail due to other reason.

This is a bug in xprop. The man page suggests -help as an option, but the program itself returns an error code when you run that. I'll looking for the repo to report that to, and i'll post the link to the relevant issue when i make that report.

In the time being...I think i've found a fix, i'll submit a PR

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024 1

Fixed in v1.14.5, thank you @jriddy and @ammgws

from done.

ammgws avatar ammgws commented on September 27, 2024

Looks like it was first added in 2014:

https://gitlab.freedesktop.org/xorg/app/xprop/-/commit/b0ae4b903067017ec7dc19f27d3916d2153410af

from done.

lephuongbg avatar lephuongbg commented on September 27, 2024

The version contains that commit is xprop 1.2.3, which was released 2 years ago. That release didn't make it into Ubuntu 18.04 LTS. The one that 18.04 has is 1.2.2 which was released 6 years ago.

Could we remove or replace that version check line with xprop -help 2>&1 /dev/null since it was just to make sure xprop command is there and working?

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024

Thanks for the report, should be fixed in 1.14.4.

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024

seriously?

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024

in which version was -grammar introduced? seems like -help and -version are only available in some versions and were introduced at different points in time.

from done.

ammgws avatar ammgws commented on September 27, 2024

https://gitlab.freedesktop.org/xorg/app/xprop/-/commit/23e375f3842b433b0af7f150135537f7381208ae

Grammar existed at least 12 years ago, I think it's a pretty safe bet.

Edit:
https://gitlab.freedesktop.org/xorg/app/xprop/-/commit/4cc997bd2d02961b95bff992f6dbfa30138879a9

Even 16 years ago it was there (on mobile so can't check further but that looks like the initial commit for xprop). Also it looks like -help was around then as well, so I have no idea why it's not working for some users.

from done.

ammgws avatar ammgws commented on September 27, 2024

@lephuongbg the version you linked to has -help as an option in the manpage. Any idea why it's telling you it's an invalid option?

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024

-help will fail if xprop cannot connect with the configured $DISPLAY. thats the odd behaviour which make the command be useful to us in the first place.

Is it possible that the command is failing but not because of -help, as we are expecting?

from done.

lephuongbg avatar lephuongbg commented on September 27, 2024

@lephuongbg the version you linked to has -help as an option in the manpage. Any idea why it's telling you it's an invalid option?

I assumed it is an invalid option due to its return code. Re-checked and in the man page it does list -help as an option. So xprop -help seems to fail due to other reason.

from done.

franciscolourenco avatar franciscolourenco commented on September 27, 2024

@lephuongbg what is the result of printenv DISPLAY?

from done.

jriddy avatar jriddy commented on September 27, 2024

Filed that PR #78, unfortunately launchpad seems to be having trouble so I can't file a bug with the x11-utils maintainers for this yet.

08:21:29 $ dpkg -S /usr/bin/xprop
x11-utils: /usr/bin/xprop


08:21:39 $ apt-cache show x11-utils
Package: x11-utils
Architecture: amd64
Version: 7.7+3build1
Multi-Arch: foreign
Priority: optional
Section: x11
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 635
Depends: libc6 (>= 2.15), libfontconfig1 (>= 2.11.94), libfontenc1, libgl1-mesa-glx | libgl1, libx11-6, libx11-xcb1, libxaw7, libxcb-shape0, libxcb1 (>= 1.6), libxcomposite1 (>= 1:0.3-1), libxext6, libxft2 (>> 2.1.1), libxi6, libxinerama1, libxmu6, libxmuu1, libxrandr2 (>= 2:1.2.0), libxrender1, libxt6, libxtst6, libxv1, libxxf86dga1, libxxf86vm1
# ...

from done.

ammgws avatar ammgws commented on September 27, 2024

@jriddy I ended up sending a PR upstream so if it gets accepted it should hopefully make it's way down to the various distros soon (well at least Arch should be quick anyway).
https://gitlab.freedesktop.org/xorg/app/xprop/-/merge_requests/2

from done.

jriddy avatar jriddy commented on September 27, 2024

@jriddy I ended up sending a PR upstream so if it gets accepted it should hopefully make it's way down to the various distros soon (well at least Arch should be quick anyway).
https://gitlab.freedesktop.org/xorg/app/xprop/-/merge_requests/2

Yeah I use Debian/Ubuntu (I know I'm lame) where this won't get rolled out for another 6 months - 2 years 😂

from done.

jriddy avatar jriddy commented on September 27, 2024

No prob, thanks for the useful tool!

from done.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.