Running the Client as a Service (Daemon)

1 post / 0 new
Michael
Running the Client as a Service (Daemon)

The VirtualHere USB Client can run either as a normal application or as a background service. Running the client as a background service enables devices to be shared while requiring no user to be logged in. This makes it easy to remotely interact with USB devices via VirtualHere using scripting or the command line, and once setup can be a background set-and-forget type system. Users can log in/out and the VirtualHere client will remain running in the background uninterrupted.

When the VirtualHere USB Client is installed as a background service it will automatically start up when the operating system boots, and will automatically connect to any devices you have specified. You interact with the service via the command line or named pipe only, not via the GUI. The message log can be viewed in the Event Viewer (under Windows), Console Viewer (under OSX), or tail /var/log/syslog (under Linux).

THE VIRTUALHERE USB SERVER MUST BE PURCHASED TO USE THIS FEATURE

To install the Virtualhere USB client as a service in Windows:

  1. Exit the VirtualHere USB Client if it is currently running
  2. With Administrator privileges:
    If you want to install as a service (including Bonjour Auto-Find functionality) use vhui64.exe -i
    If you want to install as a service (without Bonjour) use vhui64.exe -b
  3. To interact/control the service, run vhui64.exe -t "HELP" on the command line for available commands

If you need to edit the client vhui.ini file (e.g if you are setting up SSL) the settings are located at C:\Windows\system32\config\systemprofile\AppData\Roaming\vhui.ini

To install the Virtualhere USB client as a service in OSX:

  1. Exit the VirtualHere USB Client if it is currently running
  2. Type sudo /Volumes/VirtualHere/VirtualHere.app/Contents/MacOS/VirtualHere -i
  3. To interact/control the service, run /Applications/VirtualHere.app/Contents/MacOS/VirtualHere -t "HELP" on the command line for available commands

To install the VirtualHere USB client as a daemon in Linux:

Firstly you should use the VirtualHere USB Client Console edition. Then run the client with the -n option. This will start it in daemon mode

E.g: to run the client in the background under linux use:sudo ./vhclientx86_64 -n

To interact/control the daemon, run ./vhclientx86_64 -t "HELP" on the command line for available commands

To start the client on boot you will need to add it to run level scripts, here is an example of a boot script

To uninstall the VirtualHere USB Client as a service in Windows

  1. While running as an administator type vhui64.exe -u

To uninstall the VirtualHere USB Client as a service in OSX

  1. Type: sudo /Applications/VirtualHere.app/Contents/MacOS/VirtualHere -u