Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to replace default getty with yaft? #31

Open
vkravets opened this issue May 17, 2018 · 5 comments
Open

Is it possible to replace default getty with yaft? #31

vkravets opened this issue May 17, 2018 · 5 comments
Assignees

Comments

@vkravets
Copy link

vkravets commented May 17, 2018

I've trying to replace getty with yaft on ArchLinux and made such systemd service:
/usr/lib/systemd/system/[email protected]

[Unit]
Description=Yet Another Framebuffer Terminal on %I
Documentation=man:yaft(1)
After=systemd-user-sessions.service
After=plymouth-quit-wait.service
Before=getty.target
Conflicts=getty@%i.service
OnFailure=getty@%i.service
IgnoreOnIsolate=yes
ConditionPathExists=/dev/tty0

[Service]
ExecStart=/usr/bin/yaft
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

[Install]
WantedBy=getty.target

and enable and start it by

sudo ln -sf /usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected]
sudo systemctl start [email protected]
sudo systemctl status [email protected]

And I have such output

[email protected] - Yet Another Framebuffer Terminal on tty7
   Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-05-17 10:29:32 EEST; 4s ago
     Docs: man:yaft(1)
 Main PID: 9088 (yaft)
    Tasks: 2 (limit: 4915)
   Memory: 9.7M
   CGroup: /system.slice/system-yaftvt.slice/[email protected]
           ├─9088 /usr/bin/yaft
           └─9091 /bin/bash

мая 17 10:29:32 easysly-acer-v3 systemd[1]: Started Yet Another Framebuffer Terminal on tty7.
мая 17 10:29:32 easysly-acer-v3 bash[9088]: >>WARN<<        ioctl: VT_SETMODE failed (maybe here is not console)
мая 17 10:29:32 easysly-acer-v3 bash[9088]: >>WARN<<        ioctl: KDSETMODE failed (maybe here is not console)
мая 17 10:29:32 easysly-acer-v3 bash[9088]: >>ERROR<<        tcgetattr: Inappropriate ioctl for device
мая 17 10:29:32 easysly-acer-v3 bash[9088]: >>ERROR<<        write: Bad file descriptor

Is VT_CONTROL at conf.h resolve this if set it to false?

@uobikiemukot
Copy link
Owner

Sorry, currently you cannot use yaft as a getty replacement.

You may like this project.
fbgetty is a replacement of getty and it supports framebuffer.

@vkravets
Copy link
Author

@uobikiemukot It's sadly... Are you going to work in this direction? or it's out of scope?

@uobikiemukot
Copy link
Owner

@vkravets At the moment, I think it's not terminal's job.

Why do you want to use yaft as a getty replacement?
Need some terminal features? (256 colors, unicode support, background image or sixel)
Or just avoid having to execute terminal process after login?

@vkravets
Copy link
Author

vkravets commented May 18, 2018

The second one... I've try to check if we in tty mode and call yaft, but still nothing found for fish shell... may you can advice something?

For yours first suggestion there is kmscon but it's seems it's dead ( but idead for kernel fb console is great... If you are interested in it you can look https://github.com/dvdhrm/kmscon

@uobikiemukot
Copy link
Owner

The second one... I've try to check if we in tty mode and call yaft, but still nothing found for fish shell... may you can advice something?

You can automatically start yaft after login like this:

  • $HOME/.bash_profile
# specify host (If you need)
if test "$HOSTNAME" == 'your_hostname'; then
        # check we are in linux console
        if test "$TERM" == 'linux' -a "$SHLVL" == '1'; then
                export FRAMEBUFFER="/dev/fb0"
                export YAFT="wall"
                yaft
        fi
fi

I'm not a fish shell user. But maybe like this?:

  • $HOME/.config/fish/config.fish
if test "$HOSTNAME" = 'your_hostname'; and test "$TERM" = 'linux'; and test "$SHLVL" = '1'
        set -x FRAMEBUFFER "/dev/fb0"
        set -x YAFT "wall"
        yaft
end

For yours first suggestion there is kmscon but it's seems it's dead ( but idead for kernel fb console is great... If you are interested in it you can look https://github.com/dvdhrm/kmscon

Thank you for infomation. I know this project :)
kmscon has rich font rendering feature compared to yaft.

@uobikiemukot uobikiemukot self-assigned this Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants