Log of firefox use.

Share your opinion about Porteus Kiosk Edition.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
ryandcosta
White ninja
White ninja
Posts: 5
Joined: 16 Jun 2014, 15:19
Distribution: 3.1 kiosk
Location: Peterborough, Ontario

Log of firefox use.

Post#1 by ryandcosta » 16 Jun 2014, 15:53

Hi,

I happened to stumble upon porteus and I am currently evaluating the kiosk version for our University Library.
Please, bear with me as I am a linux newbie.

The system is great since it will launch of a usb stick and can be easily modified, but I would like to know how to track usage of the firefox browser.

Basically we want to track the usage of the kiosk machines and wanted to know if and how to write a cron job that tracks the amount of times the web browser is utilized on our main catalog site.
If user activity is reported, the system comes out of screen saver mode and then a log is generated of the event. (At least I think based on the use case this should suffice).
Maybe add another for when the computer is booted up, but there may be incorrect reporting due to regular events such the system not being in screen saver mode and has shut down after a period of inactivity.

Thanks
Ryan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Log of firefox use.

Post#2 by fanthom » 16 Jun 2014, 16:54

hello Ryan,

any kind of logging is not welcome in kiosk as it runs in RAM and one day it may be overfilled with logs. this is not the problem when you restart the kiosk daily but logging is disabled by default as Porteus Kiosk is designed to run 'forever' without any restart required.

i would suggest you implementing a proxy server in your library and configure every client to use it. this way you would know exactly which PC is visiting which site and for how long.
logs would be stored on the server side and not the client. this solution is the simplest and the most efficient.

if proxy is not an option then i'm not sure how to track visited sites directly from firefox. maybe there is some addon which allows this?
i'm sorry but i dont know the answer at the moment.
Please add [Solved] to your thread title if the solution was found.

ryandcosta
White ninja
White ninja
Posts: 5
Joined: 16 Jun 2014, 15:19
Distribution: 3.1 kiosk
Location: Peterborough, Ontario

Re: Log of firefox use.

Post#3 by ryandcosta » 16 Jun 2014, 19:39

Hi,

Thanks for the quick reply. I was looking at the proxy server as a viable solution, but thought of a really simple solution.
Since I am not a sys admin, I don't know if I would have the expertise in setting up a proxy server.

How hard would that be for a help desk newbie?

1) Set a splash page where the user agrees to the terms and conditions.
2) If they click submit on the page, it updates a database table I have setup to record the machine, date and time.
3) Once the period of inactivity hits 2-5 minutes the system resets the browser back to the start page and hopefully the next user gets recorded.

The only problem here is that the user may just open a new window and start fresh.
This may miss some users, but we just need basic reporting since most patrons have their own laptops/tables/phones to browse through our online catalog.

Thank again.
I really like porteus and hope we end up using it as a kiosk.

Ryan

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Log of firefox use.

Post#4 by fanthom » 17 Jun 2014, 13:13

if proxy is not an option then you may have a look on 003-settings.xzm/etc/xdg/openbox/autostart and add your code to the firefox loop:

Code: Select all

# Start firefox in a loop:
while [ 1 ]; do
    date >> /var/log/firefox-log
    hostname >>/var/log/firefox-log
    rm -rf /home/guest; cp -a /opt/porteus-scripts/guest /home
    su guest -c "firefox"
done
this way you would know when firefox was closed or restarted (user session expired).
Please add [Solved] to your thread title if the solution was found.

ryandcosta
White ninja
White ninja
Posts: 5
Joined: 16 Jun 2014, 15:19
Distribution: 3.1 kiosk
Location: Peterborough, Ontario

Re: Log of firefox use.

Post#5 by ryandcosta » 17 Jun 2014, 16:10

Hi,

Very simple solution! :-)
This way I can eliminate sessions that are between time stamps.
Thanks fanthom!
I will give this a try.

Locked