Active Topics

 



Notices


Reply
Thread Tools
Posts: 30 | Thanked: 3 times | Joined on Jun 2010
#1
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?

Last edited by cooperpeng; 2011-04-11 at 01:42.
 

The Following User Says Thank You to cooperpeng For This Useful Post:
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#2
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)
 

The Following User Says Thank You to nicholes For This Useful Post:
JohnLF's Avatar
Posts: 551 | Thanked: 507 times | Joined on Feb 2010 @ North West England
#3
use
Code:
sudo gainroot < "your command here"
e.g.
Code:
sudo gainroot < "echo This is root"
__________________
My websites: -
http://www.lefebvre.org.uk
http://www.lefebvre.ltd.uk
 

The Following User Says Thank You to JohnLF For This Useful Post:
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#4
Originally Posted by JohnLF View Post
use
Code:
sudo gainroot < "your command here"
e.g.
Code:
sudo gainroot < "echo This is root"
does it makes shortcut inthe menu?????????
 

The Following User Says Thank You to nicholes For This Useful Post:
Posts: 30 | Thanked: 3 times | Joined on Jun 2010
#5
Hi,
I do
Code:
sudo gainroot < "echo 0 >/sys/class/backlight/acx565akm/brightness"
Result is
-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?
 
Posts: 38 | Thanked: 33 times | Joined on Aug 2010 @ Bangalore, India
#6
I've mentioned a trick to do this in another thread post here. See if that works for you.
 

The Following User Says Thank You to kitwalker For This Useful Post:
Posts: 30 | Thanked: 3 times | Joined on Jun 2010
#7
I've mentioned a trick to do this in another thread post here. See if that works for you.
It like good idea, but it didn't work.
I try
Code:
sh -c 'echo 0 > /sys/class/backlight/acx565akm/brightness | sudo gainroot'
sh: cannot create /sys/class/backlight/acx565akm/brightness: Permission denied
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'
But it was the same.
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.
 
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#8
@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?
 

The Following User Says Thank You to nicholes For This Useful Post:
Posts: 38 | Thanked: 33 times | Joined on Aug 2010 @ Bangalore, India
#9
Originally Posted by cooperpeng View Post
It like good idea, but it didn't work.
I try
Code:
sh -c 'echo 0 > /sys/class/backlight/acx565akm/brightness | sudo gainroot'
sh: cannot create /sys/class/backlight/acx565akm/brightness: Permission denied
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'
But it was the same.
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.
Use it this way:

Code:
sh -c 'echo "sleep 1; echo 0 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot'
 

The Following 2 Users Say Thank You to kitwalker For This Useful Post:
Posts: 30 | Thanked: 3 times | Joined on Jun 2010
#10
Use it this way:

Code:

sh -c 'echo "sleep 1; echo 0 > /sys/class/backlight/acx565akm/brightness" | sudo gainroot'
Oh! My god!!!
It is work.
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'
"sleep 1;" is key point.
 

The Following User Says Thank You to cooperpeng For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:07.