Thread
:
Need help with this command
View Single Post
maxximuscool
2010-09-04 , 14:47
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#
11
#!/usr/bin/python
import gtk
import gobject
import hildondesktop
import os
import sys
import stat
class Swappiness(hildondesktop.StatusMenuItem):
def __init__(self):
hildondesktop.StatusMenuItem.__init__(self)
#os.system('echo /usr/lib/hildon-desktop/Swappiness.py | root')
os.system('sudo chmod +x /usr/lib/hildon-desktop/Swappiness.py')
os.system('echo 30> /proc/sys/vm/swappiness')
#os.system('sudo chmod -R echo 30 > /proc/sys/vm/swappiness')
#swap_file = open('/proc/sys/vm/swappiness', 'w').write('30')
icon_theme = gtk.icon_theme_get_default()
pixbuf = icon_theme.load_icon("Swappiness", 22, gtk.ICON_LOOKUP_NO_SVG)
# hide icon after 1 sec
#gobject.timeout_add(1000, self.set_status_area_icon, None)
self.set_status_area_icon(pixbuf)
#label = gtk.Label("Show Me")
#self.add(label)
#self.show_all()
hd_plugin_type = Swappiness
This is my little simple script but nothing worked since I can't gain root access from the command os.system
__________________
Install Preenv games into eMMC
|
Click Here to get rid of Uboot screen
My N900 running at 250-1150Mhz
Unlocking your FM-transmitter to 76.0Mhz - 107.9Mhz range - CLICK HERE.
Last edited by maxximuscool; 2010-09-04 at
15:04
.
Quote & Reply
|
The Following User Says Thank You to maxximuscool For This Useful Post:
F2thaK
maxximuscool
View Public Profile
Send a private message to maxximuscool
Find all posts by maxximuscool