4/28/2026

On Ubuntu 22.04/24.04, SAML authentication from GlobalProtect doesn't open the default browser

 The problem was that ~/.config/mimeapps.list doesn't have the correct setting for type text/html=. It should be set to text/html=microsoft-edge.desktop or your chosen browser.

4/13/2026

Ubuntu 24.04 installation on Surface Pro 9 & Surface Pro 11

 Issues:

    bluetooth: The bluetooth doesn't work after hibernation. The following steps nneed to be added:

        1. sudo emacs /lib/systemd/system-sleep/bt-lunar-fix

        2. Paste the following script:

#!/bin/sh

case $1 in

  post)

    echo "Resetting Bluetooth for Lunar Lake..."

    systemctl stop bluetooth

    modprobe -r btintel_pcie btintel bluetooth 2>/dev/null || true

    sleep 1

    modprobe btintel_pcie

    systemctl start bluetooth

    ;;

esac

        3. sudo chmod +x /lib/systemd/system-sleep/bt-lunar-fix

    hibernationsurface pro 9 hibernate won't shutdown completely on ubuntu 24.04. Need to add Adding specific kernel flags can force the hardware to respect power-off commands.

    Open the configuration: sudo nano /etc/default/grub.

    Find the line GRUB_CMDLINE_LINUX_DEFAULT.

    Append pci=hpiosize=0 to the existing parameters (e.g., GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=hpiosize=0").

    Update GRUB: sudo update-grub and reboot.


    sogou pinyin: Should not install fcitx5. sudo apt purge fcitx5. Need to install fcitx.


    GrubAdding GRUB_DISABLE_MEMTEST=true to /etc/default/grub and re-running sudo update-grub to remove the memtest from the grub selection menu.

12/21/2025

How do I install the NVIDIA drivers for RTX A6000 GPUs on Ubuntu 22.04?

 


How do I install the NVIDIA drivers for RTX A6000 GPUs on Ubuntu 22.04?

Installing NVIDIA drivers for the RTX A6000 on Ubuntu 22.04 requires a few key steps to ensure optimal performance and compatibility. The RTX A6000 is a powerful data center and workstation GPU, and proper driver installation is essential for machine learning, AI, and high-performance computing workloads.

Prerequisites

  • Ubuntu 22.04 LTS installed and updated (sudo apt update && sudo apt upgrade -y)
  • RTX A6000 GPU properly installed in the system
  • Internet connection for downloading drivers
  • Administrative (sudo) privileges

Step-by-Step Installation Guide

1. Disable Nouveau Drivers (Open-Source Alternative)

Nouveau drivers can conflict with NVIDIA's proprietary drivers. Disable them by running:

  1. Open a terminal and create a new blacklist file: sudo nano /etc/modprobe.d/blacklist-nouveau.conf
  2. Add these lines:
    blacklist nouveau
    options nouveau modeset=0
  3. Save the file (Ctrl+O, then Ctrl+X).
  4. Update the initramfs: sudo update-initramfs -u
  5. Reboot the system: sudo reboot

2. Install NVIDIA Drivers via Ubuntu Repository

The simplest method is using Ubuntu's built-in repository:

  1. Open a terminal and update the package list: sudo apt update
  2. Install the recommended NVIDIA driver (usually the latest stable version): sudo ubuntu-drivers autoinstall
  3. Alternatively, manually select a driver version: sudo apt install nvidia-driver-535 (replace 535 with the latest version)
  4. Reboot the system: sudo reboot

3. Verify Installation

After rebooting, confirm the driver is working:

  • Run nvidia-smi to check GPU status and driver version.
  • Check the NVIDIA settings panel: nvidia-settings.
  • Verify CUDA compatibility if needed: nvcc --version (requires CUDA Toolkit).

Alternative: Install Drivers from NVIDIA Website

For the latest drivers directly from NVIDIA:

  1. Visit NVIDIA's official driver download page and select the RTX A6000 and Linux 64-bit option.
  2. Download the .run file.
  3. Make it executable: chmod +x NVIDIA-Linux-x86_64-*.run
  4. Run the installer: sudo ./NVIDIA-Linux-x86_64-*.run
  5. Follow on-screen prompts and reboot.

Troubleshooting Tips

  • If the system boots to a black screen, try switching to a virtual terminal (Ctrl+Alt+F2) and reinstalling drivers.
  • Use sudo apt purge nvidia* to remove existing drivers before reinstalling.
  • Check logs for errors: dmesg | grep -i nvidia.

Following these steps ensures your RTX A6000 operates at peak performance on Ubuntu 22.04, whether for AI training, 3D rendering, or high-performance computing tasks.



3/17/2025

Ubuntu 22.04 won't upgrade to 6.8 kernal even after sudo apt install linux-generic-hwe-22.04 ran

If the Ubuntu 22.04 is stuck at 5.15 kernal, make sure the following setting is correct.

 It turned out that the Software & Updates need to subscribe to All Updates.



3/13/2025

Install nvidia driver 535 on Ubuntu 22.04

 For some reason, Nvidia driver 510 and 470 couldn't be install on Ubuntu 22.04 because the installation failed in the last compiling step. Installing driver 535 fixed that issue. To install 535:

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt update

Then install.

3/12/2025

Debug Ubuntu system

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:


The following packages have unmet dependencies:

 libcairo2-dev : Depends: libcairo2 (= 1.16.0-4ubuntu1) but 1.16.0-4ubuntu1ppa1 is to be installed

                 Depends: libcairo-gobject2 (= 1.16.0-4ubuntu1) but 1.16.0-4ubuntu1ppa1 is to be installed

                 Depends: libfontconfig1-dev (>= 2.2.95) but it is not going to be installed

                 Depends: libfreetype6-dev (>= 2.1.10) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.


sudo apt-cache policy libcairo2  

After the system is fixed: sudo apt install ubuntu-desktop to recover all missing components

3/10/2025

Make VSCode (Cursor IDE) settings better

Settings:

{ "window.commandCenter": 1, "workbench.colorTheme": "Default Light Modern", "workbench.colorCustomizations": { "editorCursor.background": "#ff0000", "editorCursor.foreground": "#ff0000", "editor.lineHighlightBackground": "#cee1ff", "editor.lineHighlightBorder": "#cee1ff" }, "editor.cursorBlinking": "solid", "editor.fontSize": 13, "editor.rulers": [80], "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "keyword.control", "settings": { "foreground": "#006518" } }, { "scope": "entity.name.function", "settings": { "foreground": "#000000" } }, { "scope": "support.function.js", "settings": { "foreground": "#000000" } } ] }, "files.trimTrailingWhitespace": true, "editor.tabSize": 2, "editor.renderLineHighlight": "all", "workbench.editor.tabSizing": "fixed", "workbench.editor.tabSizingFixedMinWidth": 38,
"editor.wordSeparators": "`~!@#$%^&*()-_=+[{]}\\|;:'\",.<>/?" }



VSCode IDE keybindings to Eclipse ones

[
            {
                "mac": "cmd+3",
                "win": "ctrl+3",
                "linux": "ctrl+3",
                "key": "ctrl+3",
                "command": "workbench.action.showCommands"
            },
            {
                "mac": "cmd+shift+r",
                "win": "ctrl+shift+r",
                "linux": "ctrl+shift+r",
                "key": "ctrl+shift+r",
                "command": "workbench.action.quickOpen"
            },
            {
                "mac": "ctrl+h",
                "win": "ctrl+h",
                "linux": "ctrl+h",
                "key": "ctrl+h",
                "command": "workbench.action.findInFiles"
            },
            {
                "mac": "cmd+shift+t",
                "win": "ctrl+shift+t",
                "linux": "ctrl+shift+t",
                "key": "ctrl+shift+t",
                "command": "workbench.action.showAllSymbols"
            },
            {
                "mac": "cmd+f3",
                "win": "ctrl+f3",
                "linux": "ctrl+f3",
                "key": "ctrl+f3",
                "command": "outline.focus"
            },
            {
                "mac": "cmd+l",
                "win": "ctrl+l",
                "linux": "ctrl+l",
                "key": "ctrl+l",
                "command": "workbench.action.gotoLine"
            },
            {
                "mac": "cmd+w",
                "win": "ctrl+w",
                "linux": "ctrl+w",
                "key": "ctrl+w",
                "command": "workbench.action.closeActiveEditor"
            },
            {
                "mac": "cmd+shift+s",
                "win": "ctrl+shift+s",
                "linux": "ctrl+shift+s",
                "key": "ctrl+shift+s",
                "command": "workbench.action.files.saveAll"
            },
            {
                "mac": "cmd+alt+s",
                "win": "ctrl+alt+s",
                "linux": "ctrl+alt+s",
                "key": "ctrl+alt+s",
                "command": "workbench.action.files.saveAs"
            },
            {
                "mac": "cmd+alt+t",
                "win": "ctrl+alt+t",
                "linux": "ctrl+alt+t",
                "key": "ctrl+alt+t",
                "command": "workbench.action.terminal.toggleTerminal"
            },
            {
                "mac": "ctrl+m",
                "win": "ctrl+m",
                "linux": "ctrl+m",
                "key": "ctrl+m",
                "command": "workbench.action.toggleSidebarVisibility"
            },
            {
                "mac": "cmd+e",
                "win": "ctrl+e",
                "linux": "ctrl+e",
                "key": "ctrl+e",
                "command": "workbench.action.showEditorsInActiveGroup"
            },
            {
                "mac": "cmd+shift+w",
                "win": "ctrl+shift+w",
                "linux": "ctrl+shift+w",
                "key": "ctrl+shift+w",
                "command": "workbench.action.closeAllEditors"
            },
            {
                "mac": "cmd+shift+f4",
                "win": "ctrl+shift+f4",
                "linux": "ctrl+shift+f4",
                "key": "ctrl+shift+f4",
                "command": "workbench.action.closeAllEditors"
            },
            {
                "mac": "cmd+f12",
                "win": "f12",
                "linux": "f12",
                "key": "f12",
                "command": "workbench.action.focusActiveEditorGroup"
            },
            {
                "mac": "cmd+shift+[",
                "win": "ctrl+shift+[",
                "linux": "ctrl+shift+[",
                "key": "ctrl+shift+[",
                "command": "workbench.action.splitEditor"
            },
            {
                "mac": "cmd+shift+c",
                "win": "ctrl+shift+c",
                "linux": "ctrl+shift+c",
                "key": "ctrl+shift+c",
                "command": "editor.action.commentLine",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+7",
                "win": "ctrl+7",
                "linux": "ctrl+7",
                "key": "ctrl+7",
                "command": "editor.action.commentLine",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+/",
                "win": "ctrl+shift+/",
                "linux": "ctrl+shift+/",
                "key": "ctrl+shift+/",
                "command": "editor.action.blockComment",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+alt+y",
                "win": "shift+alt+y",
                "linux": "shift+alt+y",
                "key": "shift+alt+y",
                "command": "editor.action.toggleWordWrap",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+alt+j",
                "win": "ctrl+alt+j",
                "linux": "ctrl+alt+j",
                "key": "ctrl+alt+j",
                "command": "editor.action.joinLines",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+o",
                "win": "ctrl+o",
                "linux": "ctrl+o",
                "key": "ctrl+o",
                "command": "workbench.action.gotoSymbol",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+f",
                "win": "ctrl+shift+f",
                "linux": "ctrl+shift+f",
                "key": "ctrl+shift+f",
                "command": "editor.action.formatSelection",
                "when": "editorTextFocus && editorHasSelection"
            },
            {
                "mac": "cmd+shift+f",
                "win": "ctrl+shift+f",
                "linux": "ctrl+shift+f",
                "key": "ctrl+shift+f",
                "command": "editor.action.formatDocument",
                "when": "editorTextFocus && !editorHasSelection"
            },
            {
                "mac": "cmd+alt+down",
                "win": "ctrl+alt+down",
                "linux": "ctrl+alt+down",
                "key": "ctrl+alt+down",
                "command": "editor.action.copyLinesDownAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "ctrl+alt+cmd+down",
                "win": "ctrl+alt+win+down",
                "linux": "ctrl+alt+win+down",
                "key": "ctrl+alt+win+down",
                "command": "editor.action.copyLinesDownAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+alt+up",
                "win": "ctrl+alt+up",
                "linux": "ctrl+alt+up",
                "key": "ctrl+alt+up",
                "command": "editor.action.copyLinesUpAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "ctrl+alt+cmd+up",
                "win": "ctrl+alt+win+up",
                "linux": "ctrl+alt+win+up",
                "key": "ctrl+alt+win+up",
                "command": "editor.action.copyLinesUpAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "alt+down",
                "win": "alt+down",
                "linux": "alt+down",
                "key": "alt+down",
                "command": "editor.action.moveLinesDownAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "alt+up",
                "win": "alt+up",
                "linux": "alt+up",
                "key": "alt+up",
                "command": "editor.action.moveLinesUpAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+d",
                "win": "ctrl+d",
                "linux": "ctrl+d",
                "key": "ctrl+d",
                "command": "editor.action.deleteLines",
                "when": "editorTextFocus"
            },
            {
                "key": "shift+enter",
                "command": "editor.action.insertLineAfter",
                "when": "editorTextFocus && !editorReadonly"
            },
            {
                "mac": "cmd+shift+delete",
                "win": "ctrl+shift+delete",
                "linux": "ctrl+shift+delete",
                "key": "ctrl+shift+delete",
                "command": "deleteAllRight",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+alt+s",
                "win": "alt+shift+s",
                "linux": "alt+shift+s",
                "key": "alt+shift+s",
                "command": "editor.action.sourceAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+alt+r",
                "win": "alt+shift+r",
                "linux": "alt+shift+r",
                "key": "alt+shift+r",
                "command": "editor.action.rename",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+o",
                "win": "ctrl+shift+o",
                "linux": "ctrl+shift+o",
                "key": "ctrl+shift+o",
                "command": "editor.action.organizeImports",
                "when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/"
            },
            {
                "mac": "cmd+space",
                "win": "ctrl+space",
                "linux": "ctrl+space",
                "key": "ctrl+space",
                "command": "editor.action.triggerSuggest",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+.",
                "win": "ctrl+.",
                "linux": "ctrl+.",
                "key": "ctrl+.",
                "command": "editor.action.marker.next",
                "when": "editorFocus && !editorReadonly"
            },
            {
                "mac": "f3",
                "win": "f3",
                "linux": "f3",
                "key": "f3",
                "command": "editor.action.goToDeclaration",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+1",
                "win": "ctrl+1",
                "linux": "ctrl+1",
                "key": "ctrl+1",
                "command": "editor.action.quickFix",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+g",
                "win": "ctrl+shift+g",
                "linux": "ctrl+shift+g",
                "key": "ctrl+shift+g",
                "command": "editor.action.referenceSearch.trigger",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+b",
                "win": "ctrl+shift+b",
                "linux": "ctrl+shift+b",
                "key": "ctrl+shift+b",
                "command": "editor.debug.action.toggleBreakpoint",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+x",
                "win": "ctrl+shift+x",
                "linux": "ctrl+shift+x",
                "key": "ctrl+shift+x",
                "command": "editor.action.transformToUppercase",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+y",
                "win": "ctrl+shift+y",
                "linux": "ctrl+shift+y",
                "key": "ctrl+shift+y",
                "command": "editor.action.transformToLowercase",
                "when": "editorTextFocus"
            },
            {
                "mac": "cmd+shift+k",
                "win": "ctrl+shift+k",
                "linux": "ctrl+shift+k",
                "key": "ctrl+shift+k",
                "command": "editor.action.previousSelectionMatchFindAction",
                "when": "editorTextFocus"
            },
            {
                "mac": "alt+cmd+t",
                "win": "alt+shift+t",
                "linux": "alt+shift+t",
                "key": "alt+shift+t",
                "command": "editor.action.refactor",
                "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
            },
            {
                "mac": "alt+cmd+l",
                "win": "alt+shift+l",
                "linux": "alt+shift+l",
                "key": "alt+shift+l",
                "command": "editor.action.codeAction",
                "when": "editorTextFocus",
                "args": {
                    "kind": "refactor.extract.variable"
                }
            },
            {
                "mac": "alt+cmd+m",
                "win": "alt+shift+m",
                "linux": "alt+shift+m",
                "key": "alt+shift+m",
                "command": "editor.action.codeAction",
                "when": "editorTextFocus",
                "args": {
                    "kind": "refactor.extract.function"
                }
            },
            {
                "mac": "alt+cmd+v",
                "win": "alt+shift+v",
                "linux": "alt+shift+v",
                "key": "alt+shift+v",
                "command": "editor.action.codeAction",
                "when": "editorTextFocus",
                "args": {
                    "kind": "refactor.move"
                }
            },
            {
                "mac": "alt+left",
                "win": "ctrl+left",
                "linux": "ctrl+left",
                "key": "ctrl+left",
                "command": "cursorWordPartLeft",
                "when": "textInputFocus"
            },
            {
                "mac": "alt+right",
                "win": "ctrl+right",
                "linux": "ctrl+right",
                "key": "ctrl+right",
                "command": "cursorWordPartRight",
                "when": "textInputFocus"
            },
            {
                "mac": "alt+shift+left",
                "win": "ctrl+shift+left",
                "linux": "ctrl+shift+left",
                "key": "ctrl+shift+left",
                "command": "cursorWordPartLeftSelect",
                "when": "textInputFocus"
            },
            {
                "mac": "alt+shift+right",
                "win": "ctrl+shift+right",
                "linux": "ctrl+shift+right",
                "key": "ctrl+shift+right",
                "command": "cursorWordPartRightSelect",
                "when": "textInputFocus"
            },
            {
                "mac": "cmd+alt+left",
                "win": "alt+left",
                "linux": "alt+left",
                "key": "alt+left",
                "command": "workbench.action.navigateBack"
            },
            {
                "mac": "cmd+alt+right",
                "win": "alt+right",
                "linux": "alt+right",
                "key": "alt+right",
                "command": "workbench.action.navigateForward"
            },
            {
                "mac": "cmd+f7",
                "key": "ctrl+f7",
                "command": "workbench.action.focusNextPart"
            },
            {
                "mac": "shift+cmd+f7",
                "key": "shift+ctrl+f7",
                "command": "workbench.action.focusPreviousPart"
            },
            {
                "mac": "f8",
                "win": "f8",
                "linux": "f8",
                "key": "f8",
                "command": "workbench.action.debug.continue",
                "when": "inDebugMode"
            },
            {
                "mac": "cmd+f11",
                "win": "f11",
                "linux": "f11",
                "key": "f11",
                "command": "workbench.action.debug.start",
                "when": "debuggersAvailable && debugState == 'inactive'"
            },
            {
                "mac": "cmd+shift+f11",
                "win": "ctrl+f11",
                "linux": "ctrl+f11",
                "key": "ctrl+f11",
                "command": "workbench.action.debug.run",
                "when": "debuggersAvailable && debugState != 'initializing'"
            },
            {
                "mac": "f5",
                "win": "f5",
                "linux": "f5",
                "key": "f5",
                "command": "workbench.action.debug.stepInto",
                "when": "inDebugMode"
            },
            {
                "mac": "f7",
                "win": "f7",
                "linux": "f7",
                "key": "f7",
                "command": "workbench.action.debug.stepOut",
                "when": "inDebugMode"
            },
            {
                "mac": "f6",
                "win": "f6",
                "linux": "f6",
                "key": "f6",
                "command": "workbench.action.debug.stepOver",
                "when": "inDebugMode"
            },
            {
                "mac": "cmd+f2",
                "win": "ctrl+f2",
                "linux": "ctrl+f2",
                "key": "ctrl+f2",
                "command": "workbench.action.debug.stop",
                "when": "inDebugMode"
            },
            {
                "mac": "ctrl+q",
                "win": "ctrl+q",
                "linux": "ctrl+q",
                "key": "ctrl+q",
                "command": "workbench.action.navigateToLastEditLocation",
                "when": "editorTextFocus"
            },
            {
                "mac": "ctrl+alt+h",
                "win": "ctrl+alt+h",
                "linux": "ctrl+alt+h",
                "key": "ctrl+alt+h",
                "command": "references-view.showCallHierarchy",
                "when": "editorHasCallHierarchyProvider"
            },
            {
                "mac": "f4",
                "win": "f4",
                "linux": "f4",
                "key": "f4",
                "command": "java.action.showTypeHierarchy",
                "when": "editorLangId == java && editorTextFocus"
            },
            {
                "mac": "alt+shift+up",
                "win": "alt+shift+up",
                "linux": "alt+shift+up",
                "key": "alt+shift+up",
                "command": "editor.action.smartSelect.expand",
                "when": "editorTextFocus"
            },
{
"key": "ctrl+shift+;",
"command": "-breadcrumbs.focus",
"when": "breadcrumbsPossible && breadcrumbsVisible"
},
{
"key": "ctrl+shift+;",
"command": "workbench.action.toggleAuxiliaryBar"
},
{
"key": "ctrl+alt+b",
"command": "-workbench.action.toggleAuxiliaryBar"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "editor.action.inlineDiffs.cancelEdits",
"when": "editorTextFocus && hasActivelyGeneratingDiff"
},
{
"key": "ctrl+backspace",
"command": "-editor.action.inlineDiffs.cancelEdits",
"when": "editorTextFocus && hasActivelyGeneratingDiff"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "editor.action.cancelGPT4WithCmdDelete",
"when": "hadGPT4InlineCompletionRunning"
},
{
"key": "ctrl+backspace",
"command": "-editor.action.cancelGPT4WithCmdDelete",
"when": "hadGPT4InlineCompletionRunning"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "editor.action.inlineDiffs.cancelPromptBar",
"when": "editorTextFocus && hasActivelyGeneratingPromptBarDiff"
},
{
"key": "ctrl+backspace",
"command": "-editor.action.inlineDiffs.cancelPromptBar",
"when": "editorTextFocus && hasActivelyGeneratingPromptBarDiff"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "chatEditor.action.reject",
"when": "chat.hasEditorModifications && editorFocus && hasUndecidedChatEditingResource && !chat.ctxHasRequestInProgress || chat.hasNotebookEditorModifications && editorFocus && hasUndecidedChatEditingResource && !chat.ctxHasRequestInProgress"
},
{
"key": "ctrl+backspace",
"command": "-chatEditor.action.reject",
"when": "chat.hasEditorModifications && editorFocus && hasUndecidedChatEditingResource && !chat.ctxHasRequestInProgress || chat.hasNotebookEditorModifications && editorFocus && hasUndecidedChatEditingResource && !chat.ctxHasRequestInProgress"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "cursorai.action.dismissBugBotLint",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+backspace",
"command": "-cursorai.action.dismissBugBotLint",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "editor.action.inlineDiffs.rejectAll",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+backspace",
"command": "-editor.action.inlineDiffs.rejectAll",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "cursorai.action.cancelGenerateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalProcessSupported && (arbitrary function)"
},
{
"key": "ctrl+backspace",
"command": "-cursorai.action.cancelGenerateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalProcessSupported && (arbitrary function)"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "cursorai.action.rejectGenerateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalProcessSupported && (arbitrary function)"
},
{
"key": "ctrl+backspace",
"command": "-cursorai.action.rejectGenerateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalProcessSupported && (arbitrary function)"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "chatEditing.discardAllFiles",
"when": "hasUndecidedChatEditingResource && inChatInput && !chatInputHasText && !chatSessionRequestInProgress && chatLocation == 'editing-session'"
},
{
"key": "ctrl+backspace",
"command": "-chatEditing.discardAllFiles",
"when": "hasUndecidedChatEditingResource && inChatInput && !chatInputHasText && !chatSessionRequestInProgress && chatLocation == 'editing-session'"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "deleteWordLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+backspace",
"command": "-deleteWordLeft",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+backspace",
"command": "workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "ctrl+backspace",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus"
},
{
"key": "ctrl+shift+y",
"command": "editor.action.inlineDiffs.acceptPartialEdit",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+y",
"command": "-editor.action.inlineDiffs.acceptPartialEdit",
"when": "editorTextFocus && (arbitrary function)"
},
{
"key": "ctrl+shift+y",
"command": "aichat.newfollowupaction"
},
{
"key": "ctrl+y",
"command": "-aichat.newfollowupaction"
}
]

1/13/2025

Ubuntu shotcuts hijacked

 Ctrl+Alt+B 被占用

Ctrl+Alt+S 被占用

Ctrl+Alt+D 被占用

Ctrl+Alt+T 被占用


Ctrl+Alt+左键 被占用

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left “[‘disabled’]”

Ctrl+Alt+Right 被占用

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right “[‘disabled’]”


输入法相关快捷键

如Ctrl+Alt+B和Ctrl+Alt+S,这个隐藏的比较深,基本是通过搜索引擎找到的答案.

Ctrl+Alt+S 快捷键从命令行输入fcitx-configtool命令,进入控制面板.

选择第二个tab Global Config,勾选右下角Show Advanced Options,然后从上到下看一下,哪些快捷键被占用,把哪个禁用掉.

Ctrl+Alt+B是选中Tab的Addon,然后勾选左下角的Advanced,滚到最底下,将Virtual Key Board 取消选 中即可.

————————————————


                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

                        

原文链接:https://blog.csdn.net/liusf1993/article/details/109609689

12/17/2024

Set up a Mac computer

  1.  Setup various shortcuts
    • Lock: ctrl + cmd + L (Use Shortcut app)
    • Slack: ctrl + alt + A (Use Shortcut app)
    • Onenote: ctrl + alt + S (Use Shortcut app, Ubuntu system needs to disable the ctrl + alt + S shortcut in fcitx-configtool, Global Config | Show Advanced Options)
    • Screenshot: cmd + shift + S (Settings | Keyboard shorts | screenshots)
    • Wechat: ctrl + alt + W (Wechat app built in)
    • Switch Sougou EN/CN: ctrl + , (Settings | Keyboard shorts | Input Sources | Select next source ...)
    • Left mouse click: cmd + ; (Shortcut app | Run Shell Script Click | /opt/homebrew/bin/cliclick c:.)
    • English dictionary: ctrl + cmd + 2 (Use Shortcut app)
    • Terminal: ctrl + alt + T (Use Shortcut app)
    • Netease Music: ctrl + alt + M (Use Shortcut app)
    • Symbol picker: ctrl + shift + Z (Settings | Keyboard shorts | App Shortcuts | All Applications | Add 'Emoji & Symbols' to ctrl + shift + Z
  2. Setup Keyboard layout
    • Use customized keyboard layout: https://stackoverflow.com/questions/11876485/how-to-disable-generating-special-characters-when-pressing-the-alta-optiona
    • Disable the default ABC keyboard layout:
      • Change the current input source to your custom keyboard layout.
      • Open ~/Library/Preferences/com.apple.HIToolbox.plist (in 10.9) or ~/Library/Preferences/ByHost/com.apple.HIToolbox.*.plist (in 10.8 and earlier). You can convert the plist to XML with plutil -convert xml1.
      • Remove the input source or input sources you want to disable from the AppleEnabledInputSources dictionary. If there is an AppleDefaultAsciiInputSource key, remove it.
      • Restart.
  3. Use iTerm2 for Terminal
    • Instal Brew
    • brew install bash (Use bash instead of zsh)
    • brew install emacs (Need to modify keyboard: Settings | Profiles | Keys | Key Mappings | Natural Text Editing | Add \033[1;5A (Send Text with vim special chars to ctrl + up | Add \033[1;5B for ctrl + down)
  4. Use Doll for Slack notification in the menu bar 
  5. brew install --cask notunes (To disable Music to launch automatically when the bluetooth headphone is picked up)

12/10/2024

How to fix Windows boot issues

What worked on my Alienware Windows 10:
  1. Use Windows Media creation tool to create a bootable USB Windows 10
  2. Boot to repair my computer and start a terminal
  3. Run:
    1. diskpart
    2. sel disk 0
    3. sel volume 0 ------`#mycomment (The system EFI volume)`
    4. assign letter S:
    5. exit
  4. Run:
    1. S:
    2. cd EFI\Microsoft\Boot\
    3. ren BCD BCD.bak
    4. bcdboot C:\Windows /s S: /f ALL
    5. bootrec /rebuildbcd
    6. exit
  5. Restart the computer and it should boot

12/09/2024

PDF merge command on Linux

 pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf

11/14/2024

How to enable the separate/standalone search box (search bar) on Ubuntu/Windows

Ubuntu:

Modify /opt/microsoft/msedge/microsoft-edge and change the last line to:

exec -a "$0" "$HERE/msedge" "--enable-features=msSearchBoxInToolbar,msSearchBoxInToolbarSearchInteractionTrigger,msSearchBoxInToolbarShownTrigger $@"

Then sudo chmod 555 /opt/microsoft/msedge/microsoft-edge

Windows:

Modify the shortcut and add:

--enable-features=msSearchBoxInToolbar,msSearchBoxInToolbarSearchInteractionTrigger,msSearchBoxInToolbarShownTrigger

11/12/2024

How to extract mp3 from a video file by using ffmpeg

 ffmpeg -i "薛之谦 - 像风一样.mp4" -map a sample.mp3

11/11/2024

Microsoft Office Infinite login loop fix

 We have recently received the same feedback from many users and this has become a hot issue recently. After our investigation, your problem should be caused by an error in the account information recorded by the Office application, at this time I would recommend that you clean up the account information in the registry and then reopen the Office application and log in. Below are the exact steps:

1. Press Windows + R to open the run box, copy and paste the following path, back up all the folders in this path, and then delete them.

%localappdata%/Microsoft/OneAuth   
 
%localappdata%/Microsoft/IdentityCache   

2. Press Windows + R, enter regedit, click OK, open the registry, locate the following registry subkey, right-click Identity, and delete it.

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Identity   

Disclaimer: In general, changing registry subkeys or workgroup is intended for advanced users, administrators, and IT professionals. It can help fix some issues, but serious problems can arise if you modify the registry incorrectly. Therefore, make sure to follow these steps carefully. For additional protection, back up the registry before editing it. Then, you can restore the registry if a problem occurs. For more information on how to back up and restore the registry, click How to back up and restore the registry in Windows - Microsoft Support to view the article.

If the problem reappears after cleaning the registration information, please refer to the following method to roll back Office applications to an older version:

1. Please close all Office applications first.

2.Run Command Prompt as an administrator ("Win" logo key + "Q", enter "cmd", select "Run as administrator"), and enter the following commands one by one.

cd %programfiles% \Common Files\microsoft shared\ClickToRun   
 
Officec2rclient.exe /update user updatetoversion=16.0.17531.20120   

3. After completing the installation, please restart your computer, then open the Office application and sign in to your Microsoft account.

4. Please open any Word/Excel/PPT document > Click on File in the upper left corner of the page > Click on Account in the lower left corner of the page > On the right side of the page, there will be information about your Office product, please click on the update option on the left side of the Office Update > In the menu, find the Disable Update, to avoid the problem of updating Office to the latest version. to prevent Office from updating to the latest version and causing the problem again.

11/08/2024

Fix "Your organization requires that you change your PIN"

1. Open local GPO Editor by running gpedit.msc command.

2. Next, go to Computer configuration > Administrative templates > System > PIN Complexity. Make the changes to match your PIN.

3. For password, changing the local group policy doesn't work. So the password must meet the complexity requirement set by the work account.

8/12/2024

电脑如何快速输入时间日期

使用搜狗输入法

高级设置 → 自定义短语 → 自定义短语设置

#$year-$month_mm-$day_dd (not yyyy)

用一下函数:

函数表如下:

  函数     含义     举例

  $year     年(4位) 2006、2008

  $year_yy 年(2位) 06、08

  $month     月       12、8、3

  $month_mm   月       12、08、03 //此函数在输入法3.1版之后(含)有效

  $day     日       3、13、22

  $day_dd 日      03、13、22 //此函数在输入法3.1版之后(含)有效

  $weekday 星期     0、1、2、5、6

  $fullhour 时(24小时制)   02、08、13、23

  $halfhour 时(12小时制) 02、08、01、11

  $ampm     AM、PM(英) AM、PM(大写)

  $minute   分       02、08、15、28

  $second   秒       02、08、15、28

  $year_cn 年(中文4位) 二〇〇六

  $year_yy_cn 年(中文2位) 〇六

  $month_cn 月(中文) 十二、八、三

  $day_cn   日(中文) 三、十三、二十二

  $weekday_cn 星期(中文) 日、一、二、五、六

  $fullhour_cn 时(中文24时制) 二、八、十三、二十三

  $halfhour_cn 时(中文12时制) 二、八、一、十一

  $ampm_cn 上午下午(中文) 上午、下午

  $minute_cn 分(中文) 零二、零八、十五、二十八

  $second_cn 秒(中文) 零二、零八、十五、二十八