You are not logged in.

#1 2020-12-08 23:11:14

trilobite
Member
From: Saskatchewan, Canada
Registered: 2017-06-27
Posts: 65

xkill-ing an app, any problem? (usr/bin/xkill)

I have to log into a Windows server through a web browser with a RDP app (remote desktop protocol app).  It doesn't like Firefox - laggy and clunky response. 

So I installed Chromium, which I guess is Google Chrome browser without some google bits- it does somewhat better, but not that great.  So when I go to quit, I usually just want to click on the X in the top R of the browser window.  But after doing that, it wants to think about it - delay, delay, delay - and then finally it puts up a text box "do you really want to leave", which by then I'm at "hell yes". 

So I've taken to making a shortcut to xkill, my cursor turns to a X and I smite the window with a mouse click and we're done: I have cast Chromium and the Windows server into the outer darkness, into annihilation, to hell. Until tomorrow.

As you may guess, the thing frustrates the <expletive> out of me.  My question: Is there any actual harm in using xkill to stop a prog?  (I would xkill Windows too, but that's another story, with more <expletives>)

Last edited by trilobite (2020-12-08 23:11:48)


{Linux-using people I haven't met are friends yet to be made.}

Offline

#2 2020-12-09 05:14:46

damo
....moderator....
Registered: 2015-08-20
Posts: 6,498

Re: xkill-ing an app, any problem? (usr/bin/xkill)

There is a good explanation of the kill processes here: https://unix.stackexchange.com/question … -9-sigkill


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2020-12-09 06:54:32

ohnonot
...again
Registered: 2015-09-29
Posts: 5,193
Website

Re: xkill-ing an app, any problem? (usr/bin/xkill)

^ I don't think this applies to the xkill command, at least not directly.
Excerpt from its man page:

This command does not provide any warranty that the application whose connection  to  the  X
server  is closed will abort nicely, or even abort at all. All this command does is to close
the connection to the X server. Many existing applications do indeed abort when  their  connection to the X server is closed, but some can choose to continue.

The kill signals aren't mentioned at all.

That said, I do not recommend what you're doing there - upon subsequent startups, doesn't FF pop up a dialog like "Ooops, looks like I crashed, do you want to restore"?


Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#4 2020-12-09 08:27:47

damo
....moderator....
Registered: 2015-08-20
Posts: 6,498

Re: xkill-ing an app, any problem? (usr/bin/xkill)

^ Yes I know that it isn't the same as xkill, but perhaps the OP can use a suitable kill command instead.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2020-12-09 14:19:42

sleekmason
Member
From: Ozarks
Registered: 2018-05-22
Posts: 374
Website

Re: xkill-ing an app, any problem? (usr/bin/xkill)

From man xkill

Xkill is a utility for  forcing  the  X  server  to  close  connections  to
       clients.   This  program is very dangerous, but is useful for aborting pro‐
       grams that have displayed undesired windows on a user's screen.

 

Almost seems like it would be better to create a menu/hotkey for the specific problem, and use killall or pkill -f?

More importantly, this shouldn't be happening anyway. Another solution perhaps?

Offline

#6 2020-12-09 14:20:50

trilobite
Member
From: Saskatchewan, Canada
Registered: 2017-06-27
Posts: 65

Re: xkill-ing an app, any problem? (usr/bin/xkill)

Yes Chromium does say "do you want to restore" when restarting and I click no and it seems to start up okay.  I suppose I could wait until I break it and reinstall. I admit to posting in a fit of anti-windows pandemic pique.


{Linux-using people I haven't met are friends yet to be made.}

Offline

#7 2020-12-10 06:46:37

ohnonot
...again
Registered: 2015-09-29
Posts: 5,193
Website

Re: xkill-ing an app, any problem? (usr/bin/xkill)

I'd rather just wait it out.
Or use a browser with a minimal profile that is much faster to start up / shut down.
I have found that FF can be made _much_ snappier with some serious user.js tweaking - see https://github.com/arkenfox/user.js (that's the ghacks user.js) or https://github.com/pyllyukko/user.js .


Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#8 2020-12-11 01:12:54

twoion
ほやほや
Registered: 2015-08-10
Posts: 3,069

Re: xkill-ing an app, any problem? (usr/bin/xkill)

trilobite wrote:

As you may guess, the thing frustrates the <expletive> out of me.  My question: Is there any actual harm in using xkill to stop a prog?  (I would xkill Windows too, but that's another story, with more <expletives>)

that is a good question, here's from the man page:

Xkill  is  a  utility  for forcing the X server to close connections to clients.  This program is very dangerous, but is useful for aborting programs
that have displayed undesired windows on a user's screen.

On UNIX-like OSs, sending a process the KILL signal, meaning a certain process ID is signalled "KILL", immediately terminates the target process. SIGKILL cannot be ignored by the running process.

On the other hand, xkill does NOT send a process a SIGKILL or even just SIGTERM (which a process can choose to ignore), but it finds a connection of a X client to the X server and ends the connection. This just means that the window of the underlying program closes. It doesn't have to terminate the process, although most graphical applications themselves terminate when their X connection gets closed (or rather, they just die). For example, you could xkill the Firefox window, but even if all Firefox windows close, the Firefox process would be free to continue running and use resources.

So: xkill is not sending UNIX signals, it instructs the X server to do something.

With most programs, xkill behaves like expected, that is, killing the X window makes the program itself exit, too; but that's not a guarantee, and there are some programs which continue running in an unclean state. Don't worry, I have xkill bound to super+shift+x and use it sometimes, but rarely.

Oh, and of course xkill won't work on Wayland clients smile


Per aspera ad astra.

Offline

Board footer

Powered by FluxBB