Comments (1)
Hi! Shell commands may be run like this:
result = system("/usr/bin/logger", { "-i", "Message from eruption" })
if result ~= 0 then
error("Command execution failed with result: " .. result)
end
The first parameter to the system
function is the command name, the second parameter is a Lua table (roughly equivalent to an array) that specifies the command line parameters of the program being run.
The program will be executed with the rights of the eruption
process (root by default).
To run the program as a different user you can do the following:
result = system("/usr/bin/sudo", { "DISPLAY=:1", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus", "-u", "user", "notify-send", "Message", "A message from eruption" })
if result ~= 0 then
error("Command execution failed with result: " .. result)
end
Please replace "user" and "1000" with the respective user name and ID.
from eruption.
Related Issues (20)
- Shockwave script - Better blending of colors for keypress HOT 1
- Eruption service fails to start on Siduction (Debian Sid) HOT 1
- GitHub Sponsors HOT 1
- RustC Compiler Error E0658 HOT 1
- Roccat Kain 100 AIMO mouse buttons no longer detected. HOT 4
- Missing packages from Ubuntu PPA HOT 1
- [BUG] Input spam on X11 console screen HOT 2
- Brightness Controll doesn't work on Fedora 37 HOT 1
- Add Support for Roccat Vulcan II max
- Add support for ROCCAT Ryos mk fx
- Initialize Failure Flooding Journal HOT 2
- "ROCCAT Vulcan Pro" keyboard not working anymore HOT 1
- Eruption sometimes fails to autostart, causes keyboard flickering
- ROCCAT Kone Pro Air debounce time
- Vulcan pro and kone pro not seen on gui HOT 2
- lots of logging to /var/log/warn "Could not process a mouse event: receiving on a closed channel" HOT 11
- Move "ROCCAT Vulcan Pro Keyboard" out of experimental HOT 1
- Bugs HOT 3
- Eruption 0.3.3 fails to start automatically on Ubuntu 23.04 HOT 3
- Add Support for ite8291 (XMG/Tuxedo(?) Laptop Keyboards) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eruption.