![]() |
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 osPS: 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: ALLOtherwise a workaround that seems to work is: Code:
echo 'your command' | sudo gainrootI 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 11:13. |
vBulletin® Version 3.8.8