I used to edit the startup script for the GDM (/etc/gdm/Init/Default) to permanently change my display resolution.
How can I do this with LigthDM in Ubuntu Oneiric?
I think you can add the display modes to
If you don't have a
If you don't know the name of the video driver that your system is using then you may get the name as follows (if you have an intel graphic chip, the driver name is just "intel"):
The modelines can be generated with
display-setup-script > calls your mycustomloginvideo.sh before the login screen appears
session-setup-script > calls your mycustomdesktopvideo.sh before the user desktop session starts
You may have "arandr" gui tool generate the above sh script, picking parameters from your current session's X configuration.
Make sure that your shell script is executable:
and you can test that it works (i.e. that you don't have any typos or configuration errors in your xrandr command) just by running it in a terminal:
If the login script doesn't work for any reason, your machine might not complete the boot process to the login screen. If the desktop script fails, you might not get a desktop after logging in. If you are setting an external monitor, these scripts will fail when you disconnect it, and X session will not start.
Some one posted another workaround, although I must say It didn't work for me. It could probably work for you. In my case it breaks unity and I can only move my mouse cursor around. The app indicator top panel looks empty, but after unplugging my LCD I was able to delete the added lines and everything went back to normal.
edit the file
Here is how the first part of that file looks now:
Take note that the Xrandr settings should be changed to match yours.
I have been trying to solve a similar problem for a while now and found a solution that works for me so hopefully it will help...
I have an old aspire one AOA110 that I have broken the screen on too many times and after buying a new laptop decided that I would try to turn it into a HTPC but the external display I have is not recognised by X so I have had to 'tweak' it numerous times to get it working at the correct resolution.
Here is what I did:
After using this http://ubuntuforums.org/showthread.php?t=1112186 tutorial up to step 5 I was able to find a working and acceptable resolution in xrandr but this wasn't working on the LightDM login screen.
Don't follow the steps to make it persistent in the above how to it may work but I think this is the proper way to do it in 11.10. I found this post on the ArchWiki https://wiki.archlinux.org/index.php/Xorg which I adapted to my needs.
First create a file here:
Then add the appropriate X details for your display here is how mine looked:
The important bits to add are under the appropriate
You'll notice that what I was trying to do was not only to set the VGA1 connection to a suitable resolution but also tell it not to use my LVDS1 output. Obviously you will need to tweak yours appropriately to match the right number of outputs and the right Device, Screen and Display sections for your setup.
Sorry for the epic post, I have been tweaking xorg.conf files for some time now with the Hannspree display I've been using and the old xorg.conf setups that I used pre 11.10 just don't work properly any more this is the only solution I've found that works.
I had the problem of wanting an extended display on my new LXDE box, (not a dual clone), found the correct command, but couldn't make it permanent.
The above methods all seemed too hard/not the right way to do it.
I eventually found this: http://www.sudo-juice.com/change-lxde-screen-resolution-ubuntu-lubuntu/
That worked a treat, but I used gedit instead:
Then added the line at the end with an @ symbol at the start:
Hope that helps and thank you to sudo-juice.
PS Note the double
I've had a similar problem with my laptop as above, and I wanted to add something to the conversation. If you don't care about the login resolution (I don't), but want the actual workspace to be the right resolution, you can add your monitor information to LightDM but not turn on full resolution until you login.
I just added the following script for my monitor in a file:
then I call it in
Once I login I can setup my monitor in Displays and it works, even after I re-log (used to give me a big ugly error).
As an enhancement for Jon Roberts answer, let me specify that arandr does not include in its sh script generation all parameters working in the current session. Primary monitor (in case you are using a dual monitor configuration), refresh rate and gamma settings for each monitor are not included, for example. My session script looks like that:
I manually added --rate and --primary options in the first line and then added manually a second line with the gamma correction because apparently xrandr gamma settings are lost whenever you switch a monitor to primary.
I do not know if this particular behavior with the gamma settings when making a monitor primary is intended or is a bug.
Moreover the session shell script is not called by lightdm but as a startup application, because it seems that lightdm calls the script before things are ready for xrandr and weird things happen.
Based on responses upper, I have done some test and found an useful method that works to me, then I have created a simple script to automatize it with my automatic installs. But it will work to any other cases.
Create a scriptinstallxrandrfixed.sh Add these lines:
it will create the scripts and the files for lightdm display and session. don't forgot to give it permission to execute
Modify it to feet your needs. Kind regards. Pablo.
Create a new document and name it e.g.
and save it in your home folder (this sets the resolution to 1600x900)
Open Startup Applications (or run
Save it, and now the script will be ran now every you login, so you will need to logout first for it to take effect. Running the command (e.g.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?