On 03/01/18 14:14, Ahem A Rivet's Shot wrote:
> On Wed, 3 Jan 2018 10:02:31 +0000
> Chris Green wrote:
>
>> However I agree about display etc., it always seems a bit clunky when
>> using VNC. Horses for courses though, if you want to run a number of
>> GUI programs remotely then VNC probably makes sense.
>
> I've always used ssh -X (or -Y) to get a forwarded X connection
> when running GUI applications remotely, for example my Calibre server runs
> headless so when I need the GUI I just run ...
>
> ssh -Y calibre@library
>
> ... from any machine with a display and the authorised keys (the
> calibre user has shell set to the calibre GUI). There are no other X
> clients in that jail, in particular no desktop environment, window manager
> or even terminal. The only things the server exports are the GUI
> application and a web interface, you can get to the console with physical
> access but the console runs in text mode and can't display the calibre GUI.
>
> It always seemed wrong to forward the desktop when all you want is
> the application(s), even more so when there is no desktop to forward.
>
I have been using the facility of X apps to fowraed to a remote server.
This is the script I use to start and redirect an X application
(kaffeine) to a machine that has logged in with ssh
#!/bin/sh
# start in the right place
cd /var/videos
# this fixes some errors that I don't understand
export $(dbus-launch)
#detect IP address of remote client
IP=`echo $SSH_CONNECTION | awk '{print $1}'`
#redirect pulse audio to it
PULSE_SERVER=$IP:'4713'
# set default X display to remote client
DISPLAY=$IP:0.0
# DBUS_SESSION_BUS_ADDRESS=""
export PULSE_SERVER
export DISPLAY
#kaffeine > /dev/null 2>&1
kaffeine
On the client machines you need something like
xhost +
ssh -t myserver pathtomyscript
assuming you have passwordless ssh set up.
Ex of gigabit ethernet, this isn't fast enough to play movies, but its
good enough for most other purposes
--
"Women actually are capable of being far more than the feminists will
let them."
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|