White list filter web site problem

Post bug reports related to either the kiosk ISO or the kiosk wizard here.
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
User avatar
Debadr
Black ninja
Black ninja
Posts: 43
Joined: 28 Apr 2015, 13:39
Distribution: Porteus Kiosk Edition 3.3.0
Location: France

White list filter web site problem

Post#1 by Debadr » 02 Jun 2015, 14:06

Hi all,

This is not properly a PKE bug, i just need help to solve my problem.
i have a white list with this website on it : https://www.portail-vie-etudiante.fr which i put it like this in my web config file:

Code: Select all

...
whitelist=portail-vie-etudiante.fr
...
So i can go all over the website without any restriction.
My problem is when i activate white list filtering something goes wrong and i see problems on display (If i disable filtering i have no problem of display) : please sea the link and compare with the picture below: https://www.portail-vie-etudiante.fr
Image
As you can see all the content goes to the left side without any reason.

I tried to see if the page needs more url's so it can display properly using HttpFox An HTTP analyzer addon for Firefox, and i founded some websites like googleapis.com and cnous.fr that are needed to be white listed, which i have done, but same problem as far...

I tried also to add flash + java modules but no change, the content goes to the left. Again :wall:

If someone can help on this it would be great thank you !
using PKE 3.3.0
If you give a man a fish, he eats for a day. Teach him how to fish and he will eat forever...

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

Re: White list filter web site problem

Post#2 by fanthom » 02 Jun 2015, 20:19

unfortunately i dont know the answer.
some sites are not compatible with the whitelist function we have in kiosk and i would like to avoid any addons as they may go outdated/unmaintained.

anyway - for your custom build you could try to integrate easy whitelist addon which should work without problems:
https://addons.mozilla.org/en-us/firefo ... whitelist/

you may follow general instructions i posted here:
http://forum.porteus.org/viewtopic.php? ... 415#p24321

ofc - you have to install addon. to unblock access to about:addons please delete chrome/userContent.css from firefox profile.
Please add [Solved] to your thread title if the solution was found.

User avatar
Debadr
Black ninja
Black ninja
Posts: 43
Joined: 28 Apr 2015, 13:39
Distribution: Porteus Kiosk Edition 3.3.0
Location: France

Re: White list filter web site problem

Post#3 by Debadr » 03 Jun 2015, 06:42

Hi Fanthom,

Thanks for your answer.

Unfortunately we also try to make clean OS's with PKE and avoid any third party softwares, so re-installation, upgrades and modification won't take much time.

May be if you tell me how white list works on PKE (how the system reads the configuration file, and where he put entries of the white-list) i could do something, logs ? configuration file ?

Thank you.
If you give a man a fish, he eats for a day. Teach him how to fish and he will eat forever...

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

Re: White list filter web site problem

Post#4 by fanthom » 03 Jun 2015, 08:29

whitelist is implemented through a css rule like described for example here:
http://superuser.com/questions/318912/h ... ontent-css

please do as follows:
- setup whitelist for some websites
- login to kiosk through ssh
- run 'cat /home/guest/.mozilla/firefox/c3pp43bg.default/chrome/userContent.css'

and check how the rule is constructed. if you find an improvement to it - please share.

thank you.
Please add [Solved] to your thread title if the solution was found.

User avatar
Debadr
Black ninja
Black ninja
Posts: 43
Joined: 28 Apr 2015, 13:39
Distribution: Porteus Kiosk Edition 3.3.0
Location: France

Re: White list filter web site problem

Post#5 by Debadr » 03 Jun 2015, 14:28

Thank you Fanthom,

Since this morning, i am trying some modifications, i putted the userContent.css on my debian so i can at least try faster the modification without the need to modify configuration file and reboot PKE ... every time :D

No solution so far at the moment :wall: , but i asked a friend for some help , will be back tomorrow with more informations hopefully. :)
If you give a man a fish, he eats for a day. Teach him how to fish and he will eat forever...

User avatar
Debadr
Black ninja
Black ninja
Posts: 43
Joined: 28 Apr 2015, 13:39
Distribution: Porteus Kiosk Edition 3.3.0
Location: France

Re: White list filter web site problem [Hiding the Bug]

Post#6 by Debadr » 04 Jun 2015, 12:37

Ok we found one of the possible solutions. It's not the cleanest way neither the automatic way but it works.

Please notice that this solution is based on html/css of this website : https://www.portail-vie-etudiante.fr. The solution may vary depending of how the website is programed.

To find what is the problem on our website and the white list we used the firefox/iceweasel investigator so we can see the html code and values that is given to the body, tables and containers of the html code.

The part of the html code that interest us founded, we tried to do some modifications to the /home/guest/.mozilla/firefox/c3pp43bg.default/chrome/userContent.css file that basically is like that :
1) The part that everyone have hard-coded on the iso : This is how no one have access to the configuration of firefox (partially)

Code: Select all

 @-moz-document regexp("^about:addons|^about:accounts|^about:cache|^about:config|^about:customizing|^about:home|^about:memory|^about:networking|^about:permissions|^about:preferences|      ^about:support|^about:telemetry|^chrome:.*|^file:.*") {
         html, page, window {
                display: none !important;
         }
 }

2) This is the part that is added under the hard-coded part when we configure a white list : here we added to the white-list just our web site portail-vie-etudiante.fr :

Code: Select all

body, body > * { display: none }
html { background: url(file:///usr/share/pixmaps/blocked-content.png) no-repeat center top }
@-moz-document regexp(".*portail-vie-etudiante.fr.*")
{body, body > * { display: inherit }
body > script { display: none }
html { background: inherit }}
The solution :
The solution founded is about trying to reset the values of the containers that make all content goes to the left side.
The containers (tags) concerned in our case is : #area, #area > tr (tr is a tag in the area tag) and #tabscontent.
3) After a little bit of how to's and googling we founded how resizing this tags and we add this part on the userContent.css file at the end :

Code: Select all

@-moz-document regexp(".*portail-vie-etudiante.fr.*") {
	#area{
	position: relative;
	text-align:center;
	}
	#area > tr{
	width:100%;
	margin: 0 auto;
}
    #tabscontent{
    display: inline-block;
    width:1200px;
	margin-left: auto;
	margin-right: auto;
    }
}
And just after that size of the text becomes readable, of corse depending of your problem you can play with the marges and size of tags to have the optimum display in your case.
Remaster the iso after re-compressing the 003-setting.xzm and basically the problem is "fixed" or hided if you prefer :).

Consider that this is not a general solution (This ISO will remain with this kind of machines and need) neither a patch or a fix, this is just how to hide this kind of problems.

Hope this will help others and also to find a better way to fix this bug. :)
If you give a man a fish, he eats for a day. Teach him how to fish and he will eat forever...

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

Re: White list filter web site problem

Post#7 by fanthom » 04 Jun 2015, 14:38

i wish there was a way of implementing some general solution. i guess this wont be easy/possible.

thanks a lot for sharing.
Please add [Solved] to your thread title if the solution was found.

User avatar
Debadr
Black ninja
Black ninja
Posts: 43
Joined: 28 Apr 2015, 13:39
Distribution: Porteus Kiosk Edition 3.3.0
Location: France

Re: White list filter web site problem

Post#8 by Debadr » 05 Jun 2015, 06:35

I wish too, but as far i saw, this is gonna be tough, unless you knows a css master and even... From what we saw, this is not about the userContent file, this is about the quality of coding websites... when someone defines 4 tags (containers) for one block of text this is more about torture then everything else...

But hey , PKE have zoom option on hes browser ;) unless this bug becomes a universal one it's more a usability problem that not affect the basic services that PKE's offers :).

Good luck, thank you again for PKE :good:
If you give a man a fish, he eats for a day. Teach him how to fish and he will eat forever...

Locked