Re: [dev] cannot run st

From: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
Date: Fri, 25 Jan 2013 00:25:28 +0100

On Thu, Jan 24, 2013 at 6:47 PM, pancake <pancake_AT_youterm.com> wrote:
> i've been quite busy these last months.. so i was a little disconnected from
> the suckless development... but several months ago i tried to run st on OSX
> without success.. and today i tried to run it on linux (voidlinux) without
> much more luck.

Thank you for reporting this.

> The error I get is this:
>
> $ st
> XOpenIM failed. Could not open input device.
>
> So.. I tried to find the bug and here it is:
>
> run:
> //setlocale(LC_CTYPE, "");
> XSetLocaleModifiers("");
> tnew(80, 24);
>
>
> just commenting the setlocale() makes st to run, so XOpenIM fails because of
> that. (wtf)
>
> I guess this is not the correct solution, what is the purpose of this
> setting the locales?

Look at the setlocale(1) man page of your system. On linux here's the
relevant part:

       If locale is "", each part of the locale that should be
       modified is set according to the environment variables.
       The details are implementation-dependent. For glibc, first
       (regardless of category), the environment variable LC_ALL
       is inspected, next the environment variable with the same
       name as the category (LC_COLLATE, LC_CTYPE, LC_MESSAGES,
       LC_MONETARY, LC_NUMERIC, LC_TIME) and finally the environ‐
       ment variable LANG. The first existing environment vari‐
       able is used. If its value is not a valid locale specifi‐
       cation, the locale is unchanged, and setlocale() returns
       NULL.

> PD: the default font is not installed on OSX by default and without
> antialias it looks like crap

Feel free to add some hints in the FAQ regarding config.h on OSX.

> PD: i wrote a terminal image viewer (tiv) just to have fun with some
> ascii-art rendering algorithms, so i did it in Vala and uses Gdk to load
> images (yeah, i will rewrite it in C at some point, but just wanted to do it
> fast and focus in the image processing code). The program renders the
> pictures in plain text, ansi16, greyscale and ansi256. Works fine in st :)
> you may find the source here:
>
> https://github.com/radare/tiv
>

Cool!
Received on Fri Jan 25 2013 - 00:25:28 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 25 2013 - 00:36:03 CET