Reply
Thread Tools
Posts: 6 | Thanked: 0 times | Joined on Oct 2010
#41
Originally Posted by zwiik View Post
6. log on to maemo.org ,post "IT WORKS!" in this post and thank all those who helped you.

p.s. the sixth step is optional :P
It works!

Thanks for the description!

Cheers,
Andi
 
Posts: 152 | Thanked: 58 times | Joined on Oct 2010 @ void
#42
I was trying to create a desktop shortcut for a dos game (adom) running in qemu with the different solutions here but no luck. Finally I used the desktop file for htop as a sample and it worked perfectly with these two lines:
Code:
Exec=osso-term -e adom
Terminal=true
 
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#43
hey guys can this be done on a desktop shortcut ?
Code:
if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
# add here switch on instructions
gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 2
echo "Level 2";
exit 1;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "Level 2" ]; then
# add here switch off instructions
gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 5
echo "Level 5";
exit 0;
else
# add here switch on instructions
gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 2
echo "Level 2";
exit 1;
fi;
and save it as .py am doing this because many qbw on my desktop and i want to make them less, so i can easily from the menu.
thank you
 
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#44
hi i know that this case was from long time but am wondering can this be done
i want to create a desktop shortcut with 2 commands and without opening another page, just when i click it brightness become 2 and when i click it the second time brightness become 5 , am wondering can this be done?
thank you

Code:
gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 1


gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 5
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#45
Hi moudy91,
create a shellscript /home/user/change_brightness.sh
Code:
#!/bin/sh
B=$(gconftool-2 -g /system/osso/dsm/display/display_brightness)
if [ $B == 1 ]; then
  gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 5
fi
if [ $B == 5 ]; then
  gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 1
fi
Create a .desktop file (/usr/share/applications/hildon/change_brightness.desktop)
Code:
[Desktop Entry]
Version=1.0.0	
Encoding=UTF-8
Name=Brightness
Exec=sh /home/user/change_brightness.sh
Icon=general_brightness
Type=Application
X-App-Loading-Image=none
Now you can add a shortcut for this "Brightness-App" on you desktop.
 

The Following User Says Thank You to nicolai For This Useful Post:
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#46
Originally Posted by nicolai View Post
Hi moudy91,
create a shellscript /home/user/change_brightness.sh
Code:
#!/bin/sh
B=$(gconftool-2 -g /system/osso/dsm/display/display_brightness)
if [ $B == 1 ]; then
  gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 5
fi
if [ $B == 5 ]; then
  gconftool-2 -s /system/osso/dsm/display/display_brightness -t int 1
fi
Create a .desktop file (/usr/share/applications/hildon/change_brightness.desktop)
Code:
[Desktop Entry]
Version=1.0.0	
Encoding=UTF-8
Name=Brightness
Exec=sh /home/user/change_brightness.sh
Icon=general_brightness
Type=Application
X-App-Loading-Image=none
Now you can add a shortcut for this "Brightness-App" on you desktop.
hi thank you for your reply but it didnt work, i saw a new desktop with the icon and when i press it nothing happens, i did step by step what you told me but am sure nothing happens
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#47
what happens if you execute the script "by hand"?
In xterm enter:
sh /home/user/change_brightness.sh
 
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#48
Originally Posted by nicolai View Post
what happens if you execute the script "by hand"?
In xterm enter:
sh /home/user/change_brightness.sh
line 8: syntax error:"fi" unexpected ( expecting "then")
that's the error
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#49
I just tested the script from my first post again.
It is working.
Be sure you don't use DOS end-of-line characters.
 

The Following User Says Thank You to nicolai For This Useful Post:
moudy91's Avatar
Posts: 165 | Thanked: 18 times | Joined on Jun 2010
#50
Originally Posted by nicolai View Post
I just tested the script from my first post again.
It is working.
Be sure you don't use DOS end-of-line characters.
What do you mean about DOS because really I did try it again but still nothing happens
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:11.