Comments (8)
Well it seems working fine here. I did the following test ~/.config/argos/uptime.3s.sh
#!/usr/bin/env bash
echo "Test"
echo "---"
echo "Run uptime with sudo | bash='sudo uptime' terminal=false"
if you run the journalctl /usr/bin/gnome-shell -f
command on a seperate terminal then you can see the output of the command when you click on Test > Run uptime with sudo
On my case I can execute sudo without password, I think the best that you can do it's move your script to some place and then just call it from your argos script
from argos.
Normally using when you use the sudo command you need to type your password (this is what prevent the script to run completely in Argos)
You've visudo ?
from argos.
This is why I was wanting to sudo (an extension to check and notify user if any hardware/software issue... and smartctl requires sudo)
from argos.
I dont know if the |
make that the command dont run properly, a simple workaround that I said on my previous comment (probably I didnt express well my english is a bit bad)
the workaround is move what you need execute with sudo to an external script, example
# ~/.scripts/sudo_uptime.sh
echo mypassword | sudo -kS uptime
dont forget add execution permissions to tour external script chmod +x ~/.scripts/sudo_uptime.sh
then your argos config it'll be something like
#!/usr/bin/env bash
echo "Test"
echo "---"
echo "Run uptime with sudo | bash='~/.scripts/sudo_uptime.sh' terminal=false"
I've tested this by myself and it's working fine (I enable password for my sudo)
from argos.
You purpose exactly what I tried in first place ;)
Your code will "almost work" because the command is not used in the script itself, it's a button... but if you use the button the command will not run properly due to the password required.
Try to store the result of the command in a variable, you will understand.
#!/usr/bin/env bash
system_uptime=`echo mypassword | sudo -kS uptime`
echo "Test"
echo "---"
echo "uptime: $system_uptime"
from argos.
the journalctl command result in:
janv. 29 07:21:44 Serveur-NAS org.gnome.Shell.desktop[2526]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x4e00028 (test.c.sh )
from argos.
Whatever the issue is here, it has nothing to do with Argos. Argos runs executable files, that's all. It doesn't care whether those files in turn invoke sudo
, or top
, or any other program.
The "Buggy client" warning shown above is a GTK+ bug that has been around forever, and has nothing to do with Argos either.
from argos.
If someone stumbles upon this issue: At least in my case it seemed that the prompt for the password caused the problem. After setting an empty prompt with -p ''
the script executes as expected.
SOMETHING=$(sudo -Sk -p '' <<< $password some_command)
echo "${SOMETHING}"
from argos.
Related Issues (20)
- object.actor is depreacted
- Argos not open HOT 1
- What would be the best way to "stream" data to the script?
- Argos menus won't open on Ubuntu 20.04 - Is it a known issue? HOT 5
- "object.actor deprecated" error in system log HOT 2
- Force refresh using terminal HOT 2
- Filename position option not working
- script output value is different
- Python read file HOT 1
- Audio output not coming HOT 1
- Agros extension at "c" position "pushes" top bar clock out of its position HOT 2
- [Future Request] please, add support slide bar
- Successful install on Debian 10 + Gnome 3.30.2
- Information does not refresh
- Cannot use JavaScript (with node) with Argos HOT 2
- Does not work on GNOME 42, even when bypassing the version check HOT 9
- Need some application notes for initial installation
- Python issue with a certain library "SoCo"?
- Object 0x21cf75d269d0 is not a subclass of GObject_Object, it's a Object
- DOESN'T WORK
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 argos.