Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I connect fine from the free NoMachine NX client on a Windows box. The VNC session runs over NX, which runs over ssh. All works fine. Faster than plain old VNC connections.
Now how do I disconnect (gracefully) from the client (Windows) side? I've found no key combos or menu choices on the Windows client side to shut things down. Ctrl-Alt-Del to Task Manager and forceable killing the NX client works, but leaves the x11vnc and vncviewer processes running on the Linux (server) end.
It also works to fire up a Linux terminal window while still in the VNC session and then run "pkill x11vnc". This shuts down the VNC/NX session instantaneously and cleans up everything nicely on the Linux end, because the shutdown is being initiated on the Linux end. The NX client on the Windows side instantaneously dissappears too when you pkill the Linux server end.
Is there a better way to initiate the shutdown from the client (Windows) end? While the pkill seems to work fine, it feels a little "kludgy" - like you're hitting something with a big hammer when a small hammer would do. But I don't know the small hammer.
just stop the service. Pkill is killing a process, you are correct, this may leave stuff hanging around on your system. Basically as far as i understand it (i use centos) your linux system is running a process in the background waiting for connections. the correct way to stop this would be something like "service vncserver stop" or something to that effect. try "service vncserver status" to see if this command might work. I have no experience with your os, so check out how the service was started.
The other thing is all this could be typed from your nx or vnc server session, just by opening a shell, rather than opening another ssh or whatever to your linux box. i have never tried this but logic dictates that it might work.
this is definately not from a linux guru, just scrolling through the questions and this seemed like a logical respomse.
I don't want to kill the entire vnc service because I will want to use VNC to access the machine again later. I just want to terminate the current session, leaving the vnc server running to accept future connections again later. The default Gnome/Ubuntu vnc server is named "/usr/lib/vino/vino-server" and that needs to stay running after I terminate my individual session. x11vnc is maintaining the session, and killing that doesn't affect vino-server ... that keeps running as I want it to.
I was just wondering if there is some way - on the client end (Windows) - to terminate the session (under the hood this client-side termination would have to indirectly kill x11vnc and vncviewer on the remote Linux end).
Using pkill is OK with me, I guess. It works. But I was thinking that other users who are not that familiar with VNC might end up scratching their heads wondering how to exit the session. They may be running the client on a Windows box and would expect a "Windows way" to exit. i.e., "click on something". Firing up a terminal window and running "pkill x11vnc" just doesn't strike me as something the average Windows user would think to do. Of course it could be argued that the average Windows user wouldn't be using NX and VNC to access a Linux Gnome desktop in the first place! So maybe pkill really is the officially approved way to end your NX/VNC session.
When I set up nxclient on my machine it put a shortcut on my desktop. It worked when I clicked the icon and logged in, but I could not figure out how to end the session for the life of me. I tried killing the process, etc, but then I could not log into a new session.
I found that if instead of clicking the shortcut I typed in
'/usr/NX/bin/nxclient --admin', not only could I initiate a session, but I had the option to end a session and even discard the log file. So, I simply right clicked on the desktop icon, selected properties, and altered the 'Command' line under the 'Launcher' tab to the above command and now it works perfectly.
FYI, I am not sure if it is because my nxserver is an old machine, but after I tell it to close the session, although it closes the session windows right away, it takes about 30 seconds to actually list the session as closed. Then, I right click on the session listing again and tell it to remove the session.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.