Active Topics

 



Notices


Reply
Thread Tools
neboja's Avatar
Posts: 277 | Thanked: 93 times | Joined on Jan 2010 @ Belgrade
#11
ok... so you make a bunch a config files, and every time you boot, it plays a diferent movie??? wright??? O_o
 
Pfuh3z's Avatar
Posts: 37 | Thanked: 27 times | Joined on Feb 2010 @ Antwerp, Belgium
#12
Originally Posted by neboja View Post
ok... so you make a bunch a config files, and every time you boot, it plays a diferent movie??? wright??? O_o
No, every time you boot, it plays all the movies referenced to by your config files. "Random" movie during boot would be a cooler feature though

Dries
__________________
Proud owner of
Macbook Pro 15" (Snow Leopard) // Mac Mini (Snow Leopard Server) // Desktop (Ubuntu 9.10, Windows 7)
Nokia N900 (Maemo 5 "Fremantle") // iPod Touch 3G

-- Loving my N900 and the Maemo community since Feb. 2010!
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#13
Originally Posted by rolan900d View Post
I found it...
I need to make 2 config files like this:

default.conf
default2.conf
if this really works...

you could store all of those files in an additional folder ../dconfs (for example).
then write a script which deletes the current defaultX.conf in the hildon/welcome folder and randomly copies any of the configs in /dconfs back when shutting the system down.

this script could be stored in /etc/init.d/. then you have to symlink it to the correct rcX.d folder, i guess it would be rc0.d (http://en.wikipedia.org/wiki/Runlevel).

ehm yeah... the script should then be executed when your system goes into halt?! o.O

and you'll always have a random video at (re)boot. ^^

edit: maybe it would be the best to change it on bootup with a rc2.d script

EDIT: THAT'S MY FINAL SOLUTION FOR HAVING RANDOM BOOTVIDEOS ON STARTUP AUTOMATICALLY -> http://talk.maemo.org/showpost.php?p...5&postcount=35

Last edited by b666m; 2010-02-20 at 13:45.
 
Posts: 527 | Thanked: 121 times | Joined on Feb 2010
#14
On my end it could only play 2 videos on boot!
The 3rd and 4rd worked but only for sound..
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#15
that would be a quick&dirty script for replacing the default.conf

you have:
/etc/hildon-welcome.d/default.conf
and
/etc/hildon-welcome.d/dconfs/ <- new folder where the configs are named "1.conf", "2.conf", "3.conf" and so on.

the script determines the number of conf-files in the dconfs-folder and replaces the default.conf randomly with one of them

Code:
#!/bin/bash

# determine number of files in /dconfs
cd /etc/hildon-welcome.d/dconfs/
nof=$(ls *.conf | wc -l)

# get random number in range of 1 - nof 
let "rn = $RANDOM % $nof + 1"

# choose random conf
rf="$rn.conf"

# copy it over to default.conf
cp $rf ../default.conf

# exit
exit 0

Last edited by b666m; 2010-02-18 at 17:31.
 
Posts: 323 | Thanked: 76 times | Joined on Jan 2010
#16
mightm as well put on a whole movie ;p
 
Posts: 5 | Thanked: 0 times | Joined on Feb 2010 @ Canada
#17
Hey Rolan900d,

I tried creating 2 default files.

default.conf

[hildon-welcome]
filename= (Hand boot screen)

And default2.conf

[hildon-welcome]
filename=short.avi

But It didn't work. Still shows only the Hands as intro and thats it.
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#18
you could also make desktop-shortcut which executes the script or only the code (as one-liner) when you want to have a another/random bootvideo next time. xD
 
Posts: 527 | Thanked: 121 times | Joined on Feb 2010
#19
Originally Posted by b666m View Post
that would be a quick&dirty script for replacing the default.conf

you have:
/etc/hildon-welcome.d/default.conf
and
/etc/hildon-welcome.d/dconfs/ <- new folder where the configs are named "1.conf", "2.conf", "3.conf" and so on.

the script determines the number of conf-files in the dconfs-folder and replaces the default.conf randomly with one of them

Code:
#!/bin/bash

# determine number of files in /dconfs
cd /etc/hildon-welcome.d/dconfs/
nof=$(ls *.conf | wc -l)

# get random number in range of 1 - nof 
let "rn = $RANDOM % $nof + 1"

# choose random conf
rf="$rn.conf"

# copy it over to default.conf
cp $rf ../default.conf

# exit
exit 0
I was really good in Symbian, but so a noob in Linux...
Learning a lot over here, but you are out of my league mate!


@b66m:
That would be great; but I got lost on that script...
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#20
outsch... too bad... $RANDOM doesn't deliver anything... this command isn't recognized at the n900 :/

Last edited by b666m; 2010-02-18 at 20:55.
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:21.