Posts in category “Tips”

Set CPU Performance Mode on MX Linux 25

Steps

  1. Install cpupower:
sudo apt install linux-cpupower
  1. Edit the init script:
sudo vim /etc/init.d/cpupower
# put the following content into this file
CPUPOWER_START_OPTS="frequency-set -g performance"
  1. Enable on boot:
sudo update-rc.d cpupower defaults
  1. Apply immediately:
sudo cpupower frequency-set -g performance
  1. Verify:
cpupower frequency-info | grep "The governor"

Should output: The governor "performance" may decide which speed to use


Note: MX Linux 25 uses SysVinit.

How to: Remove "Java Update Scheduler has stopped working" on Windows server 2022

Run regedit, navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run then remove the line that contains "jusched.exe".

Making DOSBox automatically mount your `~/games` folder

To make DOSBox automatically mount your ~/games folder as the C: drive every time it starts, you can edit the DOSBox configuration file. Here's how to set it up:

Steps:

  1. Locate your DOSBox configuration file:

    • On Windows, it's usually found in C:\Users\YourUsername\AppData\Local\DOSBox\dosbox-[version].conf.
    • On macOS/Linux, it's typically found in ~/.dosbox/dosbox-[version].conf.
  2. Edit the configuration file: Open the dosbox-[version].conf file with a text editor (e.g., Notepad on Windows or nano on Linux/macOS).

  3. Find the [autoexec] section: Scroll down to the very end of the file until you find the [autoexec] section. This is where you can add commands that DOSBox will execute when it starts.

  4. Add the mount command: Add the following line to mount your ~/games folder as the C: drive:

    • On Linux/macOS, add:

      mount c ~/games
      
    • On Windows, if you want to mount a specific folder, use the path like this (assuming your folder is in C:\Users\YourUsername\games):

      mount c C:\Users\YourUsername\games
      

    You can also specify different mount points or add other commands, but this one will mount your ~/games directory automatically as C:.

  5. Save the file: After adding the mount command, save the configuration file and close the text editor.

  6. Start DOSBox: Now, every time you start DOSBox, it will automatically mount the ~/games folder as the C: drive.

Example:

Here’s what the [autoexec] section could look like:

[autoexec]
# Lines in this section will be run at startup.
mount c ~/games
c:

If you need any more help with configuration, let me know!

Freeing an Occupied Port on Windows (GitBash)

  1. Check which process holds the port:

    netstat -ano | findstr :<port>
    
  2. Find the process name:

    tasklist | findstr <PID>
    
  3. Kill it:

    taskkill //PID <PID> //F
    
  4. Run as Administrator if access is denied. If the port stays stuck, reboot or disable conflicting drivers/services.

Setting up zoxide in PowerShell (pwsh)

  1. Install zoxide If you use Scoop:

    scoop install zoxide
    

    Or place the binary in a custom directory, e.g. C:\Users\David.Wei\bin.

  2. Add zoxide to PATH (if not already)

    [Environment]::SetEnvironmentVariable(
        "Path",
        $env:Path + ";C:\Users\David.Wei\bin",
        "User"
    )
    
  3. Initialize zoxide in PowerShell profile Find or create your profile:

    New-Item -ItemType File -Path $PROFILE -Force
    

    Edit it and add:

    Invoke-Expression (& { (zoxide init powershell --cmd j | Out-String) })
    
  4. Restart PowerShell Use j <dir> to jump quickly between directories.

That’s all.