防止程序自动将自身添加到启动程序中

Pen*_*ang 4 dropbox startup-applications

我发现我的 Dropbox 自动将自己添加到启动程序中,即使在我从启动首选项中取消选中它之后也是如此。但是,当我有时手动启动 dropbox 时,它会自动将自己添加到启动中。这是我做的实验。(Ubuntu 14 LTS)

  1. 从启动取消选中保管箱。
  2. 退出保管箱
  3. 手动启动保管箱
  4. 然后在启动时检查dropbox。

如何禁用将自身添加到启动程序的程序(例如,保管箱)?

Pen*_*ang 8

启动首选项存储在~/.config/autostart/。以 dropbox 为例,它通过添加/编辑~/.config/autostart/dropbox.desktop文件自动将自己添加到启动中。因此,一个简单的解决方案更改该文件并使其仅可进行 root 编辑。

  1. vim ~/.config/autostart/dropbox.desktop。然后Exec=dropbox start -i改为Exec=
  2. chmod 600 ~/.config/autostart/dropbox.desktop。这使得文件只能由其用户访问。
  3. sudo chown root:root ~/.config/autostart/dropbox.desktop。这会将文件的用户更改为 root。