You are not logged in.
On ubuntu I would put my xrandr configuration in ~/.xprofile and it seemed to fire before the desktop but after X and worked fine, but that doesn't work any more (presumably because I'm not using gdm anymore). I've tried including the script file as a startup application in xfce, but for some reason it doesn't work properly.
Where's the proper place to put stuff like this? Preferably I want it to configure my monitors before the desktop so I don't get any nasty monitor blinking.
Offline
The wiki page may reveal some information to you:
http://wiki.archlinux.org/index.php/Xrandr
Offline
You can try putting it in .xinitrc.
Offline
The wiki page may reveal some information to you:
http://wiki.archlinux.org/index.php/Xrandr
smile
hmm, not really.
I don't use gdm or kdm so I can't put the script under /etc/.. and .xprofile is launched by gdm too so I can't use that. I'm using nouveau with kms so I'm not going back to xorg.conf either.
Last edited by 12eason (2010-07-28 21:04:46)
Offline
You can try putting it in .xinitrc.
I tried sourcing the script in .xinitrc before execing xfce, but that stopped X from starting. Maybe it would work if I just copied and pasted the code in instead.
Last edited by 12eason (2010-07-28 21:07:01)
Offline
The wiki page may reveal some information to you:
http://wiki.archlinux.org/index.php/Xrandr
smilehmm, not really.
I don't use gdm or kdm so I can't put the script under /etc/.. and .xprofile is launched by gdm too so I can't use that. I'm using nouveau with kms so I'm not going back to xorg.conf either.
EDIT: Too late
Can you post your .xinitrc?
Last edited by cesura (2010-07-28 21:07:20)
Offline
k, it doesn't work in .xinitrc either. Ends up disabling my secondary and doesn't manage to set the res on the primary properly either.
Can you post your .xinitrc?
sure, it's fairly standard except the stuff I just added.
#!/bin/sh
#
# ~/.xinitrc
#
xrandr --newmode "1280x1024" 108.79 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
xrandr --addmode VGA-1 "1280x1024"
xrandr --output VGA-1 --mode "1280x1024"
xrandr --output DVI-I-1 --preferred
xrandr --output DVI-I-1 --right-of VGA-1
# Executed by startx (run your window manager from here)
# exec xterm
# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice
Last edited by 12eason (2010-07-28 21:16:34)
Offline
Put '&' at the end of the the xrandr lines.
Offline
Put '&' at the end of the the xrandr lines.
karol, you beat me to EVERYTHING!
Offline
karol wrote:Put '&' at the end of the the xrandr lines.
karol, you beat me to EVERYTHING!
Do you have a GF? ;P
Offline
unfortunately, running in the background didn't quite work either. It left the primary in 1024x768. The secondary was positioned correctly, but the screen was still 1440x900 so only a quarter of the secondary was used. [strike] I think it is executing too early.[/strike]
eta; in fact, I think it is executing at the same time as startxfce, so xfce is building the desktop on an out of date screen.
Last edited by 12eason (2010-07-28 21:39:49)
Offline
itsbrad212 wrote:karol wrote:Put '&' at the end of the the xrandr lines.
karol, you beat me to EVERYTHING!
Do you have a GF? ;P
You just try and take her away from me!
Anyway, back on topic. Does XFCE have an autostart.sh or something similar, such as Openbox? Also, I suggest using the following line in .xinitrc:
exec ck-launch-session startxfce4
Offline
eta; in fact, I think it is executing at the same time as startxfce, so xfce is building the desktop on an out of date screen.
You could always add a sleep xxx in between the execution of xrandr and XFCE.
Offline
12eason wrote:eta; in fact, I think it is executing at the same time as startxfce, so xfce is building the desktop on an out of date screen.
You could always add a sleep xxx in between the execution of xrandr and XFCE.
I think I might end up having to use a while loop to wait for pidof xrandr to disappear. Seems like a hack though and it slows the boot process.
Thanks to you both for your help on this.
Offline
Can't you put the script in xfce's autostart list?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Offline
Yeah, i said in the OP I tried as a startup app and it doesn't work for some reason. It's odd because my other startup scripts work fine and fire very late so it really should work.
Offline
Do they all have the right permissions? 'chmod +x'?
Offline
all +x yeah. runs fine when double clicked.
Offline
all +x yeah. runs fine when double clicked.
Again: every script in the autorun dir runs fine, but the xrandr one does not, however if you run it by hand, it works. That's kinda impossible.
Offline
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=monitor setup
Comment=
Exec=/home/user/Scripts/xprofile.sh
StartupNotify=false
Terminal=false
Hidden=false
#!/bin/sh
xrandr --newmode "1280x1024" 108.79 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
xrandr --addmode VGA-1 "1280x1024"
xrandr --output VGA-1 --mode "1280x1024"
xrandr --output DVI-I-1 --preferred
xrandr --output DVI-I-1 --right-of VGA-1
Just refuses to do anything. Even switched the Terminal flag to true and it just opened up a terminal in /home/user/Scripts but didn't execute the xrandr lines.
Offline
Sorry, I'm not familiar w/ .desktop files, but maybe you can try a name w/o a space?
Name=monitor setup
Offline
That's only a friendly name, doesn't affect it as others are like it and run. I just tried the method shown here; http://www.thinkwiki.org/wiki/Xorg_Rand … .24_xrandr using 45custom_xrandr-settings and not even that works.
Last edited by 12eason (2010-07-29 00:39:48)
Offline
I just tried the method shown here; http://www.thinkwiki.org/wiki/Xorg_Rand … .24_xrandr using 45custom_xrandr-settings and not even that works.
k, so I did some googling and found xinit/xinitrc.d is Archs version of Xsession.d, but as others have noted, nothing under xinit.d seems to execute either. I'm thinking maybe arch executes ~/.xinitrc first and the exec to xfce disrupts the following execution of etc/xinit/xinitrc.d scripts?
This is proving to be a real pita.
Offline
Do a simple test, create a script with 'env > /tmp/env.dump' and check inside if the DISPLAY variable is set, you can also redirect all the output of xrandr to a file and check why it isn't working, I'm sure it is complaining about something.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline