You are not logged in.
Hello guys, I just made the big move from GNOME to XFCE, but there a slight problem, I can't seem to make my native resolution permanent. In GNOME I used to add my resolution (1920x1080) via Xrandr and then add the commands
xrandr --newmode "1920x1080_60.00" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode VGA-0 1920x1080_60.00
xrandr --output VGA-0 --mode 1920x1080_60.00
to the /etc/gdm/PreSession/Default file. Although I use GDM in XFCE now, doing the same thing doesn't work. Any ideas?
I know that an alternative way is to add these commands to xprofile. But that doesn't work either. Maybe I do something wrong.
Can you help me?
Thanks!
Last edited by Aventinus (2011-02-17 19:10:07)
"Somewhere, something incredible is waiting to be known." - Carl Sagan
Offline
Putting that magic in an xorg.conf file would be the most sensible way to go. The fact Xorg runs without config by default doesn't mean you can add one to tell it how to behave .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I know that an alternative way is to add these commands to xprofile. But that doesn't work either.
That should be .xinitrc or .xsession.
Nvm
Last edited by litemotiv (2011-02-09 18:14:08)
ᶘ ᵒᴥᵒᶅ
Offline
Aventinus wrote:I know that an alternative way is to add these commands to xprofile. But that doesn't work either.
That should be .xinitrc or .xsession.
Nvm
litemotiv I did tried .xinitrc, this is my .xinitrc file:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
# exec gnome-session
# exec startkde
exec ck-launch-session startxfce4
xrandr --newmode "1920x1080_60.00" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync &
xrandr --addmode VGA-0 1920x1080_60.00 &
xrandr --output VGA-0 --mode 1920x1080_60.00 &
# ...or the Window Manager of your choice
But it doesn't work. Any ideas?
.:B:. I know xorg.conf is an option, but in every distro and in every Enviroment I have succeded to make my resolution permanent without using xorg.conf which is a powerful yet hard-to-use tool in my opinion.
"Somewhere, something incredible is waiting to be known." - Carl Sagan
Offline
10-monitor.conf is another option
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
litemotiv I did tried .xinitrc, this is my .xinitrc file:
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # exec gnome-session # exec startkde exec ck-launch-session startxfce4 xrandr --newmode "1920x1080_60.00" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync & xrandr --addmode VGA-0 1920x1080_60.00 & xrandr --output VGA-0 --mode 1920x1080_60.00 & # ...or the Window Manager of your choice
I think you need to place it before starting your desktop environment, like this:
exec xrandr --newmode "1920x1080_60.00" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
exec xrandr --addmode VGA-0 1920x1080_60.00
exec xrandr --output VGA-0 --mode 1920x1080_60.00
exec ck-launch-session startxfce4
(not tested!)
ᶘ ᵒᴥᵒᶅ
Offline
@Aventinus - I think its not working because you're putting the xrandr lines after the exec one.
Edit: and litemotiv beat me to it
Last edited by anonymous_user (2011-02-09 19:17:05)
Offline
I believe that setting the resolution using the Display applet in settings manager is meant to restore the chosen setup at restart.
Offline
I believe there should be only *one* "exec" in .xinitrc, and that it should be on the last line.
Offline
I confirm that the right way to do this is:
xrandr --newmode "1920x1080_60.00" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode VGA-0 1920x1080_60.00
xrandr --output VGA-0 --mode 1920x1080_60.00
exec ck-launch-session startxfce4
If you put "exec" in every line the X won't start!
Thank you all for your help!
"Somewhere, something incredible is waiting to be known." - Carl Sagan
Offline