[openbox] _OB_APP_* not populated

Jakub Piskorz jakub.piskorz at thaumatec.com
Tue Jul 17 11:56:22 EDT 2018


I'm narrowing down the issue.

I discovered that correct WM_CLASS is available in openbox/client.c
- client_get_session_ids function. But got =
OBT_PROP_GETSS_TYPE(self->window, WM_CLASS, STRING_NO_CC, &ss); returns
true with string array filled with NULLs. Going deeper, I've found that
g_convert function is failing silently. After adding GError I've got the
message: Conversion from character set iso-8859-1 to utf-8 is not supported.

Now, my buildroot is quite bare. I didn't bother to check gconv libs copy
and it was it. After adding missing gconv libraries, my
_OB_APP_NAME(UTF8_STRING)
was populated correctly.

For Openbox it would be nice to log some warning that conversion failed,
now it is just silently ignored.

If someone else is having a similar issue, add this to your buildroot
config:

BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY=y
BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST="ISO8859-1 UNICODE"
BR2_GENERATE_LOCALE="C, C.ISO-8859-1, en_US, en_US.ISO-8859-1"

Yours sincerely,
Jakub Piskorz


Software Engineer
Thaumatec Sp. z o.o.
ul. Mickiewicza 20C, 51-619, Wrocław
Poland
Phone: +48-882-053-705jakub.piskorz at thaumatec.comwww.thaumatec.com


2018-07-11 11:31 GMT+02:00 Jakub Piskorz <jakub.piskorz at thaumatec.com>:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20180717/d41672cc/attachment.html>


More information about the openbox mailing list