I'm quite impressed of emacs' org-mode. So I want to use it for note-taking during lectures. To use it "distraction-free" my idea is the following:
I want to register a bash-command, which swaps the x-server session with tty2
and starts emacs with its org-mode. Is it possible to pass my credentials from the x-server session to tty2
(optional)?
By default tty2 is occupied by
init
forgetty
. You can probably change this by removing/etc/init/tty2.conf
, but that was too adventurous for me and the instructions here are for tty9 instead (which is by default unallocated).First, put these commands to
${HOME}/bin/orgmode.sh
or other file:(Use a different value for
USER
as necessary.)Then, execute this bash command (not sure what you meant by register):
Some caveats:
time
command (or a similar dummy) is needed to preventsudo
terminal rearrangements from placingemacs
on your current terminal230400
is there only becausegetty
requires it, other values probably work alsosudo
needs to ask your password and that messes up things, you can first runsudo echo
and then the above command.