注销然后登录时自动运行脚本不起作用



使用cx_Freeze将我的Python脚本冻结为可执行文件后,可执行文件名为BingNiceWallpapers。我希望它在登录时自动运行,所以写这个名为BingNiceWallpapers.desktop的脚本把它放在~/.config/autorun

[Desktop Entry]
Type=Application
Exec=/home/i/图片/build/exe.linux-i686-3.4/BingNiceWallpapers
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[zh_CN]=BingNiceWallpapers
Name=BingNiceWallpapers
Comment[zh_CN]=
Comment=
X-GNOME-Autostart-Delay=0

问题是在启动或重新启动计算机时,程序在登录时会自动运行,但是当注销然后使用相同的帐户登录时,程序不会自动运行,那么如何解决此问题?

我在linuxmint-17.1-cinnamon-32bit上进行了测试

我尝试在linuxmint-17.1-cinnamon-32bit上做同样的事情。我制作了可执行文件并将其放入~/bin文件夹中。然后我通过 GUI 将我的应用程序添加到启动(我只在对话框中指定了名称和命令)。并检查应用程序是否在注销后然后登录后运行:它运行。

因此,配置文件myapp.desktop如下所示:

[Desktop Entry]
Type=Application
Exec=/home/me/bin/myapp
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=MyApp
Name=MyApp
Comment[en_US]=
Comment=
X-GNOME-Autostart-Delay=0

它位于~/.config/autostart文件夹中(但不在autorun中)。

最新更新