Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to launch a program when X (not unity/gnome/etc) starts.

In particular, I want to launch xset r 105 when lightdm starts. Is there a way to do it? I tried writing this into ~/.xsessionrc:

#!/bin/bash
xset r 105

but it didn't nothing.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You want to change one of these settings in /etc/lightdm/lightdm.conf:

# session-wrapper = Wrapper script to run session with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)

I think that display-setup-script is what you want to modify. Just set it to your script. Turn that xset command into an executable shell script and stick it into /usr/bin. Then the config file will be:

display-setup-script=/usr/bin/xset_script.sh
share|improve this answer
    
excellent, exactly what I was searching for. Many thanks! –  akappa Nov 10 '12 at 21:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.