2012-09-30 172 views
0

我想知道如何使用Python在Ubuntu(或任何Linux發行版)的桌面上創建快捷方式文件。我特別感興趣的是修改目標路徑字符串。如何使用Python(Ubuntu)創建桌面快捷方式?

在此先感謝

+0

[pyxdg](http://freedesktop.org/wiki/Software/pyxdg)可能會有用。 –

+0

這與Python的目標[桌面環境](http://en.wikipedia.org/wiki/Desktop_environment)相關性更大。 –

回答

1

創建*.desktop file並把它放在桌面上的文件夾。另見how to add it to the Unity launcher

+0

這工作!只是在將文件設置爲可執行文件時遇到問題。你介意幫助我嗎? – vivatus

+0

@DimitryVinogradov:['os.chmod()'](http://docs.python.org/library/os#os.chmod) – jfs

相關問題