linux vscode解压版 AI账号无法登陆问题(浏览器无法打开vscode)

在目录 ~/.local/share/applications 创建desktop文件:

com.visualstudio.code.desktop

内容如下(将Exec和Icon替换为你的路径):

shell 复制代码
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/home/neo/Programes/VSCode-linux-x64/bin/code --open-url %U
Icon=/home/neo/Programes/VSCode-linux-x64/resources/app/resources/linux/code.png
Type=Application
StartupWMClass=Code
Categories=Development;TextEditor;IDE;
MimeType=text/plain;inode/directory;application/x-code-workspace;
Actions=new-empty-window;
Keywords=vscode;

Terminal=false
StartupNotify=true

[Desktop Action new-empty-window]
Name=New Empty Window
Name[de]=Neues leeres Fenster
Name[es]=Nueva ventana vacía
Name[fr]=Nouvelle fenêtre vide
Name[it]=Nuova finestra vuota
Name[ja]=新しい空のウィンドウ
Name[ko]=새 빈 창
Name[ru]=Новое пустое окно
Name[zh_CN]=新建空窗口
Name[zh_TW]=開新空視窗
Exec=/home/neo/Programes/VSCode-linux-x64/bin/code --open-url %U
Icon=/home/neo/Programes/VSCode-linux-x64/resources/app/resources/linux/code.png

com.visualstudio.code-url-handler.desktop

shell 复制代码
[Desktop Entry]
Name=Visual Studio Code - URL Handler
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/home/neo/Programes/VSCode-linux-x64/bin/code --open-url %U
Icon=/home/neo/Programes/VSCode-linux-x64/resources/app/resources/linux/code.png
Type=Application
NoDisplay=true
StartupNotify=true
Categories=Utility;TextEditor;Development;IDE;
MimeType=x-scheme-handler/vscode;
Keywords=vscode;

更新数据库:

shell 复制代码
update-desktop-database ~/.local/share/applications/
相关推荐
zzzzzz3101 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode1 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220702 天前
如何搭建本地yum源(上)
运维
A小辣椒3 天前
TShark:Wireshark CLI 功能
linux
A小辣椒3 天前
TShark:基础知识
linux
AlfredZhao3 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao4 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334664 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux
猪脚踏浪4 天前
linux 拷贝文件或目录到指定的位置
linux
大树885 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai