[FreeNX-kNX] Shortcut to suspend/terminate

Paul van der Vlis paul at vandervlis.nl
Thu Aug 4 09:54:27 UTC 2005


Thorsten Sandfuchs schreef:
> On Thu, Aug 04, 2005 at 10:38:03AM +0200, Paul van der Vlis wrote:
> 
>>Thorsten Sandfuchs schreef:
>>
>>>On Wed, Aug 03, 2005 at 01:16:17PM +0200, Paul van der Vlis wrote:
>>>
>>>>Is it possible to make a shortcut on the desktop to force a "suspend" or 
>>>>"terminate" of the NX session?
>>>
>>>send a kill -HUP to the corresponding nxagent-process for suspend.
>>
>>When I do "killall -HUP nxagent" (as the user what is running the 
>>session) I have a strange behaviour of running programms the next time I 
>>start. I have e.g. problems with Gnome-panel.
> 
> What problems? 

I don't have a start-menu and I get a message like "Gnome menu has been 
closed". But maybe I have to do more tests.

> And don't they occure with "Suspend"ing with the dialog, too?

No, then I don't have these problems.

>>FreeNX will do something when I click on the buttons "suspend" or 
>>"terminate" after a "alt F4". I have tried to find this code, but did 
>>not succeed (I think it's inside nxagent). Does anybody know what these 
>>commands are?
> 
> it calls nxclient with the appropriate options (if there is a nxclient-binary
> from nomachine installed, it uses this, otherwise there is a
> (minimal)-nxclient reimplemention, which has only these valid xmessage-calls)
> 
> the code executed:
> 
> xdialog_yesnosuspend()
> {
>         $DIALOG --title "$DIALOG_CAPTION" --buttons-style text --ok-label
> "Suspend" --cancel-label "Terminate" --yesno "$DIALOG_MESSAGE Close window to
> cancel." 400x150
>         [ $RC -eq 0 ] && return 3
>         [ $RC -eq 1 ] && return 2
> }
> 
> [...]
> 
> RC=$?
>         [ $RC -eq 2 ] && kill -TERM $PPID
>         [ $RC -eq 3 ] && kill -HUP $PPID

I will do some more tests.

I do not have a nxclient-binary installed on the server (or do you mean 
on the client)?

Install Xdialog to get a replacement for the uggly xmessage.

> hmm, didn't I already answered this, uh yes I did *SCNR*

Tja.

> Additionally you could kill -9 those two running nxssh-processes, on the
> client side, to gain a suspend of nxagent.

That's possible, but complex to realise.

With regards,
Paul van der Vlis.








More information about the FreeNX-kNX mailing list