Well past this point, having seemingly resolved it (or, rather, got through to the
next layer, or two, of problems), but from
"[...] remove /tmp/.X0-lock and start again.”
“cannot remove ‘/.tmp/.X0.lock’: no such file or directory”.
...perhaps the difference between
/tmp/.X0-lockand
/.tmp/.X0.lock...could just be a transcribing error on here, but if you need to know more about what you're prodding and poking here then do ask. You've got some good knowledgable guys here.
And though you were told to use nano to read a logfile, perhaps get to know about one or other of
more,
most or
less commands (essentially the same, from your perspective, despite perhaps it looking like you have opposits there). You can either pipe another unpaginated output (e.g.
cat filename.ext | more, or
cat filename.ext | less, which will paginate it and let you scan it in ways that the respective man-pages should explain) or give whichever command the filename directly (e.g.
less filename.ext, or the rest) and it'll work on that rather than the piped stream of output from something else. Depends what you want to manually move through, and perhaps more useful piped from a grep command, if you know how to do the appropriate grep-Fu on something but still get far too much/too quick an output.
There's also things like the
tail command. Either piping in or naming the file, it'll (by default) return the last ...10..? lines. I tend to give it the number of lines I want, e.g.
tail -n 35 filename.ext (check the man pages for other things, also to make sure I'm not too used to using a funny version!), or
head [various options] filename.ext to see the intro lines instead. Because sometimes you want to see how logfile started instead of/as well as how it finished, but are probably not bothered about much of the middle. You can
cat the file and take the bits that don't scroll off the top or more/less/etc it and quit once you've scanned the bit you want, but if you know you can save time. And, at others, you can find they work best for you in a shell-scripted review process, and/or in onward piping. Say "from the last 100 lines, display all lines that don't include something(s) mundane enough to skip, but then display them
sorted (and perhaps rolling duplicate lines into just one unique example each) by some useful criteria"... which may not be a common need, but knowing how to do all that manually, and/or by an alias/shellscript for frequently repeated needs, will almost certainly make you able to handle many not so convoluted command-line needs in future.
No rush, but (especially if you lose the GUI again) understanding the shell environment and the usual complement of built-in/near-as-damnit-built-in shell commands can be rewarding. And, at times, inspiring. Well, maybe.