You are not logged in.

#1 2024-02-27 22:02:14

fib_nm
Member
Registered: 2024-02-27
Posts: 23

[SOLVED] xprop and xwininfo with no arguments do nothing

When I run

xprop

with no arguments, it should change my cursor to crosshair and let me select a window, but it does none of that. My cursor doesn't change and nothing happens when I click any windows, so I have to stop it with ctrl+c.
Typing xprop with arguments seem to work though: when i type

xprop -help

it outputs

usage:  xprop [-options ...] [[format [dformat]] atom] ...

where options include:
    -help                          print out a summary of command line options
    -grammar                       print out full grammar for command line
    -display host:dpy              the X server to contact
    -id id                         resource id of window to examine
    -name name                     name of window to examine
    -font name                     name of font to examine
    -remove propname               remove a property
    -set propname value            set a property to a given value
    -root                          examine the root window
    -len n                         display at most n bytes of any property
    -notype                        do not display the type field
    -fs filename                   where to look for formats for properties
    -frame                         don't ignore window manager frames
    -f propname format [dformat]   formats to use for property of given name
    -spy                           examine window properties forever
    -version                       print program version

I also got it to work with discord, because it's the only window, which name I guessed. To

xprop -name Discord

it outputs

WM_CLASS(STRING) = "Discord", "Discord"
WM_COMMAND(STRING) = { "Discord" }
WM_CLIENT_LEADER(WINDOW): window id # 0xe00001
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "archlinux"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified size: 10 by 10
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
WM_ICON_NAME(STRING) = "Discord"
_NET_WM_ICON_NAME(UTF8_STRING) = "Discord"
WM_NAME(STRING) = "Discord"
_NET_WM_NAME(UTF8_STRING) = "Discord"

I also tried xwininfo, but it has the same issue: it works with

xwininfo -help

and

xwininfo -name Discord

but when I type just

xwininfo

it outputs

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

but nothing happens when I click any windows.

Last edited by fib_nm (2024-02-28 07:46:16)

Offline

#2 2024-02-27 23:00:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

loginctl session-status

Offline

#3 2024-02-27 23:13:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,231

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

To preempt what seth is thinking...

You're on wayland and xprop will only work for xwayland clients. What's your actual goal? Do you need to find out window names for hyprland or sway or so? they likely come with their own querying tools.

Offline

#4 2024-02-28 07:23:24

fib_nm
Member
Registered: 2024-02-27
Posts: 23

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

seth wrote:
loginctl session-status

3 - fib_nm (1000)
  Since: Wed 2024-02-28 10:14:56 MSK; 1min 44s ago
  State: active
Leader: 1329 (gdm-session-wor)
   Seat: seat0; vc2
    TTY: tty2
Remote: no
Service: gdm-password
   Type: wayland
  Class: user
   Idle: no
   Unit: session-3.scope
         ├─1329 "gdm-session-worker [pam/gdm-password]"
         ├─1409 /usr/lib/gdm-wayland-session /usr/bin/gnome-session
         └─1414 /usr/lib/gnome-session-binary

Feb 28 10:14:57 archlinux systemd[1]: Started Session 3 of User fib_nm.

Offline

#5 2024-02-28 07:25:45

fib_nm
Member
Registered: 2024-02-27
Posts: 23

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

V1del wrote:

To preempt what seth is thinking...

You're on wayland and xprop will only work for xwayland clients. What's your actual goal? Do you need to find out window names for hyprland or sway or so? they likely come with their own querying tools.

I need to get window classes.

Upd: Ok, for some reason I thought I was on X, but according to output of Seth's command, I am on Wayland. I searched for xprop analog for wayland and found a tool which works for me: https://unix.stackexchange.com/question … in-wayland.
So, I think the question can be closed. Thanks a lot for helping me to figure it out.

Last edited by fib_nm (2024-02-28 07:48:23)

Offline

#6 2024-02-28 07:51:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

https://unix.stackexchange.com/question … in-wayland
https://aur.archlinux.org/packages/wlprop is a script around swaymsg and will in all likelyhood not work on gnome.

I need to get window classes.

Why?
(If the answer is "for xdotool, wmctrl, etc": think about it…)

Edit: F**5

Last edited by seth (2024-02-28 07:52:22)

Offline

#7 2024-02-29 16:23:57

fib_nm
Member
Registered: 2024-02-27
Posts: 23

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

Why?

I wanted to use imwheel, but it didn't work, and I read it doesn't work on wayland. So I'll need to find another way to change my scrolling speed.

https://aur.archlinux.org/packages/wlprop is a script around swaymsg and will in all likelyhood not work on gnome.

I didn't use this program, I used alt+f2 algorithm from most liked answer. It shows wmclasses, but it seems like I can't copy them, which a little sad.

Offline

#8 2024-02-29 16:28:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,231

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

You need to be able to adjust scrolling "speed" in GNOME itself that's what wayland compositors do -- unlikely speed can be affected here but how many lines should get scrolled on a tick. FWIW, what mouse exactly? And is it too sensitive, do you want to slow it down? A logitech perhaps?  Try blacklisting hid-logitech-hidpp.

Offline

#9 2024-03-01 18:45:16

fib_nm
Member
Registered: 2024-02-27
Posts: 23

Re: [SOLVED] xprop and xwininfo with no arguments do nothing

I have A4TECH X87 mouse, and its scrolling speed is too slow in libreoffice writer. In all other windows it is alright, so I wanted to change it only in that application. It is also very slow in nvim output window, but there I at least have keybinds (like g and G), so I don't need to fix it there as much as in libreoffice.

Offline

Board footer

Powered by FluxBB