6

I have written a python script and would like that to run for a specific user log in. The script has two images, one with the Windows logo and the other for Linux.

When the Windows logo is clicked it runs the rdesktop program and logs into the Windows box.

I have been looking for an example or help for the Linux image when clicked loads the Ubuntu desktop for that user.

Also where and how to run this script for a specific user? And if I can get this script to run on login for this user, will the image buttons be the only thing displayed until one of them is clicked?

Peachy
  • 7,235
  • 10
  • 40
  • 47

2 Answers2

3

Either use the "Startup applications" or create a .desktop file in the directory

/home/user/.config/autostart/

..where user is the name of the user for which this script is supposed to run.

example /home/user.config/autostart/custom.desktop file would contain the following lines

[Desktop Entry]
Type=Application
Exec=/home/user/script.sh
Name=Custom script
Comment=Custom Script
Takkat
  • 144,580
January
  • 37,208
1

We may not want the Unity desktop to be loaded on login in the case we only access a remote Windows desktop.

Then we may want to consider creating a custom XSession that may then call our python script to determine the environment to load.

Takkat
  • 144,580