Linux Notice App

Recover the Locked Desktop

 

Even though the Linux operating system is stable, an application running on the computer from time to time can be locked and unable to do anything. It may help to end the application that is running to get rid of these situations, but there is an easy way to get rid of such a situation if you cannot move your mouse.

First, let's try to understand the working principle of Linux. Linux distributions (in fact, Unix-based operating systems are more accurate to say) is designed for multiple users and multi-operation operating systems. In other words, more than one user can operate independently on the system. Therefore, the Linux distribution will be opened as independent terminals at the first startup, one of which is the graphical interface terminal that comes to your screen. The other terminals operate in the background without being visible to the user.

In order to save our system that is locked in accordance with this information, we can continue to use our computer from where we left by switching to another terminal to kill our process.

So let's look briefly about the terminals that run in the background;

The terminals tty1, tty2, tty3, tty4, tty5 and tty6 are text based terminals.

terminal tty7 is the terminal that currently serves you with a graphical interface.

To be able to switch from tty7 terminal with graphic interface you are currently in to other terminals;

For tty1: Press and at the same time

For tty2: Press and simultaneously

For tty3: Press and simultaneously

For tty4: Press and simultaneously

For tty5: Press and simultaneously

For tty6: Press and simultaneously

For tty7: Press and simultaneously

Use and to get back to the graphics terminal.

In this way, when we switch to tty1, the login screen will appear and we will need to login with the user name and password.

Let us enter the system by using our user name and password. After logging into the system, we will list all the processes running and find the process that locates our system in the graphical interface.

To be able to do this, we need to be the root user.

At this stage, when we type "water" or "sudo su" (water: is the abbreviation of superuser), it will ask the root user's password. When we enter the password correctly, we are now logged in to our Linux server via tty1.

From this moment we can control the system from the command line. Let's use the "top" command to list all running processes. (The use of the top command is described in detail in our separate article). The top command will list all the processes in the system. After this stage, we will have to keep our PID ID in mind by finding our process that locks our system from the list. For example, if the application that is locking the system is Firefox, I can see that the PID ID of Firefox is 2695 in the list. We will kill a working process by pressing "K". After pressing the letter "K", the system prompts me to write the PID ID of the process to be killed. I write 2695 and then type -9 (which is the type of signal that is sent to the process for immediate termination of the -9 process).

Then I press and to switch to the terminal with a graphical interface and see that the Firefox application is closed and the system is running again.

Finally, tty1 with the root user to log in again using tty1 keys to exit the top screen, and then exit the command and the root user at the command line and exit one more time to leave tty1 as you find it to remember.

No comments

Powered by Blogger.