this post was submitted on 19 Apr 2024
15 points (82.6% liked)

Linux

5212 readers
71 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
 

Something tells me Fish is not a capable login shell? It was in /etc/shells, but that does not mean it's a login shell right? Would any shell with job control be a login shell? I'm really scared to logout! Any help is appreciated.

PS: What happens if I choose a shell with no job control whatsover, like Marsh, the shell I've been making lately (it has JC, but let's say it doesn't!) a my login shell after force-adding it to '/etc/shells'? What a design flaw! Or is it?

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 6 months ago* (last edited 6 months ago)

Fish works fine as a login shell. If you're worried, you can create a temporary new user with fish as a login shell and test it before switching your current one.

[–] [email protected] 7 points 6 months ago

It's been my login shell for close to a decade probably. Works just fine. It's really not that important.

Unless you log in to a text tty specifically, you don't really need a shell to launch a graphical session. The display manager can directly launch the compositor and everything. Modern systems typically open a logind session through pam_systemd which also sets up your user systemd. It does all the session tracking. It would be a nightmare to use the user's shell and then try to get it to run a command to start the GUI, and lots of weird things could happen like interactive prompts and whatnot. We do way fancier things than a shell typically does, like cgroups and stuff.

[–] [email protected] 5 points 6 months ago

I dont think job control is really a requirement for a logon shell.

[–] [email protected] 3 points 6 months ago

Been using it for years. Works fine. Probably needs some care for some weird things that may want to be exported by some scripts but usually it's easy to workaround.

[–] [email protected] 2 points 6 months ago

I'm really scared to logout! Any help is appreciated.

dood. this fear is as old as unix. the solution as old as multi user login: go to a different terminal/tty/connection and log in as your user. if it works it means it's safe to log out because you can log in again. also always do this when you change your ssh public key on a server. keep one log in open while you try a second login, so you can fix it if it broke.

[–] [email protected] 1 points 6 months ago

Fish is fine as login shell. If you run into trouble on the command line with the * sign for some things the easiest and fastest way around that is to type : bash and when done, type exit (or control d).

[–] [email protected] 1 points 6 months ago (1 children)

i used fish as a login shell for years before i switched to nushell. it’s not super risky. bash is just as capable of having a system breaking config. worst case login as root with a minimal bash config and fix it up from there. if that’s fucked you need a rescue ISO.

[–] [email protected] 2 points 6 months ago

I fucked up my bashrc once. I copied and pasted something meant to be copied and pasted off of our confluence, and it fucked up the path. So, when I'd boot, it'd put me into the desktop environment and nothing could run because the path was unset. Eventually figured out how to boot into shell, looked up the location of a text editor, and removed the offending addition. And then fixed the shit on confluence and checked the edit history to see who fucked it up so I could talk shit about them with my close coworkers.

[–] [email protected] 1 points 6 months ago

It's either going to work or not, and that only depends on your setup. Fish isn't inherently bad, but you might get errors because your machine is trying to run bash commands in fish.

If it doesn't, I'm pretty sure you can just boot a live disk, chroot to change the shell, and reboot.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago) (1 children)

Honestly? I haven't bothered, I just kept bash and made it drop me into fish.
Jank? Yes, but working great so far.

[–] [email protected] 1 points 6 months ago (2 children)

@[email protected] @[email protected] @[email protected] @[email protected] @[email protected] @[email protected]

Thanks a lot. I had reverted it to Zsh, now made it Fish again.

However, there's a problem that I hope this will fix, but I don't count on it. I don't know wtf happened, but whenever I launch a terminal emulator, it just hangs? I have to SIGINT to launch into the shell sessions. I hope this fixes, but what if it won't? What is keeping it? Is there a startup program idling it?

Like, the REPL won't show, just a blank terminal, I use Kitty; but the emulator that is default (GNOME?) won't work either. My full specs are in my Github profile -> github.com/Chubek

Thanks.

[–] [email protected] 1 points 6 months ago

Like, the REPL won’t show, just a blank terminal, I use Kitty; but the emulator that is default (GNOME?) won’t work either.

Here on an Arch Linux install with GNOME, Fish shell is doing fine as login shell on Tilix and GNOME terminal. A search engine search for "fish kitty" does show results which appear to indicate other people with issues.

[–] [email protected] 1 points 6 months ago

Google how to set the default shell for kitty. That's going to be the least problematic solution AFAIK since you're only modifying the user terminal emulator, not the default shell for your entire system.