Skip to content

Instantly share code, notes, and snippets.

@xwsg
Last active October 15, 2018 12:26
Show Gist options
  • Save xwsg/d07f6ee156fc7738a2d97f03990f546c to your computer and use it in GitHub Desktop.
Save xwsg/d07f6ee156fc7738a2d97f03990f546c to your computer and use it in GitHub Desktop.
Q&A

1. 无法打开文件浏览器

执行 killall nautilus 后,重新打开

2. apt-get和apt区别在哪?

apt是友好版的apt-get,最大特性就是有进度条了。

3. snap 软件包管理

# 列出适用于当前系统的 Snap 软件包
snap find

# 安装包
sudo snap install <包名>

# 查看当前系统中已安装的 Snap 软件包
snap list

# 对系统的更改历史记录
snap changes

# 升级 Snap 软件包版本
sudo snap refresh <包名>

# 移除 Snap 软件包
sudo snap remove <包名>

4. 显示隐藏或备份文件

打开文件管理器 Edit -> Preferences -> Views页签下勾选show hidden and backup files

5. ubuntu 18.04 LTS 安装starUML

由于ubuntu 18.04 LTS默认使用libcurl4

Selecting previously unselected package staruml.
(Reading database ... 285548 files and directories currently installed.)
Preparing to unpack StarUML-v2.8.1-64-bit.deb ...
Unpacking staruml (2.8.1) ...
dpkg: dependency problems prevent configuration of staruml:
 staruml depends on libcurl3; however:
  Package libcurl3 is not installed.

dpkg: error processing package staruml (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 staruml

解决方法:

sudo dpkg --ignore-depends libcurl3 -i StarUML-v2.8.1-64-bit.deb

但是这种方法不能解决根本问题,这样安装后apt upgrade则不能执行

6.安装思源字体

git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro

9.应用放置在desktop

~/.local/share/applications/ /usr/share/applications

应用程序无法add Favorites解决方案: 在desktop文件中添加 StartupWMClass=XXX, StartupWMClass的值可以在终端中输入xprop WM_CLASS回车,然后鼠标点击你的应用,即可获取到WM_CLASS,比如 WM_CLASS(STRING) = "terminator", "Terminator", 即在desktop文末添加 StartupWMClass=terminator即可

以PacketSender为例:

cat packetsender.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=PacketSender
Icon=/home/yew/developtools/pslogo64.png
Exec="/home/yew/developtools/PacketSender_Linux_x64_v5.7.52.AppImage" %F
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=PacketSender_Linux_x64_v5.7.52.AppImage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment