Notices


Reply
Thread Tools
Posts: 150 | Thanked: 80 times | Joined on Dec 2009
#321
Your initial command looks wrong:

Code:
mupen64plus Mydocs/n64\ roms/super-Mario-64.z64
Seems like it should be a / instead of \ and with no space:

Code:
osso-xterm -e "mupen64plus MyDocs/n64/roms/super-Mario-64.z64" &
 
Posts: 146 | Thanked: 54 times | Joined on Apr 2010 @ Switzerland
#322
No, the folder's name is "n64 roms" with a space.
 
Posts: 150 | Thanked: 80 times | Joined on Dec 2009
#323
Then it should be
Code:
osso-xterm -e "mupen64plus MyDocs/n64 roms/super-Mario-64.z64" &
 

The Following User Says Thank You to Sash For This Useful Post:
Posts: 146 | Thanked: 54 times | Joined on Apr 2010 @ Switzerland
#324
thought the terminal uses "\ " as space? I got the command from the xterm with tab, and if i use it in the xterm it works. it just doesn't work with the qbw.
 
Posts: 146 | Thanked: 54 times | Joined on Apr 2010 @ Switzerland
#325
It works now. There was a little misspelling. "Mydocks" instead of MyDocks"
lol dumb one

Thanks for your help.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#326
Here's an advanced version of the Queen Beecon Flickr Widget which takes advantage of several of new features in versions >=0.1.9.x

In particular:
  1. The capability of QBW to sense the position where the widget has been clicked in the 3x3 grid on its surface
  2. The parameter substitution $QBW_HOTSPOT_PRESS
  3. The parameter substitution $QBW_CURRENT_RESULTS_TEXT



More specifically:
  • When the Flickr Widget gets loaded, on phone startup, it just updates itself by fetching a random image
  • Every time the desktop, where the Flickr Widget is on, gets active, the widget just updates itself by fetching a random image
  • Every 30 minutes the Flickr Widget just updates itself by fetching a random image
  • When the Flickr Widget is clicked in sector idx=9 it opens the browser and fetches the specific page where the image is located thus allowing to experience more details about it


Here's the Beecon Exported Instance Data:
Code:
[queen-beecon-header]
version=1,000000
checksum=4422022
[queen-beecon-exported-instance]
widgetType=0
widgetVisible=1
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
snippetExtBgRGB=#ffffffffffff
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ExtBgRGB=#808080808080
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=1
beecon_eq0_BgRGB=3
beecon_eq0_ExtBgRGB=#0000ffff0000
beecon_eq0_ImgFilename=/tmp/qbwflickr0.jpg
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ExtBgRGB=#ffffffff0000
beecon_eq1_ImgFilename=-queen-beecon-appwrn.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ExtBgRGB=#ffff00000000
beecon_ge2_ImgFilename=queen-beecon-apperr.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ExtBgRGB=#0000ffffffff
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=490
widHeight=330
instanceTitle=FlickrImages
instanceCmd=if [ "_$QBW_HOTSPOT_PRESS" == "_9" ] ; then run-standalone.sh dbus-send --system --print-reply --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"$QBW_CURRENT_RESULTS_TEXT"; else a=`dd if=/dev/urandom bs=1 count=1 | od -i | head -n 1 | cut -f2- -d' '`;x=`expr $a % 24`;wget -t 1 -T 10 -q -U "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900" -O - "http://m.flickr.com/explore/interesting/"|awk -v i=$x 'BEGIN{FS="[\\"]+";n=0}/^\\t\\t<a href=.+>/{u[n]=$2;}/<img src=.+class="pc_img">/{gsub(/_s\\.jpg/,"_m.jpg",$4);s[n]=$4;n++;}END{r=system("wget -t 1 -T 5 -q -O /tmp/qbwflickr0.jpg \\""s[i]"\\"");print "http://m.flickr.com"u[i];exit r;}';fi
cmdImgFilename=queen-beecon.png
cmdImgZoom=0
cmdFgRGB=1
cmdExtFgRGB=#ffffffffffff
cmdTextAngle=0
cmdVisibilityPosition=0
cmdImgVisibilityPosition=0
cmdJustify=0
cmdExtFont=Nokia Sans Italic Bold 12
cmdFontName=3
cmdFontSize=12
resImgFilename=;/tmp/qbwflickr0.jpg
resImgZoom=1
resFgRGB=1
resExtFgRGB=#ffffffffffff
resTextAngle=0
resVisibilityPosition=0
resImgVisibilityPosition=5
resJustify=0
resExtFont=Nokia Sans Bold 12
resFontName=2
resFontSize=12
updOnStartup=true
updOnClick=true
updOnDesktop=true
delayIndex=4
customIntervalSecs=10
updNeworkPolicy=1
updOnDBUS=0
updOnDBUSBus=0
updOnDBUSMatchRule=
rememberMe=
Let's focus on the script in a much readable format:
Code:
if [ "_$QBW_HOTSPOT_PRESS" == "_9" ] ; then
$QBW_HOTSPOT_PRESS variable gets substituted at run-time with the index of the position where the widget was clicked
Code:
	run-standalone.sh dbus-send
		--system 
		--print-reply 
		--type=method_call 
		--dest=com.nokia.osso_browser 
		/com/nokia/osso_browser/request 
		com.nokia.osso_browser.load_url
In this case we just issue the dbus command which spawn the browser and loads the URL specified by next parameter
Code:
		string:"$QBW_CURRENT_RESULTS_TEXT";
$QBW_CURRENT_RESULTS_TEXT variable gets substituted at run-time with the content of the results text of the widget itself (which in this case is hidden but still present) that contains the url of the image details page
Code:
else
If the widget update occurred due to other update policies (startup, timer, click on sectors other then 9, desktop switch...)
Code:
	a=`dd if=/dev/urandom bs=1 count=1 | od -i | head -n 1 | cut -f2- -d' '`;x=`expr $a % 24`;
We compute a random value between 0 and 24
Code:
	wget 
		-t 1 
		-T 10 
		-q 
		-U "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900" 
		-O - 
		"http://m.flickr.com/explore/interesting/"
We try once (-t 1), with a timeout of 10 seconds (-T 10), very silently (-q), setting our identity as if we were MicroB browser to retreive the lightest possible page (-U "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900"), sending the "http://m.flickr.com/explore/interesting/" page source to standard out (-O -) ready to be piped to next command
Code:
	| awk 
		-v i=$x
awk will take care of parsing our page, variable "i", in our awk script, will hold the random number we generated a bit earlier
Code:
			'BEGIN {
				FS="[\"]+"
				;n=0
			}
Beginning part of awk script will set the field separator to ' " ' character and initialize our counter "n"
Code:
			/^\t\t<a href=.+>/ { 
				u[n]=$2;
			}
We will then iterate through all pictures and retrieve the details page URL which we store in array u[]
Code:
			/<img src=.+class="pc_img">/ {
				gsub(/_s\.jpg/,"_m.jpg",$4);
				s[n]=$4;
				n++;
			}
We will then iterate through images, adjust URL for a more suitable image size (medium), store image URL in array s[] and increment our counter for next URL/image tuple
Code:
			END {
				r=system("wget -t 1 -T 5 -q -O /tmp/qbwflickr0.jpg \""s[i]"\"");
				print "http://m.flickr.com"u[i];
				exit r;
			}';
After having parsed all URLs/images tuples in our html source, we will then spawn the last image fetch with URL from random position in array s[] and save it to /tmp/qbwflickr0.jpg file which we will display if wget succeeds and return 0 exit status.
We then construct and print the URL of the image details page in array u[] and print it to our widget (Remember that it will not be shown on the widget because Results text is set as hidden)
This URL will be fetched, if necessary, next time sector 9 is clicked to open image details page URL.
Code:
fi
And we are done now!!!
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-07-06 at 22:22.
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 18 | Thanked: 4 times | Joined on May 2010
#327
Hi, I am new and I am using beacon for switching between my Overclock profiles. I have snippets for loading profiles and a snippet to show the minimum and maximum frequency. I would like to update the command of my loading profile snippet that when it is clicked, It will also click or update my snippet that shows min/max freq. Can anyone please help me on this?

I have an idea already but do not have enough knowledge on how to do it on code.

Overclock Snippet Command:
sudo /usr/sbin/kernel-config load MyConf

I would like to change it to something like

sudo /usr/sbin/kernel-config load MyConf

dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"<MY BEACON OVERCLOCK SNIPPET ID NAME???>"

I do not know if this idea of mine is right but the code I am trying to add is the code I found to launch desktop applications. Please help. Thanks
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#328
Originally Posted by janreiviardo View Post
Hi, I am new and I am using beacon for switching between my Overclock profiles. I have snippets for loading profiles and a snippet to show the minimum and maximum frequency. I would like to update the command of my loading profile snippet that when it is clicked, It will also click or update my snippet that shows min/max freq. Can anyone please help me on this?

I have an idea already but do not have enough knowledge on how to do it on code.

Overclock Snippet Command:
sudo /usr/sbin/kernel-config load MyConf

I would like to change it to something like

sudo /usr/sbin/kernel-config load MyConf

dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"<MY BEACON OVERCLOCK SNIPPET ID NAME???>"

I do not know if this idea of mine is right but the code I am trying to add is the code I found to launch desktop applications. Please help. Thanks
  1. Retrieve the QBW Instance ID of your snippet that shows min/max freq as per HERE
  2. Open the command of your loading profile snippet and append this statement to your command

    <your command> ; run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw<idX> oh.no.more.qbw.update_content

    Replace <idX> with QBW Instance ID you got in step 1

See HERE for technical details and examples.
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
Posts: 12 | Thanked: 15 times | Joined on Oct 2009
#329
Hi all,

I have setup queen beecon to activate my overclock profile when it is clicked.

I want to know how to set it to trigger after I "end call"?

Thanks to all in advance..
 
Posts: 12 | Thanked: 15 times | Joined on Oct 2009
#330
Hi all,

I have setup queen beecon to activate my general profile when it is clicked.

I want to know how to set it to trigger at a specified time so that it switches profile at certain time.

Thanks all in advance..
 
Reply


 
Forum Jump


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