![]() |
How to do something to make cmd-shortcuts be root ?
I use cmd-shortcuts to do a commandline with terminal. But it always permission deny. Can I do something to get root with cmd-shortcuts app?
|
Re: Hot to do something to make cmd-shortcuts be root ?
i use shorcut maker (but did not work with rooot) actually i am also looking somethig wich can make a shortcut for rooted cmd and one for python
here are code i want to make shortcut for them 1> echo 0 >/sys/class/backlight/acx565akm/brightness (need sudo gainroot) 2>from my own thread where nicolai helped me to make n900's camera a spy cam(thanks to nicolai) http://talk.maemo.org/showthread.php?t=71326&page=2 python import gst bin = gst.element_factory_make("camerabin") bin.set_property("videoenc", gst.element_factory_make("dspmp4venc")) bin.set_property("videomux", gst.element_factory_make("hantromp4mux")) bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc")) bin.set_state(gst.STATE_PLAYING) bin.set_property("filename", "test.mp4") bin.set_property("mode",1) #starts recording bin.emit("user-start") # wait some time # stops recording bin.emit("user-stop") bin.set_state(gst.STATE_PAUSED) bin.set_state(gst.STATE_NULL) |
Re: Hot to do something to make cmd-shortcuts be root ?
use
Code:
sudo gainroot < "your command here" Code:
sudo gainroot < "echo This is root" |
Re: Hot to do something to make cmd-shortcuts be root ?
Quote:
|
Re: How to do something to make cmd-shortcuts be root ?
Hi,
I do Code:
sudo gainroot < "echo 0 >/sys/class/backlight/acx565akm/brightness" -sh: cannot open echo 0 >/sys/class/backlight/acx565akm/brightness: no such file so that it is no work in shortcuts by user mode. Another way, how to do cmd shortcuts become to root mode? Have any idea? |
Re: How to do something to make cmd-shortcuts be root ?
I've mentioned a trick to do this in another thread post here. See if that works for you.
|
Re: How to do something to make cmd-shortcuts be root ?
Quote:
I try Code:
sh -c 'echo 0 > /sys/class/backlight/acx565akm/brightness | sudo gainroot' Root shell enabled I see the link, get the file "disable_ts.desktop". The code is " Exec=/bin/busybox sh -c 'echo "sleep 15; echo 1 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts" | sudo gainroot' " so I try Code:
/bin/busybox sh -c 'echo 0 > /sys/class/backlight/acx565akm/brightness | sudo gainroot' In fact, I just run my app.py using by cmd shortcuts launching. But it will modify /sys file so that be permission deny. If it's running in terminal is good by root privilege. |
Re: How to do something to make cmd-shortcuts be root ?
@cooperpeng
does this code makes shortcut in the emnu?? can i make shortcut for my code mentioned in ur thread?or you are talking about queen becon or something? |
Re: How to do something to make cmd-shortcuts be root ?
Quote:
Code:
sh -c 'echo "sleep 1; echo 0 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot' |
Re: How to do something to make cmd-shortcuts be root ?
Quote:
It is work. :D Very thanks by kitwalker. What's diff.? It's amazing!! Code:
sh -c 'echo "sleep 1; echo 0 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot' |
Re: How to do something to make cmd-shortcuts be root ?
Quote:
how can i make shortcut for python????? se my code in post #2 |
Re: How to do something to make cmd-shortcuts be root ?
I use this way.
In your app.py python file. Code:
import os PS: note \' |
Re: How to do something to make cmd-shortcuts be root ?
i don't have any .py file, i just type this in xterminal
python import gst bin = gst.element_factory_make("camerabin") bin.set_property("videoenc", gst.element_factory_make("dspmp4venc")) bin.set_property("videomux", gst.element_factory_make("hantromp4mux")) bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc")) bin.set_state(gst.STATE_PLAYING) bin.set_property("filename", "test.mp4") bin.set_property("mode",1) #starts recording bin.emit("user-start") # wait some time # stops recording bin.emit("user-stop") bin.set_state(gst.STATE_PAUSED) bin.set_state(gst.STATE_NULL) this code starts n900s camera and u can lock screen while video rec. and now i want one shortcut for this. plz help |
Re: How to do something to make cmd-shortcuts be root ?
Hello, since I do develop/maintain/something cmd-shortcuts I thought it good to reply.
I used to assume just typing in "sudo command" would work for most people, but realised it was because of the file /etc/sudoers.d/chroot.sudoers, added by package easy-chroot (dependency of easy-debian), containing a line allowing anything to be run as root. As a solution one might try to add something similar to: Code:
user ALL = NOPASSWD: ALL Otherwise a workaround that seems to work is: Code:
echo 'your command' | sudo gainroot I might add a checkbox "Run as root" implementing a commonly working workaround, maybe intelligently sensing what could work out of a set of alternatives even, in a future version. Hopefully I'll come around to it soon since I've started to notice other tweaks that could be useful (like having a tree structure to sort stuff out when you have many buttons). Alternatively I might do something like adding a /etc/sudoers.d/cmd-shortcuts.sudoers in the default install (hey, easy-chroot does it...). |
All times are GMT. The time now is 23:08. |
vBulletin® Version 3.8.8