Is it possible to replace default getty with yaft?
vkravets opened this issue · comments
I've trying to replace getty with yaft on ArchLinux and made such systemd service:
/usr/lib/systemd/system/yaftvt@.service
[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/yaftvt@tty7.serice /usr/lib/systemd/system/yaftvt@.service
sudo systemctl start yaftvt@tty7.service
sudo systemctl status yaftvt@tty7.service
And I have such output
● yaftvt@tty7.service - Yet Another Framebuffer Terminal on tty7
Loaded: loaded (/usr/lib/systemd/system/yaftvt@.service; 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/yaftvt@tty7.service
├─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
?
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.
@uobikiemukot It's sadly... Are you going to work in this direction? or it's out of scope?
@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?
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
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.