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/
相关推荐
花果山总钻风18 小时前
在 Debian 10.x 安装Chrome浏览器和ChromeDriver
运维·chrome·debian
艾莉丝努力练剑18 小时前
【优选算法必刷100题:专题五】(位运算算法)第033~38题:判断字符是否唯一、丢失的数字、两整数之和、只出现一次的数字 II、消失的两个数字
java·大数据·运维·c++·人工智能·算法·位运算
玉树临风江流儿18 小时前
炸鸡派-echoAI机器人项目解析
linux
一个平凡而乐于分享的小比特18 小时前
Linux最小系统详解
linux·最小系统
db_murphy18 小时前
学习篇 | 服务器的睿频
运维·服务器·学习
Levin__NLP_CV_AIGC18 小时前
Ubuntu部署Dufs
linux·运维·服务器·ubuntu·ssh
cly118 小时前
Ansible自动化(八):条件语句
运维·自动化·ansible
MrYang202018 小时前
Vcenter vsphere 登录报错
运维·vmware
suamt18 小时前
记录windows下如何运行docker程序
运维·docker·容器