_OB_APP_* not populated

Jakub Piskorz <jakub.piskorz-UNxBk3u0Mol8UrSeD/[email protected]> Wed, 11 Jul 2018 11:31:51 +0200
Newsgroups gmane.comp.window-managers.openbox
Message-ID <CACB-Majq+ZQ7BOTppAte_zCr44=GftYiQreWV8t43tWovzsunw@mail.gmail.com>
--===============3430651904990566398==
Content-Type: multipart/alternative; boundary="000000000000a5cd570570b5eaf6"

--000000000000a5cd570570b5eaf6
Content-Type: text/plain; charset="UTF-8"

Hello,

I'm trying to run openbox on a custom buildroot based system. Window
manager seems to start fine, I can launch apps like xterm or custom
xcb apps. And I can change rc.xml to modify appearance (like contents of
the title bar).

But I'm not able to customize application look because filters are not
matched. When I'm checking obxprop, the _OB_APP_* variables are not
populated:

# DISPLAY=:0 obxprop --id 8388621
WM_STATE(WM_STATE) = 1, 0
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP,
_NET_WM_ACTION_SHADE, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_MOVE,
_NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN,
_NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT,
_NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW, _OB_WM_ACTION_UNDECORATE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 1, 1, 18, 5
_NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 18, 5
_NET_WM_STATE(ATOM) =
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Unnamed Window"
_OB_APP_GROUP_CLASS(UTF8_STRING) =
_OB_APP_GROUP_NAME(UTF8_STRING) =
_OB_APP_CLASS(UTF8_STRING) =
_OB_APP_NAME(UTF8_STRING) =
_OB_APP_ROLE(UTF8_STRING) =
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "Unnamed Window"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "Unnamed Window"
WM_PROTOCOLS(ATOM) = WM_DELETE_WINDOW
_NET_WM_PID(CARDINAL) = 2524
WM_CLIENT_LEADER(WINDOW) = 8388621
WM_LOCALE_NAME(STRING) = "C"
WM_CLASS(STRING) = "xterm", "XTerm"
WM_HINTS(WM_HINTS) = 39, 1, 1, 8388626, 0, 0, 0, 8388628, 0
WM_NORMAL_HINTS(WM_SIZE_HINTS) = 856, 0, 0, 484, 316, 10, 17, 0, 0, 6, 13,
0, 0, 0, 0, 4, 4, 1
WM_CLIENT_MACHINE(STRING) = "nuc"
WM_COMMAND(STRING) = "xterm"
WM_ICON_NAME(STRING) = "xterm"
WM_NAME(STRING) = "xterm"

(I do not have mouse there, so I need to run obxprop with --id param).

Googling that issue yields literally no results, all options are for
filtering rc.xml based on valid _OB_APP_NAME...

I have no idea what is going on so I'll attach all info which may be
relevant:

I'm starting openbox directly from xinitrc, which is triggered by
startx command launched by systemd.

Here is my startx unit file:

# cat /etc/systemd/system/multi-user.target.wants/x.service
[Unit]
After=systemd-user-sessions.service

[Service]
ExecStart=/bin/startx -- -nolisten tcp -s off -dpms -nocursor vt1

[Install]
WantedBy=multi-user.target

System has only root account. Xterm is started through
/etc/xdg/openbox/autostart.

Here is xinitrc:

# cat /etc/X11/xinit/xinitrc
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

feh --no-fehbg --image-bg black --bg-center /usr/share/ui/logo.png &
exec openbox-session

Please, I'm pulling my hair off with this, any help will be appreciated.

--000000000000a5cd570570b5eaf6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I&#39;m trying to run openbox on=
 a custom buildroot=C2=A0based system. Window manager seems to start fine, =
I can launch apps like xterm or custom xcb=C2=A0apps. And I can change rc.x=
ml to modify appearance (like contents of the title bar).</div><div><br></d=
iv><div>But I&#39;m not able to customize application look because filters =
are not matched. When I&#39;m checking obxprop, the _OB_APP_* variables are=
 not populated:<br><br><div># DISPLAY=3D:0 obxprop --id 8388621=C2=A0</div>=
