You are not logged in.
Hi everybody,
I am trying to use DWM as my WM without any desktop environment.
I have successfully run DWM from my display manager (lightdm) but the keyboard does not respond.
suckless programs: dwm 6.2, dmenu, st
kernel: 5.4.83-1-lts
~/.xsession-errors:
warning: no locale support
X Error of failed request: BadValue (integer parameter out of range for operat>
Major opcode of failed request: 18 (X_ChangeProperty)
Value in failed request: 0x1
Serial number of failed request: 442
Current serial number in output stream: 448
...
X Error of failed request: BadValue (integer parameter out of range for operat>
Major opcode of failed request: 18 (X_ChangeProperty)
Value in failed request: 0x0
Serial number of failed request: 442
Current serial number in output stream: 448
thanks for the help
Last edited by picaso127 (2020-12-21 13:58:28)
Offline
Does the keyboard work™ in lightdm?
How does it not respond (ie. what attempted input fails)?
Please post your xorg log.
Offline
Also show us your config.h.
Offline
dwm/config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
};/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
Offline
my keyboard responds when I am on lightdm, gnome, awesome WM, and when I am switching to another tty.
Xorg log file: http://ix.io/2Im0
I attempted to open ST with the default key binding
Last edited by picaso127 (2020-12-16 22:57:52)
Offline
Please use code tags, not quote tags.
Xorg.0.log but it probably won't matter.
What do you think the "default key binding" is for st?
Can you launch "DISPLAY=:0 st" from another TTY? Does the keyboard work in that window?
Offline
Please use code tags, not quote tags.
Xorg.0.log but it probably won't matter.
What do you think the "default key binding" is for st?
Can you launch "DISPLAY=:0 st" from another TTY? Does the keyboard work in that window?
the default key binding is [Shift]+[Alt]+[Enter] according to the suckless website
the result of "DISPLAY=:0 st" on another tty:
Invalid MIT-MAGIC-COOKIE-1 keycan't open display
the result of "DISPLAY=:0 st" on Gnome-wayland:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 18 (X_ChangeProperty)
Value in failed request: 0x1
Serial number of failed request: 442
Current serial number in output stream: 448
Offline
I tried the key binding for exiting DWM: Shift+Alt+q and it worked!
it seems that the problem is related to ST and no DWM keyboard-configuration
Offline
As a new member, what is the right way to upload my problem with SimpleTerminal?
Do I need to create a new thread and mark this thread as solved
Or do I need to change the name of this thread?
Thanks for the help
Last edited by picaso127 (2020-12-21 13:58:53)
Offline
Please don't bump, just edit your previous post unless somebody has responded.
It's also (and more importantly) the shortcut according to
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
Invalid MIT-MAGIC-COOKIE-1 keycan't open display
Was dwm running as the same user on the other tty at this time?
What do do with this thread depends on whether the problem is to start st at all or to start it via the dwm shortcut.
Can you run dmenu (and st from there)?
Can you run st in a an Xorg (not wayland) session other than dwm?
Offline
Was DWM running as the same user on the other tty at this time?
I'm always running my graphical interface on the default tty (tty7) including DWM.
Offline
What?
The idea was to run X11/DWM (on whatever TTY you like, doesn't matter), then switch to a different TTY, log into that console (as the same user that runs the X11 session) and try to run st from there.
Also
Can you run dmenu (and st from there)?
Can you run st in a an Xorg (not wayland) session other than dwm?
Offline
I ran X11/dwm on my default user and logged in to him from another tty at the same time.
Results:
st
-> can't open display
DISPLAY=:0 st
->
X Error of failed request: BadValue (integer parameter out of range for operat>
Major opcode of failed request: 18 (X_ChangeProperty)
Value in failed request: 0x0
Serial number of failed request: 442
Current serial number in output stream: 448
dmenu_run
->
warning: no locale support
cannot open display
DISPLAY=:0 dmenu_run
->
warning: no locale support
XOpenIM failed: could not open input device
Offline
Can you run st in a a Xorg (not wayland) session other than dwm?
running st on Gnome/Xorg:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 18 (X_ChangeProperty)
Value in failed request: 0x0
Serial number of failed request: 442
Current serial number in output stream: 448
I have tried to look for a reference on X11 website/google for this error but failed to find any information.
Can you explain to me (if you know) what every line in this error means?
Thanks for the help BTW
Last edited by picaso127 (2020-12-18 12:55:41)
Offline
https://tronche.com/gui/x/xlib/window-i … perty.html
st calls that funtion twice or selection and once at its init. The latter wants to set the _NET_WM_PID and the PID is probably garbage because st is dying.
It's not the cause of the failure, run st in gdb and see where it fails.
https://wiki.archlinux.org/index.php/De … _the_trace
Offline
Can you run any other terminal in X, e.g. xterm?
Offline
Can you run any other terminal in X, e.g. xterm?
Xterm runs without any error
Offline
https://tronche.com/gui/x/xlib/window-i … perty.html
st calls that funtion twice or selection and once at its init. The latter wants to set the _NET_WM_PID and the PID is probably garbage because st is dying.
It's not the cause of the failure, run st in gdb and see where it fails.
https://wiki.archlinux.org/index.php/De … _the_trace
Results:
(gdb) exec st
(gdb) run
Starting program: /usr/local/bin/st st
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a92310 in free () from /usr/lib/libc.so.6
Offline
Did you see anything unusual when you built st?
Offline
Starting program: /usr/local/bin/st st
Ah, yeah, what's that?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If the answer to Trilbys question is "a typo", you wanted to enter "bt" in gdb after the segfault ;-)
Otherwise check
strace st
Offline
Starting program: /usr/local/bin/st st
Ah, yeah, what's that?
Sorry, typo.
Just remove the st from the end of the line and you will get my result.
Offline
If the answer to Trilbys question is "a typo", you wanted to enter "bt" in gdb after the segfault ;-)
Otherwise check
strace st
The result of running bt was:
No stack.
And the result of running strace st was
How do I find the cause of the error in the last line?
Offline
Did you see anything unusual when you built st?
I didn't see anything suspicious.
build output:
CFLAGS = -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DVERSION="0.8.4" -D_XOPEN_SOURCE=600 -O1
LDFLAGS = -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype -lfreetype
CC = c99
c99 -I/usr/X11R6/include `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` -DVERSION=\"0.8.4\" -D_XOPEN_SOURCE=600 -O1 -c st.c
c99 -I/usr/X11R6/include `pkg-config --cflags fontconfig` `pkg-config --cflags freetype2` -DVERSION=\"0.8.4\" -D_XOPEN_SOURCE=600 -O1 -c x.c
c99 -o st st.o x.o -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft `pkg-config --libs fontconfig` `pkg-config --libs freetype2`
install output:
mkdir -p /usr/local/bin
cp -f st /usr/local/bin
chmod 755 /usr/local/bin/st
mkdir -p /usr/local/share/man/man1
sed "s/VERSION/0.8.4/g" < st.1 > /usr/local/share/man/man1/st.1
chmod 644 /usr/local/share/man/man1/st.1
tic -sx st.info
7 entries written to /usr/share/terminfo
Please see the README file regarding the terminfo entry of st.
Offline
Trilby wrote:Starting program: /usr/local/bin/st st
Ah, yeah, what's that?
Sorry, typo.
Just remove the st from the end of the line and you will get my result.
That doesn't address the problem. /usr/bin/st can come from the AUR package. /usr/local/bin/st is something else entirely. What is it? Where does it come from? How was it built? Why was it built?
It seems you are building st and installing it manually. Is there a reason for this? Why not use a PKGBUILD? This is a bit tangential in hindsight as /usr/local/bin/st does seem to be a valid / actual build of st, but I wanted to rule out some odd wrapper higher in PATH than an actual /usr/bin/st - that's not the case, which is good, but still a curiosity why you don't use a PKGBUILD to make a proper package.
Last edited by Trilby (2020-12-19 02:20:38)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline