You are not logged in.

#1 2014-09-03 18:58:28

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

running script upon login not working with xfce4

I'm trying to run a script with XFCE4 when I login. I'm using Nouveau driver and with dual screen so I need to run the following command:

xrandr --output VGA-1 --off --output DVI-I-1 --mode 1920x1200 --pos 0x0 --rotate normal --output HDMI-1 --mode 1920x1200 --pos 1920x0 --rotate normal

I placed this in a script in /home/mouseman/dualhead.sh

Running the script manually works fine.

I tried to add the script to .xsessionrc in my home dir, didn't work.

I added the line to different lines in /etc/lightdm/lightdm.conf and removed the # one at a time and logged out/in to test, it didn't work either:
# display-setup-script =  /home/mouseman/.screenlayout/dualhead.sh
# greeter-setup-script =  /home/mouseman/.screenlayout/dualhead.sh
# session-setup-script =  /home/mouseman/.screenlayout/dualhead.sh

I tried these lines under the [LightDM] section and the [SeatsDefaults] section. Neither work.

Any help please? How do I get this dual display setup automatically? I read the wiki, that's where I got the xrandr command, I just need it to apply when I login (or, preferably, when X starts so I don't see the login screen mirrored on the other display).

Thanks in advance!

Offline

#2 2014-09-04 05:07:59

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: running script upon login not working with xfce4

Hi,

Checkout Settings>Session and Startup>Application Autostart and clicking, "Add".

Offline

#3 2014-09-04 05:37:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: running script upon login not working with xfce4

How do you start Xfce4?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-09-04 16:15:43

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: running script upon login not working with xfce4

Thanks for the replies.

Adding a script to session/autostart works when I login.

Is it possible to configure it at startup too?

I start xfce4 with lightdm, at bootup.

Thanks again!

Offline

#5 2014-09-04 16:49:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: running script upon login not working with xfce4

Sadly, I know nothing of lightdm.  If you used startx, I would have suggested you background it in your ~/.xinitrc for you start xfce4. 
You might try writing a systemd service that 'wants' lightdm that runs your script.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#6 2014-09-04 17:07:40

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 298

Re: running script upon login not working with xfce4

No problem, I'm pretty happy the way it is.

Offline

Board footer

Powered by FluxBB