<div>WM_STATE(WM_STATE) =3D 1, 0</div><div>_NET_WM_DESKTOP(CARDINAL) =3D 0<=
/div><div>_NET_WM_ALLOWED_ACTIONS(ATOM) =3D _NET_WM_ACTION_CHANGE_DESKTOP, =
_NET_WM_ACTION_SHADE, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_MOVE, _NET_WM_AC=
TION_MINIMIZE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_AC=
TION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_ABOVE, _NE=
T_WM_ACTION_BELOW, _OB_WM_ACTION_UNDECORATE</div><div>_KDE_NET_WM_FRAME_STR=
UT(CARDINAL) =3D 1, 1, 18, 5</div><div>_NET_FRAME_EXTENTS(CARDINAL) =3D 1, =
1, 18, 5</div><div>_NET_WM_STATE(ATOM) =3D=C2=A0</div><div>_OB_APP_TYPE(UTF=
8_STRING) =3D &quot;normal&quot;</div><div>_OB_APP_TITLE(UTF8_STRING) =3D &=
quot;Unnamed Window&quot;</div><div>_OB_APP_GROUP_CLASS(UTF8_STRING) =3D=C2=
=A0</div><div>_OB_APP_GROUP_NAME(UTF8_STRING) =3D=C2=A0</div><div>_OB_APP_C=
LASS(UTF8_STRING) =3D=C2=A0</div><div>_OB_APP_NAME(UTF8_STRING) =3D=C2=A0</=
div><div>_OB_APP_ROLE(UTF8_STRING) =3D=C2=A0</div><div>_NET_WM_VISIBLE_ICON=
_NAME(UTF8_STRING) =3D &quot;Unnamed Window&quot;</div><div>_NET_WM_VISIBLE=
_NAME(UTF8_STRING) =3D &quot;Unnamed Window&quot;</div><div>WM_PROTOCOLS(AT=
OM) =3D WM_DELETE_WINDOW</div><div>_NET_WM_PID(CARDINAL) =3D 2524</div><div=
>WM_CLIENT_LEADER(WINDOW) =3D 8388621</div><div>WM_LOCALE_NAME(STRING) =3D =
&quot;C&quot;</div><div>WM_CLASS(STRING) =3D &quot;xterm&quot;, &quot;XTerm=
&quot;</div><div>WM_HINTS(WM_HINTS) =3D 39, 1, 1, 8388626, 0, 0, 0, 8388628=
, 0</div><div>WM_NORMAL_HINTS(WM_SIZE_HINTS) =3D 856, 0, 0, 484, 316, 10, 1=
7, 0, 0, 6, 13, 0, 0, 0, 0, 4, 4, 1</div><div>WM_CLIENT_MACHINE(STRING) =3D=
 &quot;nuc&quot;</div><div>WM_COMMAND(STRING) =3D &quot;xterm&quot;</div><d=
iv>WM_ICON_NAME(STRING) =3D &quot;xterm&quot;</div><div>WM_NAME(STRING) =3D=
 &quot;xterm&quot;</div><div><br></div><div>(I do not have mouse there, so =
I need to run obxprop=C2=A0with --id param).</div><div><br></div><div>Googl=
ing that issue yields=C2=A0literally no results, all options are for filter=
ing rc.xml based on valid _OB_APP_NAME...</div><div><br></div><div>I have n=
o idea what is going on so I&#39;ll attach all info which may be relevant:<=
/div><br>I&#39;m starting openbox=C2=A0directly from xinitrc, which is trig=
gered by startx=C2=A0command launched by systemd.<br><br>Here is my startx=
=C2=A0unit file:</div><div><br></div><div><div># cat /etc/systemd/system/mu=
lti-user.target.wants/x.service=C2=A0</div><div>[Unit]</div><div>After=3Dsy=
stemd-user-sessions.service</div><div><br></div><div>[Service]</div><div>Ex=
ecStart=3D/bin/startx -- -nolisten tcp -s off -dpms -nocursor vt1</div><div=
><br></div><div>[Install]</div><div>WantedBy=3Dmulti-user.target</div></div=
><div><br></div><div>System has only root account. Xterm is started through=
 /etc/xdg/openbox/autostart.<br><br>Here is xinitrc:</div><div><br></div><d=
iv><div># cat /etc/X11/xinit/xinitrc</div><div>#!/bin/sh</div><div><br></di=
v><div>userresources=3D$HOME/.Xresources</div><div>usermodmap=3D$HOME/.Xmod=
map</div><div>sysresources=3D/etc/X11/xinit/.Xresources</div><div>sysmodmap=
=3D/etc/X11/xinit/.Xmodmap</div><div><br></div><div># merge in defaults and=
 keymaps</div><div><br></div><div>if [ -f $sysresources ]; then</div><div>=
=C2=A0 =C2=A0 xrdb -merge $sysresources<br></div><div>fi</div><div><br></di=
v><div>if [ -f $sysmodmap ]; then</div><div>=C2=A0 =C2=A0 xmodmap $sysmodma=
p</div><div>fi</div><div><br></div><div>if [ -f &quot;$userresources&quot; =
]; then</div><div>=C2=A0 =C2=A0 xrdb -merge &quot;$userresources&quot;</div=
><div>fi</div><div><br></div><div>if [ -f &quot;$usermodmap&quot; ]; then</=
div><div>=C2=A0 =C2=A0 xmodmap &quot;$usermodmap&quot;</div><div>fi</div><d=
iv><br></div><div># start some nice programs</div><div><br></div><div>if [ =
-d /etc/X11/xinit/xinitrc.d ] ; then</div><div>=C2=A0for f in /etc/X11/xini=
t/xinitrc.d/?*.sh ; do</div><div>=C2=A0 [ -x &quot;$f&quot; ] &amp;&amp; . =
&quot;$f&quot;</div><div>=C2=A0done</div><div>=C2=A0unset f</div><div>fi</d=
iv><div><br></div><div>feh --no-fehbg --image-bg black --bg-center /usr/sha=
re/ui/logo.png &amp;</div><div>exec openbox-session</div></div><div><br></d=
iv><div>Please, I&#39;m pulling my hair off with this, any help will be app=
reciated.</div></div>

--000000000000a5cd570570b5eaf6--

--===============3430651904990566398==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kb3BlbmJveCBt
YWlsaW5nIGxpc3QKb3BlbmJveEBpY2N1bHVzLm9yZwpodHRwOi8vaWNjdWx1cy5vcmcvbWFpbG1h
bi9saXN0aW5mby9vcGVuYm94

--===============3430651904990566398==--