1

I am trying to setup a remote desktop using Apache Guacamole on Ubuntu 20.4 but I only want the initial program accessible to the user. The program is a Windows program and I am using WINE.

So far I have tried invoking wine via a bash script. And then placing that script path in the initial program settings in the connection settings of Apache Guacamole.

The initial program path looks like /home/frank/launchprogram.sh in the guacamole connection settings. The launchprogram.sh bash script looks like below. I simply copied the command settings in the shortcut that is on my desktop. For simplicity I have it chmod 777.

#!/bin/sh


env WINEPREFIX="/home/frank/.wine" wine C:\\windows\\command\\start.exe /Unix /home/frank/.wine/dosdevices/c:/users/Public/Desktop/myprogram\ V4.lnk

The above script works fine from the terminal when on the desktop. But not with Guacamole.

I have also tried in the bash script

WINEPREFIX="/home/frank/.wine"
wine "/home/frank/.wine/drive_c/Program Files/myprogramfolder/myprogram.exe"

and it doesn't work.

If I simply put wine myprogram.exe and run it in the same directory it works. But not in others.

What am I doing wrong?

  • Not to spill the wine, but i would just install apache for Linux if you are using Linux, otherwise you have to jump all these configuration hoops and you're finding it was probably never tested the way you are using it. https://guacamole.apache.org/releases/1.4.0/ .tar.gz files can be extracted in linux with `tar -xzvf filename.tgz` or filename.tar.gz are the same thing – Christopher Hoffman Jan 19 '22 at 21:25
  • https://blog.ouseful.info/2016/05/04/more-docker-doodlings-accessing-gui-apps-via-a-browser-from-a-container-using-guacamole/ – Christopher Hoffman Jan 20 '22 at 03:12
  • 1
    I am using wine and guacamole to webify a legacy winforms app until I can recode it in .net 6 (many components are not yet available). I already have guacamole up and running. This is now fixed as I recoded the bash script to cd into the directory from the path the bash script was located in and not the absolute path I was using before invoking wine on the exe.. – user8555433 Jan 20 '22 at 22:15
  • It's always something simple – Christopher Hoffman Jan 21 '22 at 20:11
  • any X application should have environment variable DISPLAY configured. When you start X app from displayless environment not associated with display it fails usually. run ```env | grep DISPLAY``` in a terminal in an X environment and you will see something like this: *DISPLAY=:0.0* . My bet is you need to add it into command line , i.e. ```env WINEPREFIX="/home/frank/.wine" DISPLAY=:0.0 wine zzz.exe``` – Maxim Sagaydachny Feb 02 '22 at 14:03

0 Answers0