Skip to content

lnav::paths::dotlnav should not default to / if HOME is unset #1702

@eMPee584

Description

@eMPee584

lnav version
v0.13.2-1

When starting lnav on a recovery-console or on a tty, currently it will splutter its DB files into the root filesystem which is.. uhm 😒
Solved this for my use case with following /etc/systemd/system/lnav@tty11.service but, maybe a more sane default behaviour can be set up in the source as well?

# lnav log viewer on VT11

[Unit]
Description=log navigator %I
ConditionPathExists=/dev/tty0

[Service]
RuntimeDirectory=lnav-%I
WorkingDirectory=/run/lnav-%I
ExecStart=/bin/sh -c "exec /bin/journalctl -af | HOME=$RUNTIME_DIRECTORY lnav"
Type=idle
Restart=always
RestartSec=1
TTYPath=/dev/%I
StandardInput=tty
StandardOutput=tty

[Install]
WantedBy=basic.target

Not exactly a bug, but can't remove the tag now, sorry xD

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions