7
Contributors
11
Replies
12
Views
7 Years
Discussion Span
Last Post by robinbolt
0

You can kill the process if you want...

ps -e | grep firefox

will give you the processnumber of the Firefox process.

kill processnumber

will kill the process.

0

You can kill the process if you want...


will give you the processnumber of the Firefox process.


will kill the process.

Thanks for your reply but my problem is something different. I don't want to close any web browser. Actually I want to close a file browser like desktop-file browser and so on.
Can you help me. Thanks once again.

0

You can use the same commands (ps & kill) to terminate any application.
I needed something similar once and wrote a small script for it. To automate the commands, I made following (used firefox as example):

ps -e | grep firefox | sed 's/\(.[0-9]*\).*/\1/' | xargs kill
0

Thanks for your valuable reply. Your script is working well to close any firefox already opened. But as I said earlier that my problem is a little bit different. Suppose I open a desktop file browser by going through Places --> Desktop and then I want to colse that opened desktop file browser using command in linux. I am using debiian linux and I need such command in my project to proceed further. I hope you are understanding my problem. I want actually to close file browser window which have been already opened and not a web browser (like firefox). Waiting for your reply ............
Thanking you.....

0

What file browser are you using? Nautilus?

Try:

ps -e | grep nautilus | sed 's/\(.[0-9]*\).*/\1/' | xargs kill

I just used firefox as an example...

0

What file browser are you using? Nautilus?

Try:

ps -e | grep nautilus | sed 's/\(.[0-9]*\).*/\1/' | xargs kill

I just used firefox as an example...

Yes, my file browser is nautilus. I used your script but it once closes the desktop file browser and again reopen it automatically. I have tried the following script to get process id and then kill it as you have done but the result is same.
ps -e | grep nautilus | cut -c2-5 | xargs kill.
One thing which is also a matter of concern that when i use this script and file browser is closed, all the icons from the desktop disappear and no mouse click works over the desktop. What i want is that desktop icons remain appear on the screen and only desktop file browser gets closed.
Thanks...........

0

You can also open a popup menu from file manager windows. To open this popup menu right-click in a file manager window. The items in this menu depend on where you right-click. For example, when you right-click on a file or folder, you can choose items related to the file or folder. When you right-click on the background of a view pane, you can choose items related to the display of items in the view pane.

0

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise

0

This might be valuable for the threadstarter:

top

Will list the processes that are using the most resources.

killall firefox/gnome/what-ever-name-of-process

Will force close that process without you needing to know the pid.

Edited by Computerphile: n/a

0

i have started using linux a few days ago ,,,i want to be a regular user but i dont know much technical thing like in windows.. thnx for the informative posts ..if you have any more info post it too thnx :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.