How to kill app (Files)?

i connected my phone (Google Pixel) to Fedora 40WS. I was busy transferring files when I accidentally unplugged cable. It obviously gave an error, and I connected phone back in. but now everything in Files app is completely hung/frozen. I have tried everything I can think of, unplugged and replugged phone several times, and did CTRL-Q (guessed at that one) to quit Files app. I did it twice to kill both open Files windows, and they closed and the Files app closed. I reopened it and still it’s not letting me do anything, can’t open any folders, just no response, including clicking on the X top right.

I have no idea how to force quit stuff on Fedora, I used to use ‘Force Quit’ on Macs, or CTRL-ALT-DEL on Windows many moons ago, but have no idea how to do it on Fedora. I suspect I will have to reboot the machine, which will be a real pain, so asking here first. Thanks

You probably need to work from the command line to fix that.

ps aux | grep USERNAME | grep nautilus should provide a list of all open processes for nautilus (files).

Once you have that list then the second column is the process id (pid) that is running.
Use sudo kill -9 <pid> <pid> <pid> ... to kill all those processes that may be hanging.
Put the pid numbers in reverse order in the list to be killed (highest number first) and be careful to enter only the pids in the list and enter them carefully.

Once the kill has completed then run the ‘ps aux’ command again to verify that all the processes are killed. You may need to repeat more than once.

Once all the processes that are hanging are killed then you should be able to start the nautilus (files) app again and have it work properly.

1 Like

It is more efficient to use killall or pkill.

3 Likes

Much appreciated, would prefer if there was a GUI “kill” button somewhere, but I guess that’s part of moving to Linux!!
Thanks

If there was then it could only handle what the developer decided to implement and would not be nearly as flexible as using the cli where the user can see the command and its results.

Remember one thing (and we often see topics here about it with gnome software and others);
A gui app can only do what the developer codes it for and the messages are usually very limited.
The cli interface provides much more information when there are problems.

2 Likes

I think there is. . . at least that’s how I use it.

When I have issues with a program in Gnome, I hit Super and the X that hovers over the app. This has worked for me.

Looking at it closely, the x in red is the close the application, but when in Super you see this magnified X in grey (for me. . . due to themes) .

2 Likes

The GUI app displaying user processes would be System Monitor (gnome-system-monitor). On the Processes tab click on the process you want to terminate, then click on the End Process button wich appears at the bottom of the window.

As others have said, not as powerful and as fast as terminal commands, but might suit your needs.

4 Likes

Thanks, Yes I did actually try that but Files was still playing up. It solved itself in the end, but I know I will need to kill something again in the future so thread is still useful for me.

2 Likes

EXCELLENT!! Thanks.
It doesn’t sort into apps, only processes, but I can work with it. Thanks, I hadnt seen that app before

1 Like

To force quit the Files app on Fedora, open a terminal and use the command xkill. This will change your cursor to a crosshair; click on the frozen Files window to kill it. Alternatively, you can use the System Monitor: open it from the applications menu, find the Files app in the list, right-click on it, and select “Kill.” If neither method works, rebooting the machine might be necessary.

1 Like