18/09/2023

Windows 11 is PITA

Finally after 11 years with my old gaming PC I made it! I finally got a new build with a brand new Ryzen 5 CPU!

Maybe I’ll make a post about it, specially for some power consumption considerations, but now it’s PITA time, to be precise it’s Windows 11 PITA time.

Yes, I installed Windows 11 on this new pc, Windows was an obvious choice for a gaming pc, and Windows 11 was the only choice that made sense for a new configuration.

But yes… Windows 11 is a PITA (for those who don’t know this means “Pain In The Ass”), there are many reasons for that, maybe I’ll post about them while I’ll encouter them, but for now let’s start with the first PITA example: default app selection for a certain type of file.

I know it’s not a new thing, also Windows 10 had this problem, but you can solve it easily with a few click here and there, but Windows 11 added a new layer of complexity on top of that.

Right now I spent half an hour finding how could I open PNG files by default with IrfanViewe (btw go to https://www.irfanview.net/ and install it, it’s the best image viewer and basic editor on the planet) because by default Windows 11 associate .png file with the Microsoft Photo app (which is really bad and slow compared to IrfanView).

The main problem is that the .png file are not listed in the default app (Microsoft Photo), same goes for .png file extention, and you can’t uninstall the Microsoft Photo app using the Windows Apps window.

But thanks to PowerShell and administrator rights you can do it.

  1. open PowerShell with administrator rights
  2. use “get-appxpackage *photos*” to get the details on the default app for photos
  3. use “get-appxpackage *photos* | remove-appxpackage” to uninstall the default app for photos.
  4. try to open a png file and select IrfanView as a default app.

04/09/2023

Slow Cygwin TTY

Maybe I’m the last user on earth using Cygwin (I doubt it considering the project is well maintained and its newsletter is very active) but lately I noticed that opening the terminal window takes really long time.

After digging a little bit I found the problem came from my working pc logged on an Active Directory domain (for instance I’m not an AD lover… but that’s another story) and obviously Stackoverflow had the solution (I’m quite surprise we didn’t found the cure for cancer or the meaning of life on it… yet).

https://superuser.com/questions/877051/cygwin-from-windows-is-very-slow-laggy/1183283

I report it here just in case some day Stackoverflow will be bought by some lunatic billionaire that will decide to turn it into ashes…

Rough solution:

$ mkpasswd -l -c >/etc/passwd
$ mkgroup -l -c >/etc/group
$ echo 'passwd: files' >> /etc/nsswitch.conf
$ echo 'group: files' >>/etc/nsswitch.conf

More elegant solution

$ cygserver-config
Generating /etc/cygserver.conf file

Warning: The following function requires administrator privileges!

Do you want to install cygserver as service?
(Say "no" if it's already installed as service) (yes/no) yes

The service has been installed under LocalSystem account.
To start it, call `net start cygserver' or `cygrunsrv -S cygserver'.

Further configuration options are available by editing the configuration
file /etc/cygserver.conf. Please read the inline information in that
file carefully. The best option for the start is to just leave it alone.

Basic Cygserver configuration finished. Have fun!

31/03/2021

Windows Server reboot log

Windows Even Log is PITA, it always has been, It will always be…
Today I had an alert about an unexpected reboot from one of the few Windows Servers I have and I want to find why it happened and who did it.
Everytime I try to search something in the Even Log I want to cry, it’s one the most time consuming and painful activities I can think about…

But today I found a nice Powershell command that will sort this out in no time… or at least the time taken by the system to search inside the damn Event Log, which usually is quite long…

Get-EventLog -LogName System |? {$_.EventID -in (6005,6006,6008,6009,1074,1076)} | ft TimeGenerated,EventId,Message -AutoSize –wrap

I hope this will come handy

23/03/2021

OVH on fire

As you may heard on march 10th a large fire destroyed part of a big datacenter in Strasbourg owned by OVH (maybe the biggest european service provider), and yes, this blog burned with it.

After the accident there was a huge discussion on the web, flames (sigh…) on Twitter and Reddit about this crazy provider which doesn’t have a disaster recovery plan or some sort of automagic backup, so people get stucked with no options other than start their site/service from scratch…

Some of you may think I’m mad about it and I would run away from this provider… well I’m not and I’ll remain with OVH.

The reasons are very simple, first of all as you can see the blog is back (maybe better than before, things like this always makes you think how can you improve stuff, or at least this is how they work for me) because (surprise surprise!) I had a backup every 6 hours on another location (thanks restic).
The second reason why I decided to stay with OVH is that their vps offer is perfect for my needs, it costs like a shared hosting service and runs so much better, and obviously I can do whatever I want with my private vps, instead of get stucked with only a wordpress hosting service.

And no, I’m not mad with OVH, because even without reading carefully the contract I signed, I knew from the beginning that I had to take care of backups, even if they were included in the service (and they’re not in my case).
Why? Because I want backup made on my way, so I can control them, I can check them, I can figure out the best recovery plan for me.

I understand those who were complaining about backups made in the same location where the burning happened, they payed for a service and it has a flaw (a big one, don’t get me wrong).
But from my perspective there was a bigger flaw, and it was their thinking “ok I paid someone to take care of the backup, job’s done”.
No… no…. NOOOOO!
If you own a service you have the responsibility to take care of the backup, to understand it, to figure out the recovery plan, and to test it; if their backups burned with servers it’s because they missed one, many or all those points.

That’s it, for me the case is closed.

22/03/2021

Dell iDrac java patch

Every now and then people ask me which is my favorite server producer, and every time I honestly don’t know how to reply because they all work pretty well.
What really changes between competitors are technical support and some of the small bits that many people consider irrelevant, but Imho they are very important, one of them, maybe the most important, it the lights-out management interface (LOM).
Every server producer has it’s own LOM interface, but my favorite (and one of the reasons why I prefer Dell servers) is the Dell Drac.

One of the most common problems with Dell Drac is the virtual console which requires Java JRE and obviously this makes people angry because… well basically because people are lazy, most of the time leave the brain turned off and don’t read errors and exceptions…

If you search online “dell drac java error” you’ll find a whole bunch of forums, thread, reddit posts, also useless Chrome extentions for make the damn virtual console work, sometimes those sources are crap, sometimes they contain small bits of the solution, which is changing because there are several versions of Drac devices and obviously they evolved during the years.
These errors always came from the java.security settings, Drac encrypt data transmissions, and old Drac cards use old encryption protocols and cypher suites, so I decided to make a simple patchfile for the java.security file for a quick change and rollback (it’s not a good idea to turn on old unsecure protocols for you JRE).

First of all you have to identify your java.security file, which is inside you JAVA_HOME/lib/security, after that apply this java.security patchfile.

After that open you java settings and add the url of your Drac web interface to the “Security > site exception” list.

That’s all, now you’ll be able to open the vitual console even on an old Drac 5 with the latest JRE (tested right now with JRE 1.8.0_261).

« Post precedenti | Post successivi »