aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-01-10 19:24:46 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-01-13 10:47:33 +0000
commit9873d2732fb513737a2a17dfdfb9a6f2a6722ff8 (patch)
treef03e666d18903df1a10c2970b26c8969fd0fe52b /scripts
parentMerge branch 'improve-mouse-button-multi-click' (diff)
main: present invalid locale errors as a user-notification
Foot does not support running under non-UTF8 locales. If we detect a non-UTF8 locale, we log this and exit with an error. However, it appears a fairly common situation is this: user (knowingly or unknowingly) only configures his/hers locale in e.g. the shell RC files. These aren’t sourced when the compositor is started via a display manager. Thus, compositor key binds will fail to launch, and the user typically has no way of seeing foot’s output. So, the user proceeds to start another terminal, and from that one tries launching foot. And it works... (because the shell in the other terminal sourced the locale configuration). User is left confused and often don’t know how to debug. This patch is somewhat hackish; in addition to logging the locale error, it also pushes a user notification. For this to be visible, we need to actually start a terminal window. So, we ignore the configured shell, and we ignore any custom command line, and instead spawns “/bin/sh -c ‘’”. This allows us to get something running (that hopefully doesn’t produce too much output we can’t decode due to the non-UTF8 locale). But, it will exit immediately. So we also set the --hold flag. This works, and may be a good enough “solution”. However, it only works for standalone foot instances, not footclients.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions