Code Monkey home page Code Monkey logo

Comments (3)

HalJordan avatar HalJordan commented on September 2, 2024

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

from docs.

Fabien-Morrow avatar Fabien-Morrow commented on September 2, 2024

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...

from docs.

Fabien-Morrow avatar Fabien-Morrow commented on September 2, 2024

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

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.