Monday, January 8, 2024

Remove Gallery from Windows Explorer on Windows 11

In the following registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace_41040327

Delete the following key

{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}

[ trackback ]

Thursday, September 28, 2023

Powerpoint default slide deck, NOT default theme.

There's a lot of confusing answers regarding how to set the default template to use when opening Powerpoint.

A lot of people ask how to set the default template, answers usually are how to set the default theme.

Not the same thing.

Apparently, the only way I've found to actually change the default slide deck used when opening Powerpoint is to replace the file of the default template (apparently hardcoded location).

Location: %appdata%\Microsoft\Templates

Filename: default.potx or blank.potx

[ trackback ]


Thursday, September 21, 2023

Automatic client certificate choosing in browsers

 Long time, no see!!

If you have some corporate websites that require you to present a client certificate to access them, browsers are set to make you select the certificate EVERY TIME YOU ACCESS THE SITE, even if you only have one personal certificate.

To change this you can use:

MS Edge @ Windows (should be similar for Chrome, did not test)

Add a reg key at
Computer\HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge\AutoSelectCertificateForUrls
Then add one entry per domain to match

There are GPOs to make this more Corporate IT friendly.

Chrome @ Mac

Execute the following on a terminal

defaults write com.google.Chrome AutoSelectCertificateForUrls -array
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '
[
  { "pattern": "[*.]domain.tld", "filter": { "ISSUER": { "CN": "<issuer name>" } } }
]
'

Add one "pattern" line in the json array per domain to match.

Firefox (OS independent, AFAIK)

in "about:config"
define 'security.default_personal_cert' as "Select Automatically".


Sunday, September 23, 2018

Alt-TAB behavior in Ubuntu's Gnome Shell

Default behavior group TAB of the same app is a pain for me. Changing this to show all individual windows is as follows.

  • Open dconf-editor
  • Go to org/gnome/desktop/wm/keybindings
  • Move the value 'Tab' from switch-applications to switch-windows
  • Optionally move 'Tab' from switch-applications-backward to switch-windows-backward
  • If you want switch-windows to work across desktops, not just in the current desktop, you can also uncheck org/gnome/shell/window-switcher/current-workspace-only
  • Close dconf-editor
  • Press F2, then type r to restart Gnome.

The last step does not always appear to be necessary, but it should not hurt (especially since it does not close any of your running applications).

[ trackback ]

Wednesday, May 9, 2018

Keepass and Cygwin's ssh

Since having Cygwin installed anf fully operational, I've let go of PuTTY a long time back.

But Keepass keeps the default ssh:// handler dependent on PuTTY.
Here is how to change it, and use Cygwin's plain old 'ssh' com MinTTY terminal.

On Keepass, Tools > Options > Integration, click 'URL Overrides' on the bottom right.



Untick the default ssh handler.

Next, create a new entry, with:

Scheme: ssh
URL override:
cmd://C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -h error -e /usr/bin/bash -l -- ssh -l {USERNAME} -p {BASE:PORT} {BASE:HOST}
(adjust paths accordingly)

This has one caveat, where you need to always define the port number on the URL field, and not leave it blank...

example: ssh://host.name:22

One option is to create a wrapper for ssh, so it can handle URL formatted arguments (protocol://username@hostname:port), split it accordingly, and handle all the possible omissions.... but that's for another post....

Thursday, July 13, 2017

FreeDNS dynamic DNS update client (revisited)

Back in 2011 I posted a tweaked script from afraid.org (of FreeDNS) - named dnsactual.sh - to update your IP addresses dynamically in this DNS service provider.

Today I reviewed it, and I further tweaked it, removing dependencies for external web sites.
Before, a GET to http://ipecho.net/plain (or other similar site) was required to get you your public IP address.
But if the site is unavailable, you could get in trouble and end up shooting yourself on the foot, messing up your dynamic DNS entries.

Thanks to OpenDNS (or the omnipresent Google), there is a way to get your IP address with a simple 'dig' query :-)

dig +short myip.opendns.com @resolver1.opendns.com
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com [ trackback ]

Now the updated script. Feel free to used, edit, magle, whatever!
This logs any updates to syslog, and appends to file, for historic reasons.
I know it could have a lot more health checks for error handling, but for me it's enough.

#!/bin/bash

FQDN="## your own FQDN on FreeDNS ##"
TOKENS="## get your own##"
PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGGER="logger -t FREEDNS"

CacheIP=$(dig +short $FQDN @ns1.afraid.org)
CurreIP=$(dig +short myip.opendns.com @resolver1.opendns.com)

if [ "$CurreIP" != "$CacheIP" ]
then
  for A in $TOKENS ; do
    $LOGGER `curl -k -s "https://freedns.afraid.org/dynamic/update.php?$A"`
  done
  echo "`date +%Y%m%d-%H%M`: New IP address $CurreIP (old was $CacheIP)" >> /var/log/freedns.log
else
  $LOGGER "Public IP hasn't changed..."
  # the 'else' section is just to validate if the script is actually running, not really needed once tested
fi

Tuesday, March 8, 2016

External NTP sync for Domain Controllers (refresh)

Waaaay back in 2012, I etched a note on how to sync Domain Controllers to an External NTP source.

Now, back to the future (not so near... 2013), it got *A LOT* simpler...

w32tm.exe /config /manualpeerlist:"0.#country_code#.pool.ntp.org 1.#country_code#.pool.ntp.org" /syncfromflags:manual /reliable:YES /update

And that's all, folks!

[ trackback ]