0

I use a Debian 8 OS in the MacBook Pro with the Parallel Desktop.

At the time I was editing the .bashrc file as root, things get messed up. I can't close the complete black window whatever I try (e.g contr+ z, contr+ x, :wq, :x etc). I'm somehow moved to the BELOW position at the lines of instructions in the image provided(close, save etc) but I can surely type.

enter image description here

I shut down the VM and when I come back again, this is exactly the same. I have some work that needs to be done.

What should I do at this point?

UPDATE

enter image description here

Will it end the current session if I remove as shown?

  • 2
    Did you try to open a second session on the server? In that session you can find the process of the editor and kill it. – Marco Dec 21 '17 at 8:47
  • 2
    The VM must be recovering from a saved state which is why it comes back. You could switch to another TTY with Ctrl+Alt+F1-F12. It's possible the current TTYs PTS is frozen somehow. – jdwolf Dec 21 '17 at 8:47
  • @jdwolf Whats the TTY? I'm new to Linux and VM both – Chaklader Asfak Arefe Dec 21 '17 at 8:48
  • 1
    @Arefe No don't do that. Resume the VM. Press Ctrl+Alt+F2 once its started. – jdwolf Dec 21 '17 at 9:00
  • 2
    To those voting to close this question as unclear: This question is Help! I cannot exit nano!. – JdeBP Dec 21 '17 at 9:40
1

the same nono full black screen

The program is named nano. It is a text editor. The command to exit it is the 1980s-style ⎈ Control+X key chord, that is displayed right there in the 1980s-style menu lines at the bottom of the text editor screen.

the complete black window

This is a virtual terminal a.k.a. virtual TTY being presented by your guest operating system running in the virtual machine. (Yes, it is a virtual thing within a virtual thing.)

You can switch amongst several virtual terminals with the key chords ⎇ Alt+⎈ Control+F1 to ⎇ Alt+⎈ Control+F12, which might be hotkeys for your host operating system or translated by the Parallels Desktop's keyboard translation layer, and which thus you might have to simulate with other key chords in order to send to the guest operating system in the virtual machine.

Of course, the fact that nano's screen is visible on the virtual terminal does not mean that nano is running. Kill the nano process with the KILL signal, for example, which is what you might have done, and one is left with the nano menu lines on screen and the shell prompt somewhere in the middle, mixed up with whatever text one was editing at the time.

In such a situation ⎈ Control+X and ⎈ Control+Z will indeed not appear to do anything. You will have already terminated nano, and the shell input prompt that you are now at does not do anything visible in response to those characters. (⎈ Control+X is the beginning of a multiple-character editing control sequence in emacs mode in ZLE and Bourne Again shell readline.)

Another possibility, hinted at by your claim that ⎇ Alt+⎈ Control+F2 did nothing, and on the assumption that you do know how to send this to the guest operating system through your host operating system's hotkeys and Parallels Desktop's keyboard translation layer, is that the virtual keyboard has a virtual modifier key stuck as depressed.

This is militated against, though, by three things.

  • nano displays a status message next to the menu lines in response to things like ⎇ Alt+⎈ Control+X (although things like ⇮ AltGr+⎈ Control+X can be ignored silently, depending from your chosen keyboard layout);
  • you may already be using virtual terminal #2, in which case switching to it will indeed be a no-op;

    and

  • if the stuck modifier were ⎇ Alt or ⎈ Control, pressing those should have un-stuck it for the guest operating system.

The issue is solved as I get an option to stop the VM later on in the same window than the remove.

After all of the things that people say about exiting emacs, exiting vim, and exiting vi, it is very amusing to see the "solution" to exiting nano presented as being to restart the entire (virtual) machine. ☺

Further reading

|improve this answer|||||
  • This is very informative and I read it briefly as I'm at work now. I will again read the whole after I back in the home. Thank you so much. – Chaklader Asfak Arefe Dec 21 '17 at 11:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.