The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,466 other followers

Archive for August 3rd, 2021

Windows: starting Chrome in full-screen kiosk mode from a batch file

Posted by jpluimers on 2021/08/03

When configuring a web-based kiosk for someone with Alzheimer’s disease, I wanted to start Chrome in full-screen kiosk mode.

Chrome full-screen kiosk mode

The secret for full-screen kiosk mode is to pass the -start-fullscreen command-line option. Thanks [WayBack] User ginomay89 – Super User for answering that in [WayBack] tablet – How to set Google Chrome to automatically open up and in full screen – Super User.

Finding chrome

At first I thought about differentiating on the chrome.exe location that you can find in the registry. This turned out to be depending on how you install Chrome:

  • locally for the current user by a non-local-administrator user (by default the location is under %LocalAppData%)
  • globally for all users by a local-administratator user (by default is under %ProgramFiles(x86)%)

Oddly, there is no way (not even by denying UAC elevation!) for a local administrator to install Chrome for only the current user.

This is odd, as when non-local-administrator denies UAC, the installation is locally to the user.

Then I remembered there are two ways for Windows to find an application

The cool thing is that the start command does the latter, so I came up with this batch file that starts chrome with the -start-fullscreen parameter that will initiate kiosk mode with the default chrome settings:

start "Chrome Kiosk Mode" chrome --start-fullscreen

In case I want to compare the registry settings

Basically sorting out the registry settings would mean parsing the references to chrome.exe (often with extra parameters) in the below registry key/value-name pairs.

One day I might need to do this for different reasons, but currently the start trick suffices.

Read the rest of this entry »

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows | Leave a Comment »

Firefox: disable DNS over HTTPS (which they call TTR)

Posted by jpluimers on 2021/08/03

There are many reasons to disable DNS over HTTPS (DoH), of which enough are discussed in the links below.

Disabling DoH always talks about setting TTR (the abbreviation Mozilla uses for it) to 5 (like [WayBack] Thread by @isotopp: “Firefox is about to break DNS by enabling DNS-over-HTTP by default […]”), but hardly ever explains the meaning of 5, or any other potential values.

After some searching, I found [WayBack] Firefox disable trr | Knowledge Base:

  • 0: Off by default
  • 1: Firefox chooses faster
  • 2: TRR default w/DNS fallback
  • 3: TRR only mode
  • 5: Disabled

I imagine the setting we’re all looking for is: user_pref(“network.trr.mode”, 5); (emphasis mine)

It pointed me to [WayBack] Trusted Recursive Resolver – MozillaWiki:

Read the rest of this entry »

Posted in Communications Development, Development, DNS, Firefox, Internet protocol suite, Power User, TCP, Web Browsers | Leave a Comment »

Parser generator toolset for Delphi (Yacc & Lex)

Posted by jpluimers on 2021/08/03

The most current Lex and Yacc for Delphi is [WayBack] GitHub – RomanYankovsky/ndyacclex: Parser generator toolset for Delphi (Yacc & Lex).

It came up during a funny Twitter thread, where one of the Delphi team members asked for it, despite – after decades of asking – there still being no official Delphi grammar available from the Delphi team, nor Google Search skills [WayBack].

Basically a parser generator is only as useful as the grammar you have for it.

There is no open source grammar for Delphi yet, so the best you can start with is from the same author: [WayBack] GitHub – RomanYankovsky/DelphiAST: Abstract syntax tree builder for Delphi

With DelphiAST you can take real Delphi code and get an abstract syntax tree. One unit at time and without a symbol table though.

Relevant tweets:

–jeroen

Posted in Delphi, Development, Software Development, Undocumented Delphi | 1 Comment »

 
%d bloggers like this: