-1

i want startup a programm in a specific desktop with a .desktop config file

for example firefox on desktop 2

2 Answers2

2

For tasks like this I always suggest devilspie2:

http://www.gusnan.se/devilspie2/

is a window matching utility, allowing the user to perform scripted actions on windows as they are created. For example you can script a terminal program to always be positioned at a specific screen position, or position a window on a specific workspace.

roadmr
  • 34,802
2

Add .desktop files to /home/username/.config/autostart and make sure they're marked as executables.

Here is a default syntax for a .desktop file with some of the most important entries.

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name="NAME OF THE APPLICATION"
Comment="WHAT DOES THE APP DO?"
Exec="EXECUTABLE PATH OF APPLICATION"
Hidden=false
NoDisplay=false
Terminal=false

For example :

To Autostart firefox, execute the following commands in terminal :

gedit ~/.config/autostart/firefox.desktop

and copy the following content in the file (firefox.desktop) and then save it

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Firefox
Comment=Firefox Web Browser
Exec=firefox
Hidden=false
NoDisplay=false
Terminal=false

then mark it as executable by executing following command in terminal :

chmod +x ~/.config/autostart/firefox.desktop

Similarly you can autostart other applications. For applications that have their binaries in /usr/bin , full path isn't required (like firefox)

Logout and login again to see the changes!

For more info click here

Faizan Akram Dar
  • 4,569
  • 1
  • 25
  • 31