Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: aus9 on December 13, 2012, 08:01:33 PM
-
hi
I intend to submit an tcz that has an EULA (end user license agreement)
its already a txt file
I know that I need to use /usr/local/tce.installed to create a script that will output the text onto the user's screen and then ask the end user to tab from disagree to agree.
How do I do that?
Alternatively, can anyone name an existing tcz that does this, so I can cheat off their /usr/local/tce.installed/filename script?
2) Do I create the file structure of the other files in nomal tcz structure or do I make the script take files from say
/tmp/unpack to their true positions once agreement has been confirmed
3) Is there any need for an audit trial that the user actually agreed?
--Do I need to create a file that has to be backed up in their .filetool.lst
------------------------------------------------------------------------------------------------------------------------
If I can find some kind soul to help my lack of coding skills, I can submit an EULA type tcz
Otherwise I might submit a "get a big file yourself to extract one file" tcz
---which I am thinking is not too smart
I already have a way to get the file....its the pepper flashplayer from Google Chrome.
I just need help in packaging it.
thanks for reading
trivia below----------------------
I looked at opera9....tce-load -i opera9 did not force me to read anything
ditto sun-jre7
YMMV
some funny EULA terms can be seen here
http://www.makeuseof.com/tag/10-ridiculous-eula-clauses-agreed/
-
Hi aus9
Read the info file for sun-jre.tcz
-
I looked at opera9....tce-load -i opera9 did not force me to read anything
Quite sure opera would prompt for accepting EULA upon each startup when no profile present.
-
Rich
I have been advised that user must actively agree, not sufficient to have in info file
tinypoodle
EEK I was expecting something to happen on download and install $ tce-load -i opera9
thanks for that
running
opera
EULA appears
so its not in the /usr/local/tce.installed/opera9 but somewhere else
I can't see it asking for /usr/local/share/opera/doc/license
I will have to go hunting later
I will re-look at sun-jre7 later as well
-
Asking for the EULA as part of the tce.installed script could be troublesome - what if I've got the extension in my onboot.lst?
You also almost definitely want to write out the user's acceptance to a file that can be backed up - Would you ask for the licence every time the user loads for the extension?
I would suggest just wrapping the binary in a script which checks and displays the EULA, but I don't think that would work for a browser plugin. One approach could be to copy some ideas from getflash.tcz? (A getpepperflash.tcz which has a script which checks the EULA and then creates the actual extension on the fly)
-
althalus
aah that explains why its not in the opera tce.installed script.
when I delete (dot)opera .....running opera recalls the EULA ....which is good.
but I lack the skills to know how create such.
I agree that what I might have is a script ....lets call it pepper
pepper goes in the menu and the desktop exec entry
it looks for (say) /home/tc/.pepper/agreed
--if found load the plugin
--otherwise call up aterm and redo the EULA
--when running the script....the text is displayed and the end user types "accept"
----------and so .pepper/agreed appears
I know how to write an if-then script but not how to get the output to get the input of the user
I lack the skills which is why I posted in the first place.
I did look at getFlash11 but AFAIK it does not compel any agreement on the end user so did not pursue it.
I also lack html skills so opera9 may not be the best to cheat off either....as the EULA for opera calls up a web browser.
2) getFlash11 does contain file called ....libflashsupport.so
but I don't think the EULA for pepper allows me to reverse engineer the plugin to a basic form
--luckily I don't have the skills even if the agreement did allow such
maybe I should post in the programming section to Linuxquestions to get the syntax?
-
Hi aus9
I know how to write an if-then script but not how to get the output to get the input of the user
Enter this in a terminal:
popask Do you agree to these terms?If you click Yes, it returns 1. If you click No, it returns 0. You can call it from a script and test the return value.
-
Rich
ok just a quick test
aterm -e less EULA.txt && popask Do you agree to these terms?
b) I had to use less and not cat, to keep the window open and its a looooong agreement to read
c) My apols to everyone for my bad spelling but long is deliberate, others were not
aaah I have got the idea of popask, any text after popask is echoed......that is great to know
cool feature
d) Now is there an easy way to grab the return value?
maybe
http://linuxconfig.org/Bash_scripting_Tutorial --reading user input?
-
read function seems to be it, but I might eliminate the popask, so it becomes in crude terms
script starts aterm higher up
...
echo 'read the EULA then press q to quit'
aterm -e less EULA.txt ---> popup of new aterm with EULA appears
(user presses q to quit popup)
echo 'Do you accept the EULA? type yes or no please'
read input
(user types yes or no)
$input is now defined and hopefully I can develop that further
-
Do you need a console application or application running in X environment? If so, make it in fltk. Easy to do, small, fast and fltk runtime is part of the graphical system.
-
bmarkus
its a web browser plugin so X required but I solve that by having chromium-browser as the dependency of this new tcz, when it is build correctly
-
ok work-in-progress but heres the plan
no script in /usr/local/tce.installed as discussed
info file to alert user to run (/usr/local/bin/pepper-consent)....can be run at any time if they fancy
also there is a /usr/local/bin/pepper script which calls chromium-browser in a certain way
also a desktop entry...called pepper with exec line of pepper
rough contents of consent is now
#!/bin/sh
if [ "$USER" == "root" ]; then
echo "Run as non-root please. Exiting."
exit 1
fi
# set the local user to $THISUSER
THISUSER=`cat /etc/sysconfig/tcuser`
echo 'This plugin has an EULA that needs your consent'
echo 'if you use it, you grant consent as well'
echo 'after reading the agreement please close the browser'
/bin/sleep 6
chromium-browser /usr/local/share/doc/flash-pepper/eula_text.html
echo 'Do you accept the EULA? type yes or no please'
read input
if [ $input != yes ] ; then
echo 'agreement refused, exitting'
else
# clear away old junk and create new entry
if [ -d /home/$THISUSER/.pepper ] ; then rm -r -f /home/$THISUSER/.pepper
else mkdir /home/$THISUSER/.pepper && touch /home/$THISUSER/.pepper/agreed
fi
fi
# if here, agreement confirmed
/usr/local/bin/pepper
I cheated off roberts for the root test and I have been cheating off bmarkus for the rm -r -f in most of my tczs
Of course, I am to blame for any errors in my outputs.
2) The pepper script will seek out the file .pepper/agreed. I won't publish it here as this post was concerned only with how to get EULA working.
I will unmark [SOLVED] if there are any issues that arise from my posts
thank you all for your input or patience, I am on a learning curve and am grateful for even negative comments (sometimes) :-[
-
I have just realized that I can use roberts code from getFlash11 to set the local user, will adjust above code later
THISUSER=`cat /etc/sysconfig/tcuser`