Giter Club home page Giter Club logo

dbus-app-launcher's People

Contributors

dvdgiessen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

erenfro

dbus-app-launcher's Issues

Invoke CmdArgs with multiple arguments

I am experimenting with this and was wondering how to invoke a command with multiple arguments? I hope this fake shell session helps to illustrate my current issue.

# Works as expected
❯ ydotool mousemove -x 100 -y 100

❯ qdbus nl.dvdgiessen.dbusapplauncher /nl/dvdgiessen/DBusAppLauncher nl.dvdgiessen.dbusapplauncher.Exec.CmdArgs "ydotool" "mousemove" "x" "100" "y" "100"
Invalid number of parameters

❯ qdbus nl.dvdgiessen.dbusapplauncher /nl/dvdgiessen/DBusAppLauncher nl.dvdgiessen.dbusapplauncher.Exec.CmdArgs "ydotool" "mousemove -x 100 -y 100"

❯ journalctl -b | grep dbus
Apr 06 14:28:35 incitatus systemd[4137]: Started dbus-:[email protected].
Apr 06 14:29:20 incitatus dbus-app-launcher[1431494]: ydotool: Unknown command: mousemove -x 100 -y 100

Multiple args do not work and if I try to use multiple arguments as the final param, they get interpreted as a string and not individual args?

Invoke CmdArgs from Kwin script is ignored

When I run this in my terminal, the notification shows up as expected:

❯ qdbus nl.dvdgiessen.dbusapplauncher /nl/dvdgiessen/DBusAppLauncher nl.dvdgiessen.dbusapplauncher.Exec.CmdArgs "notify-send" "test"

However, this call from a Kwin script does nothing:

callDBus(
  "nl.dvdgiessen.dbusapplauncher",
  "/nl/dvdgiessen/DBusAppLauncher",
  "nl.dvdgiessen.dbusapplauncher.Exec",
  "CmdArgs",
  "/usr/bin/notify-send",
  "test"
);

Note: the kwin script itself works and the call is made. For example, when I use it with Cmd, /usr/bin/konsole the konsole pops up. The logs (journalctl -b | grep dbus) are completely empty.

Add method which parses command from a string

To make it easier to execute a command line given as a string without first having to split the string in the calling application, we could add a method that parses a string into a command, arguments, and perhaps even environment variables, similar to how the shell would parse such a command line.

The shellwords package seems to be perfect for this.

This will also help work around the issue noted in #2, namely that there's no easy way to call a DBus method with a StringList argument in the KWin JS API.

Suggested use of system-wide /usr/share/dbus-1/services/nl.dvdgiessen.dbusapplauncher.service is not recommended.

I'm recommending the change in documention regarding how to use this to not use:
/usr/share/dbus-1/services/nl.dvdgiessen.dbusapplauncher.service

As this is a path intended for packaged system software's defaults, where:

/etc/dbus-1/services/

Is for System Administrators, and for actual users, where this matters the most in this specific situation:

~/.local/share/dbus-1/services/

Which can be created by the user and the same file placed which overrides any system defined service(s) of the same name in /etc or /usr/share directory paths.

arch package must be rebuilt after dependencies are updated

Today after a system update dbus-app-launcher stopped working. manually running /usr/bin/dbus-app-launcher returns this error:

/usr/bin/dbus-app-launcher: error while loading shared libraries: libHSextra-1.7.14-jQJF8WyS7TA7SEILRSf4e-ghc9.2.8.so: cannot open shared object file: No such file or directory

I installed dbus-app-launcher from the AUR in EndeavourOS

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.