1

如何为Gnome3添加自启动程序

 2 years ago
source link: https://www.hi-roy.com/posts/%E5%A6%82%E4%BD%95%E4%B8%BAgnome3%E6%B7%BB%E5%8A%A0%E8%87%AA%E5%90%AF%E5%8A%A8%E7%A8%8B%E5%BA%8F/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

如何为Gnome3添加自启动程序

2013-11-14

方法一 直接编辑配置文件

以开机自动启动pidgin为例:

这里有一种方法可以使你自己的任意程序,随着Gnome3桌面的登陆自动启动。

创建一个独立的文件在~/.config/autostart目录下,如果此目录不存在,则你应该自己创建它。(~代表当前用户的home目录)

为这个文件起个名字叫做:appname.desktop; appname 是指你想伴随Gnome3启动的程序的名字。

例如:我想 pidgin (一个免费的通讯工具)当Gnome3启动时自动启动,在我的Fedora系统中,所以我给这个文件命名:pidgin.desktop,并保存它在~/.config/autostart目录。

现在在这个文件中输入如下内容:

[Desktop Entry]
Type=Application
Exec=/usr/bin/pidgin
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=pidgin
Name=pidgin
Comment[en_US]=pidgin comm tool
Comment=pidgin comm tool

保存并关闭文件。就这些。下次当你启动Gnome3,这个程序就自动启动了.

方法二,图形方式一个快捷的方式增加自动启动程序

Alt+F2 然后在运行输入框中输入: gnome-session-properties 然后回车。

然后点 “添加”,并填写相应信息即可。

其实这只是一个图形化的方式,其本质仍然和上面那个方案是相同的,只是更加方便了。

去查看 ~/.config/autostart 目录的文件,就会发现你新添加的东西。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK