💾 Archived View for 1436.ninja › Phlog › gmi › 20230331.gmi captured on 2023-12-28 at 15:31:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
Entered: in emacs on Gemini PDA Date: 20230331
So on my Gemini PDA, my phone, and other Android devices, I use bash as my shell. I use direvent to keep my org files and .emacs.d synced with Dropbox, and rsync to also sync these directories with all three of my Pi's at home for redundancy. This is all in scripts that are called from direvent.conf. I also start up the emacs daemon for faster launch. I would run these in my .bashrc as:
direvent &> /dev/null & emacs --daemon &> /dev/null &
This led to getting a line such as:
[1]+ Exit 1
once each command finished. This bothered me. I found a command set +m that the Internet said would stop these messages (this is supposed to stop job control completely, a tad bit sever), but in Termux at least, it does not.
Enter the disown command which detaches processes from the shell. This did in fact do what I wanted. The final commands living in my .bashrc in Termux is:
(direvent ; USER="" emacs --daemon) &>dn & disown -a
Note the USER="" is due to me setting USER to what I want displayed in my PS1, because Android does not let you create a user account usable in Termux. This breaks emacs, so I nullify it before starting the daemon. Also, &>dn this is the redirect for stdout and stderr to /dev/null. I made a symlink thusly:
~/ $ ln -s /dev/null dn
just to shorten up redirecting output.
The disown command has neatened up starting Termux and solved a minor annoyance of mine. It is a small thing, but a morning victory that I will take regardless.