22apr2022_distractionfreewritinglinux.txt

22apr2022_distractionfreewritinglinux.txt

Distraction-Free Writing Using the Linux Command Line Interface in Grub Recovery Mode

It is Friday, and I am not in love. My mood is very sour, as I have not gotten my usual afternoon nap. This exact hour of eight in the evening, I should have just woken up from a two or three hour nap even. But somehow I had to solve some issues and so I had to be up and fiddling about on my laptop, and the issue is still not solved, but at least I have some kind of understanding now.

nano -maw$

My distraction free writing set-up is basically just the nano text editor on the Linux command line interface. I add the options ‘-maw$’ (ignore the quotation marks) when I call up the application. I forgot which the option do what exactly, but basically these combination of symbols and letters after the minus sign, makes nano able to create text files that have text and word wrap as well as automatic justification. I am currently using Linux Mint 20.2 with the Mate Desktop Environment. I consider this my work/writing operating system. This would be my main operating system if it weren’t for this Windows-only software called Internet Download Manager (IDM). It’s just the best video and other things downloading software there is. I have the cracked version. The closest that Linux has to IDM are firedm and Extreme Download Manager. Both are subpar compared to IDM. Because of this I have to still be using Windows alongside Linux Mint. Both these operating systems are in my one laptop. This is called ‘dual-booting’, and I’ve been doing this for a very long time.

Well, so the writing set-up. It’s simple and minimalist and supposedly distraction-free. But before you go and do some writing, first you have to go to your designated folder for your text files. I usually have it placed in /home/myname/writings so that in the terminal I would type (ignore the quote marks):

‘cd /home/myname/writings’

of course, if this folder hasn’t been made, you have to create it:

‘mkdir /home/myname/writings’

then so it would be able to be modified, you have to modify permissions using chmod:

‘chmod 755 writings’ [there are several number combos to this. study them.]

also change the ownership to you:

‘chown myname:myname writings

then use ‘ls -ltr’ to check on the permissions and ownership details.

once everything is okay, you can now move to that directory/folder and do your writing in nano:

‘cd /home/myname/writings’

then:

‘nano -maw$’ then hit enter

You should be learning the commands of nano to be able to at least fiddle about with the texts and paragraphs you created.

I know this is very complicated for the non-tech savvy. I came up with this, or rather stole it somewhere I can’t remember now in order to have that ultimate ‘distraction-free’ writing set-up.

I’ve seen the results online when you search for ‘distraction-free writing’ and it’s mostly hardware – screens with mechanical keyboard combination. As for me, any old laptop will do so long as I can install Linux Mint in it.

For the ultimate distraction-free set-up, I don’t even have to login the graphical user interface, or the regular desktop with the windows and all that stuff. Once the laptop boots and I am facing the grub bootloader, there are options listed. It looks like this, for example:

================================================================

GNU GRUB version 2.04

=================================================================

Linux Mint 20 Mate
Advanced options for Linux Mint 20 Mate
Windows Boot Manager (on /dev/sda2)
Linux Lite 5.8 (20.04) (on /dev/sda*)
Advanced options for Linux Lite 5.8 (20.04) (on /dev/sda8)
UEFI Firmware settings

=================================================================

choose ‘Advanced options for Linux Mint 20 Mate’

then there will be all these options:

=======================================================

Linux Mint 20 Mate, with Linux 5.4.0-109-generic
Linux Mint 20 Mate, with Linux 5.4.0-109-generic (recovery mode)
Linux Mint 20 Mate, with Linux 5.4.0-107-generic
Linux Mint 20 Mate, with Linux 5.4.0-107-generic (recover mode)
Linux Mint 20 Mate, with Linux 5.4.0-26-generic
Linux Mint 20 Mate, with Linux 5.4.0-26-generic (recovery mode)

========================================================

choose any of the options with ‘(recovery mode)’ after it. I usually just choose the topmost one as it’s the fastest way. Once you choose it, there will be this loading screen with lines of code going up from below, like in the movie The Matrix. I like this part. Makes you feel like a hacker. Well anyway, your screen will then have this menu:

========================================================

Recovery Menu (filesystem state: read-only)

resume Resume normal boot
clean Try to make free space
dpkg Repair broken packages
fsck Check all file systems
grub Update grub bootloader
network Enable networking
root Drop to root shell prompt
system-summary System summary

========================================================

(choose ‘root’)

there will be these couple of lines of text at the bottom of your screen:

========================================================

Press Enter for maintenance
(or press Control-D to continue):

=========================================================

(press ‘Enter’, now you have access to a command line, it would look something like this:)

=========================================================

root@karalaptop:~#

=========================================================
=
from here, you can enter the nano -maw$ command as I have stated near the beginning of this write-up. I am writing this just so I have some personal documentation as well of how I’ve been writing these past couple of months, as well as for your edification, dear reader. I apologize for how confusing and unclear and thus unhelpful this may be.

some other fun commands to learn:

‘ls -ltr’
‘clear’
‘wc -w’
(when in nano) ‘ctrl+z’ and then ‘fg’ (so you can run other apps alongside nano)
unlink (used when you want to delete a file or folder/directory)
‘dpkg-reconfigure console-setup’ (tinker with this in order to change the commmand line font)’

some other good command line apps to use:

dict (which is a dictionary)
date (tells you the date and time)
calendar (tells you the date and some interesting events of the days that follow)

========================================================

I’m still learning all these stuff myself, and will probably occasionally look at this document to re-learn and maybe even update it or something.

Essentially, in order to have this distraction-free kind of set-up, you need to learn:

How to dual-boot Windows and Linux Mint
How to configure it so you are able to access the grub bootloader (oftentimes this is automatic, but sometimes there can be issues)
How to do basic terminal or command line interface stuff, like how to navigate, how to create and delete files, how to change permissions.
To do some writing, you need to know how to use nano, the preferred application here.

And that’s it, actually, you now have a distraction-free writing set-up.

shutdown -h now (this is when you’re done writing in nano, and have changed permission and ownership of the file, and you are ready to boot into GUI or Desktop or regular Linux mode)

Once in the regular Linux desktop mode, you just find your folder with the text file you created and then upload it somewhere, like your wordpress account.

============================================

I apologize again if this is so confusing.

============================================

About kara

I just like to read. Used to work in a library. My interests are horror and the gothic imagination, absurd and dark humor, urban legends, and other related unwholesome topics. I write short fiction sometimes. Older stuff: https://www.scribd.com/user/93209/narodnikkki radioactivelizard.wordpress.com
This entry was posted in nonfiction and tagged , , , , , , , , . Bookmark the permalink.

Leave a comment