WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: adriconf.tcz not working for my X  (Read 1735 times)

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
adriconf.tcz not working for my X
« on: May 12, 2019, 07:07:45 AM »
Code: [Select]
tc@box:~$ XDG_SESSION_TYPE=x11 adriconf
adriconf running on X11
terminate called after throwing an instance of 'boost::locale::conv::invalid_charset_error'
  what():  Invalid or unsupported charset:ANSI_X3.4-1968
Aborted

or without XDG variable:
t
Code: [Select]
c@btc@box:~$ adriconf
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted
what shoud I do/load? I did not use a desktop manager, just flwm (window manager), and run the from aterm.
but the message is about some charset...
« Last Edit: May 12, 2019, 07:11:16 AM by nick65go »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10038
Re: adriconf.tcz not working for my X
« Reply #1 on: May 12, 2019, 09:45:47 AM »
Google says your locale could be broken. Is it possible you generated mylocale.tcz on a previous TC version? It might need to be re-generated.
The only barriers that can stop you are the ones you create yourself.

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #2 on: May 12, 2019, 10:23:50 AM »
Hi curaga, no locale was generated. I use default lang=C etc. the only 'customisation' is keyboard=gb (in X config) and 'uk' in kmaps. I do not mess with any language (English is enough for me). Not use TZ (for time etc). Just simple interface TC (flwm + wbar, aterm etc).

from aterm, the default variable (using set): 'G_FILENAME_ENCODING='iso8859-1'
other users are welcome to test my finding with bootcode= base, norestore etc...

EDIT: same bad results even after I manualy delete the folders /home/tc/.cache and /var/cache, to avoid possibile fonts cached inside them.

Edit2: the strings about 'conv' and 'ANSI_X' are as originaly:
tc@box:/usr/lib/gconv$ ls -al
drwxr-xr-x    2 root     root           160 Jan 20 15:23 ./
drwxr-xr-x    4 root     root           660 May 12 16:32 ../
-rwxr-xr-x    1 root     root         26616 Jan 20 15:23 ANSI_X3.110.so
-rwxr-xr-x    1 root     root         14328 Jan 20 15:23 ISO8859-1.so
-rwxr-xr-x    1 root     root         14328 Jan 20 15:23 ISO8859-15.so
-rwxr-xr-x    1 root     root         14328 Jan 20 15:23 ISO8859-2.so
-rwxr-xr-x    1 root     root         14344 Jan 20 15:23 UNICODE.so
-rw-r--r--    1 root     root         56352 Jan 20 15:23 gconv-modules
« Last Edit: May 12, 2019, 10:50:36 AM by nick65go »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11014
Re: adriconf.tcz not working for my X
« Reply #3 on: May 12, 2019, 09:33:50 PM »
Things work here with flwm and without the locale set:
Code: [Select]
$ locale
LANG=C
...
$ XDG_SESSION_TYPE=x11 adriconf
adriconf running on X11
Current language code is c
Exception caught: Could not create parser context [but adriconf works]

Were you using Xorg-7.7-3d? What graphics hardware do you have?
« Last Edit: May 12, 2019, 09:52:56 PM by Juanito »

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #4 on: May 13, 2019, 12:52:50 AM »
I used the latest Xorg with 3D acceleration as radeon, not amdgpu. I have a GCN 2.x card (mullins) because AMD A-6000 APU (cpu+gpu) has integrated R4 graphics.
« Last Edit: May 13, 2019, 01:20:15 AM by nick65go »

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #5 on: May 13, 2019, 01:21:00 AM »
fyi: updates in git on 28/04/2019
https://github.com/jlHertel/adriconf/commit/0b3c97b271594802bfc15f7d4fc62439e83ced8e
Code: [Select]
index of /10.x/x86_64/tcz/src/adriconf/
adriconf-1.4.tar.gz                                15-Apr-2019 09:16             2608826
compile_adriconf                                   15-Apr-2019 09:20             811

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11014
Re: adriconf.tcz not working for my X
« Reply #6 on: May 13, 2019, 01:32:31 AM »
Maybe you could compile from the latest git locally and, if it fixes your problem, I'll update it in the repo?

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6838
Re: adriconf.tcz not working for my X
« Reply #7 on: May 13, 2019, 05:41:07 AM »
Hi nick65go
I think curaga has it right. I think the program wants plain 7 bit ASCII (US-ASCII) and is not finding it. Try launching it like this:
Code: [Select]
LANG= XDG_SESSION_TYPE=x11 adriconfThere is a space between  LANG=  and  XDG_SESSION_TYPE. The idea came from:
https://stackoverflow.com/questions/48743106/whats-ansi-x3-4-1968-encoding
If you look at the table here  ANSI_X3.4-1968  is the first entry.
https://www.iana.org/assignments/character-sets/character-sets.xhtml
A couple of other interesting answers:
https://unix.stackexchange.com/questions/67680/what-would-break-if-the-c-locale-was-utf-8-instead-of-ascii

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #8 on: May 13, 2019, 12:20:21 PM »
Finaly, I solved it!
The solution was that I MUST load getlocale.tcz, then is OK, with/without setting the variable LANG=, will not matter:

Code: [Select]
tc@box:~$ adriconf
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted

Code: [Select]
tc@box:~$ XDG_SESSION_TYPE=x11 adriconf
adriconf running on X11
Current language code is c
Exception caught: Could not create parser context
(adriconf:16234): Gtk-WARNING **: 21:09:25.255: Could not find the icon 'list-remove-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from: http://icon-theme.freedesktop.org/releases

Code: [Select]
c@box:~$ LANG=dummy XDG_SESSION_TYPE=x11 adriconf

(process:16246): Gtk-WARNING **: 21:09:37.652: Locale not supported by C library.
        Using the fallback 'C' locale.
adriconf running on X11
Current language code is dummy
Exception caught: Could not create parser context

Fontconfig warning: ignoring dummy: not a valid language tag

(adriconf:16246): Gtk-WARNING **: 21:09:38.489: Could not find the icon 'list-remove-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

no pain, no gain ;) So, should be getlocale.tcz a dependency of adriconf.tcz?

EDIT: And we need a wraper/script (in tce.installed) because the icon from wbar is not working, we need to start it with XDG_SESSION_TYPE=x11 @, as I did in aterm.
« Last Edit: May 13, 2019, 12:38:19 PM by nick65go »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11014
Re: adriconf.tcz not working for my X
« Reply #9 on: May 14, 2019, 12:14:16 AM »
Finaly, I solved it!
The solution was that I MUST load getlocale.tcz, then is OK, with/without setting the variable LANG=, will not matter:
well spotted - I see that if mylocale is loaded onboot without LANG being set and /usr/lib/locale/locale-archive is deleted, adriconf still works  :o

Quote
EDIT: And we need a wrapper/script (in tce.installed) because the icon from wbar is not working, we need to start it with XDG_SESSION_TYPE=x11 @, as I did in aterm.
It's a little more complicated than that - the script would need to detect if x11 or wayland is being used and set XDG_SESSION_TYPE accordingly

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10038
Re: adriconf.tcz not working for my X
« Reply #10 on: May 14, 2019, 12:15:58 AM »
Probably a dependency of getlocale, unless you ran the getlocale script.
The only barriers that can stop you are the ones you create yourself.

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #11 on: May 14, 2019, 12:24:42 AM »
IMHO, I prefer just a small start-up script in adriconf.tcz, to test for necesary variables and initializes them, then start whatever demon if necesary; without loading bloat of locales. Thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11014
Re: adriconf.tcz not working for my X
« Reply #12 on: May 14, 2019, 12:50:06 AM »
Probably a dependency of getlocale..

'not enough coffee this morning - yes, glibc_gconv is what's missing

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11014
Re: adriconf.tcz not working for my X
« Reply #13 on: May 14, 2019, 01:58:39 AM »
IMHO, I prefer just a small start-up script in adriconf.tcz, to test for necesary variables and initializes them, then start whatever demon if necesary; without loading bloat of locales.

proposals for startup script to recognise x11 and wayland gratefully received  :)

No daemon neccessary and no locales needed.

As a temporary fix, I tried changing the desktop file to read:
Code: [Select]
Exec=env XDG_SESSION_TYPE=x11 adriconf..but although I can then start adriconf like this:
Code: [Select]
$ gtk-launch adriconf
adriconf running on X11
Current language code is c
..it will not start from the icon  :(

Offline nick65go

  • Full Member
  • ***
  • Posts: 234
Re: adriconf.tcz not working for my X
« Reply #14 on: May 16, 2019, 02:47:15 PM »
Hi Juanito, may I propose a solution?

the default variable PATH is (i saw it by using 'set'`)
Code: [Select]
PATH='/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/us
so the folder tce.install (from adriconf.tcz) will write the script in ~/.local/bin/adriconf
Code: [Select]
XDG_SESSION_TYPE=x11 /usr/local/bin/adriconf
which will be executed both from menu and wbar, because
in autogenerated ~/.wmx/Applications/adriconf we have
Code: [Select]
#!/bin/sh
exec adriconf

in autogenerated ~/.wbar we have
Code: [Select]
i: /usr/local/share/pixmaps/br.com.jeanhertel.adriconf.png
t: adriconf
c: exec adriconf


« Last Edit: May 16, 2019, 02:59:55 PM by nick65go »