Open Fabien-Morrow opened 6 months ago
I've been using this, it works on the soft control panel I made for Elite Dangerous to open some of the web based tools for it:
os.execute("xdg-open https://coriolis.io/");
You may need to put in the full path: /usr/bin/firefox
Ok it's definitively not a unified remote issue I've added the server as a systemd service, and I think this setup is responsible of this mess same problem here Too lazy to go deep into the rabbit hole to find what capability I should enable or not. Moreover, adding CapabilityBoundingSet=CAP_SYS_ADMIN for example just broke the service.
I've added unified remote as a service because it crashes sometimes...
I think I've solved the issue : os.start("firefox") returns "no DISPLAY environment variable specified"
This snipped helped me
function os.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
local ex1, ex2, ex3 = f:close()
return s
end
--@help Command 1
actions.command1 = function ()
local a,b,c=os.start('firefox')
print(a,b,c)
end
I've fixed the issue by specifying DISPLAY in my service file
[Unit]
Description=Unified Remote Server
After=syslog.target network.target
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Type=forking
User=fabien
Environment=DISPLAY=:0
#PIDFile=$HOME/.urserver/urserver.pid
ExecStart=/opt/urserver/urserver-start
#ExecStop=/opt/urserver/urserver-stop
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.target
Hi everyone and thanks for this amazing product !
I can't achieve to get os.start() to work.
Update the remote.lua of the Examples/Run remote with this :
Firefox never launches. What I'm doing wrong ?