Comments (17)
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.
@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. Soxprop -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.
Fixed in v1.14.5, thank you @jriddy and @ammgws
from done.
Looks like it was first added in 2014:
https://gitlab.freedesktop.org/xorg/app/xprop/-/commit/b0ae4b903067017ec7dc19f27d3916d2153410af
from done.
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.
Thanks for the report, should be fixed in 1.14.4.
from done.
seriously?
from done.
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.
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.
@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.
-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 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.
@lephuongbg what is the result of printenv DISPLAY
?
from done.
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.
@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 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.
No prob, thanks for the useful tool!
from done.
Related Issues (20)
- Allow configuring urgency with notify-send for failed commands HOT 1
- tmux window detection broken in fish 3.2
- Did not work on Mac OS (11.4): ps: unsupported exe keyword HOT 5
- Ability to set notification timeout HOT 2
- Variable `$__done_notification_transient` is used but is not defined HOT 1
- Wrong parameter names in README HOT 2
- Consider joining Hacktoberfest HOT 2
- Unexpected and strange error "Unknown command: humanize_duration" HOT 7
- "basename: illegal option -- f" error when using with Tmux HOT 4
- Error messages: "error: process ID out of range" and "basename: missing operand" HOT 7
- How can I test if it's working? HOT 1
- Error printed after command finishes when terminal-notifier is not installed HOT 2
- Notifications not showing on Wayland due to focused window detection HOT 3
- macOS sound improvement HOT 4
- Not working on macOS 14.0 HOT 6
- Using tmux and terminal-notifier causes failure HOT 1
- Is it possible that this could cause Ghostty to hang on long running processes? HOT 11
- Long commands won't return in a root shell on macOS
- Cause slow prompts in WSL
- jq error when having too deep sway window tree
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from done.