Home » Linux » Emacs… as your default shell?

Emacs… as your default shell?

Posted by: admin January 4, 2018 Leave a comment

Questions:

Is it possible instead of loading /bin/bash, for my terminal to load emacs or emacsclient when I open it up, with a session for eshell? And is it feasible to ssh->screen from an emacs session without running into problems?

I want to do this purely to learn about emacs being as I like it so much.

No hate text, etc please 🙂

Answers:
emacs -f eshell

EDIT:
If you don’t want to start a new emacs you can use emacsclient.

emacsclient -e '(eshell)'

Make sure you have started the server the best way to do it is to add
(server-start) in your . emacs

Questions:
Answers:

You can set your shell to /usr/bin/emacs (or wherever it is) to make it your default shell. It will probably act weird though since Emacs is not a shell. It’s an editor. Programs expect your shell to behave in a certain fashion and Emacs won’t work that way.

You can do an M-xtermret to get a terminal from which you can connect to a remote machine and start a screen. I don’t know about the quality of the emulation though. No harm trying.

Neither of these look useful to me and the former is definitely a trouble maker.

Questions:
Answers:

Just tried running screen from within Emacs (in a shell buffer), but I get the following:


[email protected]:~$ screen -D -R
Clear screen capability required.
[email protected]:~$ 

so I guess that’s not possible. In any case, I don’t see why you’d want this (and I use daily screen + emacs).

Questions:
Answers:

Yes you can. I did for a few months once. A few things act funny most can be tamed. It was a great laugh to see coworkers react when they saw me log in to emacs.

Questions:
Answers:
echo /usr/bin/emacs >> /etc/shells

chsh -s /usr/bin/emacs