Linux GUI client not exit after closing its window

Hi, when running Linux GUI client (amd64) from command line, there are two cases:
1. Close the window directly -> its process doesn't exit, and the command line is still blocked.
2. Right click on "USB Hubs" in the window and select "Exit" -> the program terminates and returns to command prompt.

Is it possible to make case 1 behave same as case 2?

Also, when opening the client program, it prints this message:
(vhuit64:25760): GLib-GObject-WARNING **: 21:07:10.015: ../../../../gobject/gsignal.c:2642: instance '0x3c52290' has no handler with id '465'
Not sure if it's related.

Thanks.

#2

Yes in linux you need to use nohup like this

nohup /path/to/vhuit64 &

#3

Hi Michael,
Thanks for your reply.
But using that command still keeps the process in the background, even if its window has been closed.

Let me explain my use case:
I have a local Windows PC behind NAT that runs VH server, and a remote Linux workstation that may need to access my local USB device sometimes.
So I created a shortcut like this:

ssh -Y LINUX_HOST -R 7575:127.0.0.1:7575 sudo /path/to/vhuit64

With a single click on this shortcut, I can 1) forward local VH server port to the remote, and 2) open remote VH GUI through X11 forwarding
at the same time. When I don't need this anymore, I simply close the GUI window and expect to terminate the VH GUI program and also close
the SSH connection. But because the GUI process doesn't exit by itself, I'll need to manually kill it from the command line. This additional step
seems a bit cumbersome.

So I'm wondering if the behavior of the GUI client can be changed? Or is there a better way to achieve my use case?

Thanks.

#4

OK I dont know about x11 passthrough etc. I havent done that with the GUI client. (Actually i use nomachine for my own remote access to test virtualhere)

I think you will need to research more on the internet.

The vhui GUI doesnt do anything special. Its just like any other Linux GUI program. When you select exit, it just exits the process, nothing is kept in the background.

#5

I know selecting "Exit" in the program can terminate its process, but that's not what I mean.
I mean closing the window by right clicking on its icon from the taskbar, and select "Quit". This won't terminate the process.
Please see this captured image on how to reproduce it:
https://imgur.com/Q4KvfMq

This problem also happens when running on Linux locally, so it's not related to X11 forwarding.

#6

Ah ok, actually this is by design. You need to exit the virtualhere client from the menu.

Normally closing the window minimizes virtualhere on the Windows and MacOS platforms and it used to minimize it on Linux too. However with the different window managers in Linux it became difficult to minimize reliably so that the user could actually see the minimized client. So i disconnected it that. I want to keep the current way it does it.