zoukankan      html  css  js  c++  java
  • deepin把vscode设为默认文本应用

    一开始我想自己写一个desktop文件放在/usr/share/applications下面,结果在右键菜单里面找不到vscode。

    [Desktop Entry]
    Categories=Development;IDE;TextEditor;
    Comment=编辑器
    Exec="/home/weiyinfu/Documents/VSCode-linux-x64/bin/code" %f
    Version=1.0
    Name=VS Code
    Terminal=false
    Type=Application
    Icon=/home/weiyinfu/Documents/VSCode-linux-x64/resources/app/resources/linux/code.png
    StartupWMClass=vscode
    

    经过一番思索,apt-get install deepin-editor安装deepin自带的编辑器,把深度编辑这个软件的desktop文件改成vscode的。

    [Desktop Entry]
    Categories=Utility;TextEditor;
    Comment=Simple and easy to use deepin editor
    Exec="/home/weiyinfu/Documents/VSCode-linux-x64/bin/code" %F
    GenericName=vscode2
    Icon=deepin-editor
    MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-patch;text/x-adasrc;text/x-chdr;text/x-csrc;text/css;application/x-desktop;text/x-patch;text/x-fortran;text/html;text/x-java;text/x-tex;text/x-makefile;text/x-objcsrc;text/x-pascal;application/x-perl;application/x-perl;application/x-php;text/vnd.wap.wml;text/x-python;application/x-ruby;text/sgml;application/xml;model/vrml;image/svg+xml;application/json;
    Name=vscode2
    StartupNotify=false
    Type=Application
    X-Deepin-Vendor=deepin
    

    然后就可以卸载“深度编辑了”。

    比较两个文件,可以发现deepin-editor指明了大量的MimeType。只有指明了MimeType的应用才会出现在右键菜单里面。

  • 相关阅读:
    netcore一键部署到linux服务器以服务方式后台运行
    查找100-999之间的水仙花数
    shell创建数据库的脚本
    python打印九九乘法表的菱形实现
    c++一些重要的细节
    MySQL数据库基础学习笔记(二)
    MySQL数据库基础学习笔记(一)
    react-redux 的基本使用
    react-router-dom基本使用+3种传参方式
    从create-react-app 项目搭建开始
  • 原文地址:https://www.cnblogs.com/weiyinfu/p/12019461.html
Copyright © 2011-2022 走看看