Force Google SafeSearch in DansGuardian

I have been trying to get DansGuardian (now called E2Guardian) to force everyone to go through Google SafeSearch when they are searching using any Google service (images, web search, code, whatever). DansGuardian, as of 2.9.0.1, includes the ability to run Regular Expressions on urls, body content, and headers.

Google allows you to force safesearch by adding the option safe=on or safe=active to the url. In addition, Google has an undocumented feature that allows you to set “VerySafeSearch” by adding the safe=vss option. What I am trying to do is use the regexp url function to add this option.

DansGuardian has an example included that should force VSS on image search. Sadly, it does not work. Here is what I came up with:

"safe=off"->""
"(^http://[a-z]*\.google\.[a-z]*/[a-z]*\?)"->"\1safe=vss&"

These two lines need to be put into the file /etc/dansguardian/lists/urlregexplist. This should force Google VSS on all Google search services (except youtube) in all country codes (e.g. google.uk, google.cn, google.ca).

There are two parts to this. The first line removes the option that disables safe search: safe=off. The second line adds the safe=vss option.

The basic replacement syntax is this:
""->""
Simply, what is found between the first set of quotes is replaced by what is found in the second. For more details about regular expressions and danguardian see the following sites:
Perl Regular Expressions
Regular Expressions in Perl
Regular Expressions in DansGuardian

If anyone finds a way to get around this, please comment.

What else is new?

This election is fascinating, for several reasons. It represents the collision of the French Revolution’s view of liberty and freedom, vs. the American Revolution’s view of liberty and freedom. There is one major difference from which all the other differences are derived. The reason that humans have rights.

In the “declaration of independence” from the French Revolution, the reason humans have rights is stated as such: “The principle of all sovereignty resides essentially in the nation. No body nor individual may exercise any authority which does not proceed directly from the nation.”

So from the nation the rights of man come. Let us compare that with the American Declaration of Independence: “We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.”

According to the American Declaration of Independence, the rights of man come from their Creator. This is a very important distinction. America is called a Christian nation because it was founded on principles that are from Scripture, not because all of the founding fathers were Christians. Conversely, I have heard no one claim that France at the height of its revolution was a Christian nation. These conflicting beliefs about the origin of human rights determine what are considered to be man’s rights, and the role of government.

The French believed that man was basically good and the rule of the majority was right. The founding fathers believed that man is basically evil, although kept in check by God’s common grace. This was evidenced in the system of checks and balances, the intent of which was not only to keep a few from gaining control of government, but also to keep the many from gaining control of government. The founding fathers believed that there was possible evil as well as possible good in both cases. A few wise men can govern better than the will of the nation as a whole. Yet, the nation as a whole can govern better than a few evil men. The power of a few men is easy to usurp, and nation as a whole is subject to wide swings of emotion. One of the cornerstones of this system of checks and balances was the institution of both a higher appointed body (the Senate), and a lower elected body (the house) in the legislature. The Senate was intended to be a check on the wide swings of the people, and the house was intended to be a check on the potential corruption in the Senate. Possibly the worst piece of legislation in the history of these United States was the 17th amendment. It, in effect, turned the delicately balanced republic into a direct democracy, the results of which we are seeing today.

But how does this apply to our current election? John McCain, however poorly, represents the republican party. This party is at its core dedicated to the principles upon which this country was founded, principles laid out in the declaration of independence, the constitution, and the federalist papers. We believe that we are endowed by our Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.

On the other side is Barack Obama. He represents the democrat party, who at their core espouse the ideals of humanism. They believe that man has the right, not just to the pursuit of happiness, but to happiness itself. From this springs redistribution of wealth, the so-called “economic justice”, denial of individual responsibility, etc… This is a belief which is remarkably akin to the basic beliefs of the French Revolution.

We have seen the logical conclusion of the suppositions underlying the French revolution. It resulted in either communism, monarchy, or anarchy. We have also seen what happens to freedom in that context. Look at freedom of religion as an example. In France, all churches were forced underground.

We have also seen the logical conclusion of the American revolution. Look at religious freedom during the revolution. Even Jews wanted to live here, because it was the first country to allow total freedom of religion.

The question underlying this election is not which is a better worldview. It is, in the words of Abraham Lincoln: “testing whether that nation, or any nation so conceived and so dedicated, can long endure.”

However, there is yet another aspect to this election. It is interesting to compare the state of our government with the state of the governments of ancient Rome and Carthage at the time of their falls. The cycle of nations begins with a patriotic people rising to the occasion. Every setback only nerves the nation to greater exertions. Every success, is an opportunity for rejoicing. An interesting attribute of such a nation is the relative poverty of its people.

However, nations over time become wealthier. This wealth breeds desire for more, and the lack of willingness to sacrifice for the good of the nation. Eventually, every setback causes despair and is taken as an opportunity to throw out the current party. Every success is downplayed by the opposition. Every national event is used for political ends. This is a state that George Washington describes in his farewell address:
“All obstructions to the execution of the laws, all combinations and associations, under whatever plausible character, with the real design to direct, control, counteract, or awe the regular deliberation and action of the constituted authorities, are destructive of this fundamental principle, and of fatal tendency. They serve to organize faction, to give it an artificial and extraordinary force; to put, in the place of the delegated will of the nation the will of a party, often a small but artful and enterprising minority of the community; and, according to the alternate triumphs of different parties, to make the public administration the mirror of the ill-concerted and incongruous projects of faction, rather than the organ of consistent and wholesome plans digested by common counsels and modified by mutual interests.
However combinations or associations of the above description may now and then answer popular ends, they are likely, in the course of time and things, to become potent engines, by which cunning, ambitious, and unprincipled men will be enabled to subvert the power of the people and to usurp for themselves the reins of government, destroying afterwards the very engines which have lifted them to unjust dominion.”

George Washington was a wise man who understood history and the cycle of nations. He saw that eventually, his fledgling country would be taken over by factions, who would use every possible incident for their sole benefit.

This state of affairs is typical of a nation just before its fall. We live in dangerous times. We face threats from all sides. We have few strong allies. We are capable of defeating these threats and emerging a more powerful and respected nation than ever in the history of the world. Do we have the will? Are we capable of making this sacrifice? Look to the generation of the 1940s as an example. The beginning of the end could very well be November 4th, 2008.

Smart Board Jitter Problem

I finally fixed a problem yesterday with a smart board. Basically, if you see any kind of jitter when drawing on the board, check to see if the bottom mounting screws are insulated. This can be fixed with some electrical tape or rubber washers. More details (Warning, PDF).

Windows Server Redirected Folders Solved!!!

I finally solved my long-standing problem with redirecting the my documents folder to a share on the server. I couldn’t get the GPO to actually apply the redirect. What made it more annoying was that synchronize would enable and apply changes on login and logout.

So for future reference: change the root share to be writable by everyone, and then set per folder NTFS permissions.

Play Video/DVD on secondary display

I am trying to play a video or DVD on a secondary monitor without showing any controls on it, or having to drag any windows onto it. I basically need a media player with a powerpoint-like presentation mode. This needs to work on Windows Vista.

I have looked at VLC and Windows Media Player. VLC has the ability to do exactly what I need when I set DirectX mode. This has some other drawbacks however, such as running in basic mode and being unable to see the playing video before making it full screen.

I hope I can find a solution soon. My final attempt will be to write my own program using either WMP, VLC, or some other framework as a backend.