Conversation
When calling `setxkbmap` in development the `root` user might not have access to the `:0` X display. Maybe there is XDM running or another user is logged in. In that case `setxkbmap` prints Authorization required, but no authorization protocol specified error message in an infinite loop and gets stucked. Additionally the $DISPLAY might be already set so we should honor that value.
imobachgs
left a comment
There was a problem hiding this comment.
It looks good. Thanks!
However, I would prefer that function to live in some kind of "helpers" module because it is not related to localization and it is not that "small" (apart from bringing quite some elements into scope).
I was thinking about that as well, but then I decided to keep it here. It is quite specialized, if we want to move it we should make it more generic and support more use cases (like reading stderr, getting the exit code, etc...). |
Well, it looks generic enough for our use case 😉 But I am fine with keeping it there for a while. Just let's try to not forget that it is there so we do not implement something similar again 😅 |
Prepare for releasing Agama 9. It includes the following pull requests: - #1101 - #1202 - #1228 - #1231 - #1236 - #1238 - #1239 - #1240 - #1242 - #1243 - #1244 - #1245 - #1246 - #1247 - #1248 - #1249 - #1250 - #1251 - #1252 - #1253 - #1254 - #1255 - #1256 - #1257 - #1258 - #1259 - #1260 - #1261 - #1264 - #1265 - #1267 - #1268 - #1269 - #1270 - #1271 - #1272 - #1273 - #1274 - #1279 - #1280 - #1284 - #1285 - #1286 - #1287 - #1288 - #1289 - #1290 - #1291 - #1292 - #1293 - #1294 - #1295 - #1296 - #1298 - #1299 - #1300 - #1301 - #1302 - #1303 - #1304 - #1305 - #1306 - #1307 - #1308 - #1309 - #1310 - #1311 - #1312 - #1313 - #1314 - #1315 - #1316 - #1317 - #1318 - #1319 - #1320 - #1321 - #1322 - #1323 - #1324 - #1325 - #1326 - #1328 - #1329 - #1331 - #1332 - #1334 - #1338 - #1340 - #1341 - #1342 - #1343 - #1344 - #1345 - #1348 - #1349 - #1351 - #1352 - #1353 - #1354 - #1355 - #1356 - #1357 - #1358 - #1359 - #1360 - #1361 - #1362 - #1363 - #1365 - #1366 - #1367 - #1368 - #1371 - #1372 - #1374 - #1375 - #1376 - #1379 - #1380 - #1381 - #1383 - #1384 - #1385 - #1386 - #1387 - #1388 - #1389 - #1391 - #1392 - #1394 - #1395 - #1397 - #1398 - #1399 - #1400 - #1403
Problem
setxkbmapin development therootuser might not have access to the:0X display.setxkbmapprintsSolution
DISPLAYvalue when already setSSH X Forwarding Problem
We need to set the display for the
setxkbmapcall when running on the Live ISO because when running Agama from systemd service theDISPLAYis not set but we need to access the locally running web browser so we have to explicitly set the:0value.When the web server is started manually from a terminal we should keep the current value if it is already set. But using the current
DISPLAYvalue might behave a bit unexpectedly when you login to the system via SSH with X forwarding enabled. In that case thesetxkbmapcall will query and set (!) keyboard of the remote X server. That might be quite confusing.Sure, that is a corner case, but if you select some exotic layout with complete different mapping like Dvorak then it might not be trivial to restore your original layout. When using X forwarding the
DISPLAYis set to something likelocalhost:10.0, so maybe we should use it only when it starts with:character which means the local X server? 🤔Testing