Windows: Turn off all your monitors via the command line

Submitted by Druss on Wed, 2021-11-24 19:26
  1. Create a batch file named turnoff.bat on your desktop.
  2. Open it and add the following line
    powershell (Add-Type '[DllImport("user32.dll")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
  3. Save the batch file.
  4. Run the file to turn off your screens.There will be a brief command-line window that pops up during execution.

Tested on Windows 10.

Windows: Continuously monitor network connections

Submitted by Druss on Thu, 2021-10-28 20:59

You sometimes want to check if a program that you've installed is doing anything funky. While you could install a full-blown packet analyser like WIreshark, sometimes, that is overkill. A quicker and handier option would be to just rely on good old netstat. Like so:

netstat -bn 10

as well as

netstat -bf 10

-b: displays the program name (executable)

-n: displays the IP address

-f: displays the resolved form of the IP address

Finding out which DNS servers are currently being used in Linux (Ubuntu)

Submitted by Druss on Tue, 2020-12-08 21:23

So, I've been facing some DNS issues with my Ubuntu box and needed to do some debugging. While I was certain that my router was assigning the Google DNS servers (8.8.8.8 and 8.8.4.4) via DHCP to my machine, I needed to make sure that they were actually being used. Usually, I would be able to tell by looking at the output of /etc/resolv.conf oslt. However what I found in resolv.conf was

USB Device over current status detected [ASUS motherboard]

Submitted by Druss on Mon, 2020-10-05 21:53

An ASUS ROGSTRIX B450-F gaming motherboard that I have had been working perfectly fine for a year. Suddenly though, booting up the system resulted in the following message on the POST boot screen:

USB Device over current status detected !! System will shut down after 15 seconds

The system would shutdown and restarting would result in the same message. I couldn't get into the BIOS either as the del and F2 keys did nothing.

Linux: Computer immediately restarts after shutdown

Submitted by Druss on Tue, 2020-07-21 02:53

So I have a Xubuntu box, an old PC that was running Windows previously. All is peachy with the Linux install bar one thing: every time I shutdown the system, it shuts down fine, but immediately restarts again. This wasn't happening with Windows and appeared to be an issue particular to Linux or Ubuntu.

Youtube playing OK in browsers, but other embedded videos do not

Submitted by Druss on Sat, 2019-03-30 23:23

On a fresh installation of Windows 10, I found that Youtube was working just fine, but other embedded videos on sites like Twitch and Reddit were not. I thought it had something to do with HTML5 or flash, but as it turns out, it was because I had chosen the wrong version of Windows during the installation process. Choosing Windows Professional N or, basically any N version, results in video issues primarily due to the lack of appropriate codec and DRM support. Even Netflix will very likely not play. This also affects all browsers.

Freeplane hangs in Kubuntu 18.04

Submitted by Druss on Mon, 2019-03-11 17:58

Freeplane, a fork of the mind-mapping program, Freemind, works really well. Except for the fact that in my (K)Ubuntu installation, it sometimes hangs in the middle of editing a node. Once it becomes non-responsive, the only fix is to kill the process and restart the program. The version of Freeplane in Ubuntu 18.04 is 1.6.13. However, the current version (March 2019) of Freeplane is 1.7.7. So, it's highly possible that upgrading Freeplane to the latest version will fix this issue.

Create a bootable Windows installation USB drive using Linux

Submitted by Druss on Sat, 2019-01-19 02:32

I needed to install Windows and downloaded the 4.7GB Windows 10 ISO from Microsoft's website. Since I only had Linux machines at my disposal (and no DVD drives), I had to look to install the ISO on a pen drive. While the purists advocated that I use dd to accomplish this, I found that getting the USB to be bootable was something of a chore. So I looked for a friendlier solution and this is what I found for Kubuntu:

Netflix Playback Error Code: F7701-1003

Submitted by Druss on Sat, 2018-11-24 01:56

So I tried playing a video on Netflix in Firefox and while everything worked including the previews while hovering over a title, the actual movie/TV episode failed to play and resulted in the following error:

Playback Error Code: F7701-1003

The main thing that needs to be done is to enabled DRM support in Firefox's preferences section. (Look for a checkbox titled "Play DRM-controlled content".)

Pages

Subscribe to languor.us RSS