Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] tuigreet weird prompt
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 1:31 am    Post subject: [SOLVED] tuigreet weird prompt Reply with quote

Hi, I'm having a problem with tuigreet.

I installed it with Portage, I ran the command

Code:
sicro@sicro ~ $ rc-update add display-manager default


and configured the following files as stated in this section the guide

Code:
sicro@sicro ~ $ cat /etc/conf.d/display-manager
CHECKVT=7
DISPLAYMANAGER="greetd"

sicro@sicro ~ $ cat /etc/greetd/config.toml
[terminal]
vt = 7

[default_session]
command = "tuigreet --cmd 'dbus-launch sway'"
user = "greetd"


After booting up, the border of the prompt is made of weird characters, as shown in this picture.

I tried putting vt = 9 (a random higher number) in cat /etc/greetd/config.toml, but it didn't worked. I also tried with "current" and "next" but it became literally unusable.

I'm not sure how to debug this or if I'm doing something wrong. Could someone lead me to the right track?


Last edited by sicr0 on Sun Dec 04, 2022 8:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 11:48 am    Post subject: Reply with quote

It looks like either wrong locale settings or wrong terminal settings...

Have you configured a UTF8 locale? See: https://wiki.gentoo.org/wiki/Localization/Guide

Please post the output of
Code:
locale -a
locale
cat /etc/env.d/02locale
eselect locale list
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 5:58 pm    Post subject: Reply with quote

Thanks Mike, I suspected the same thing, but it appears that this is not the case (correct me if I'm wrong)

Code:
sicro@sicro ~ $ locale -a
C
C.utf8
en_US.utf8
POSIX

sicro@sicro ~ $ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

sicro@sicro ~ $ cat /etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US.utf8"

sicro@sicro ~ $ eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   en_US.utf8 *
  [4]   POSIX
  [ ]   (free form)
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 7:14 pm    Post subject: Reply with quote

Okay, that looks good!

The display manager will be started from init. Therefore, it may have different settings.

Please edit file /etc/init.d/display-manager and add the lines below to the function setup_dm():
Code:
        locale > /tmp/test.txt
        export | grep TERM >> /tmp/test.txt

It should look like:
Code:
setup_dm() {
        local MY_XDM

        locale > /tmp/test.txt
        export | grep TERM >> /tmp/test.txt

        MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')
        case "${MY_XDM}" in

Then, restart your computer and post the file /tmp/test.txt.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 7:24 pm    Post subject: Reply with quote

This is the output of

Code:
sicro@sicro ~ $ cat /tmp/test.txt
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
export TERM="linux"


Really weird, is it maybe that I'm missing a package or some USE flag somewhere that breaks UTF-8 display?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 7:27 pm    Post subject: Reply with quote

That looks good as well!

Let me try it on my machine. I'll come back after that.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 7:30 pm    Post subject: Reply with quote

Alright, thanks for helping me :)
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 7:39 pm    Post subject: Reply with quote

Okay, it works on my machine. It doesn't seem to be a general problem.

Please post your file /etc/conf.d/consolefont.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 7:50 pm    Post subject: Reply with quote

This is the content of the file

Code:
sicro@sicro ~ $ cat /etc/conf.d/consolefont
# The consolefont service is not activated by default. If you need to
# use it, you should run "rc-update add consolefont boot" as root.
#
# consolefont specifies the default font that you'd like Linux to use on the
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
consolefont="default8x16"

# consoletranslation is the charset map file to use.  Leave commented to use
# the default one.  Have a look in /usr/share/consoletrans for a selection of
# map files you can use.
#consoletranslation="8859-1_to_uni"

# unicodemap is the unicode map file to use. Leave commented to use the
# default one. Have a look in /usr/share/unimaps for a selection of map files
# you can use.
#unicodemap="iso01"


Just in case, these are the services I have activated

Code:
sicro@sicro ~ $ rc-update show
               binfmt | boot
            bluetooth |      default
             bootmisc | boot
              cgroups |                                 sysinit
                 dbus |      default
                dcron |      default
                devfs |                                 sysinit
      display-manager |      default
                dmesg |                                 sysinit
              elogind | boot
                 fsck | boot
             hostname | boot
              hwclock | boot
                  iwd |      default
              keymaps | boot
            killprocs |                        shutdown
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork
           localmount | boot
             loopback | boot
              modules | boot
             mount-ro |                        shutdown
                 mtab | boot
             netmount |      default
              numlock |      default
               procfs | boot
                 root | boot
         save-keymaps | boot
    save-termencoding | boot
            savecache |                        shutdown
              seedrng | boot
                 swap | boot
               sysctl | boot
                sysfs |                                 sysinit
 systemd-tmpfiles-setup | boot
 systemd-tmpfiles-setup-dev |                                 sysinit
         termencoding | boot
                 udev |                                 sysinit
         udev-trigger |                                 sysinit


Could it be caused by not having the consolefont service activated?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 8:05 pm    Post subject: Reply with quote

Your /etc/conf.d/consolefont looks good.

What about
Code:
grep -i unicode /etc/rc.conf

Does it show
Code:
unicode="YES"

Quote:
Could it be caused by not having the consolefont service activated?

I don't know. It's not activated on my machine either.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Sun Dec 04, 2022 8:19 pm    Post subject: Reply with quote

It isn't shown! After adding that option it works flawlessly.

Thank you very much for the help Mike :D
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Dec 04, 2022 8:28 pm    Post subject: Reply with quote

You're welcome!

Actually, it was your output of 'rc-update show' that helped me. I saw the service "termencoding". I looked at that script and saw that it uses the variable 'unicode' to set the terminal encoding.

Don't forget to remove the echo commands we added to /etc/init.d/display-manager.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Mon Dec 05, 2022 3:09 pm    Post subject: Reply with quote

Go that, it's nice to know how you did it, so next time I can give it a shot before creating a post.
I actually forgot to delete those lines, thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum