1

Keep in mind I'm fairly new to GNU/Linux and I've decided to try out Debian for it's history. I've been able to set the screen resolution to 1600x900 (which is what I need), however I haven't been able to find a way to save those settings. For example, I don't have "xorg.conf" nor "xorg.conf.d", I can't even configure it because it says I'm already running X server. I'm pretty sure there is other ways to do this, but most info I find seems vague as to how-to things.

Edit: I'm now able to set the resolution to "1600x900_60.00" each time I get into Debian but manually. I've created a new "xorg.conf" file manually, adding a "naked" screen section, but it seems that it didn't work so I also checked the "/var/log/Xorg.0.log" file to see what went wrong and this is the output:

[ 2969.964] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[ 2969.964] _XSERVTransMakeAllCOTSServerListeners: server already running
[ 2969.964] (EE) Fatal server error:
[ 2969.964] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
[ 2969.964] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help.
[ 2969.964] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2969.964] (EE)
[ 2969.964] (EE) Server terminated with error (1). Closing log file.

I still gotta try the ".xinitrc" method.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
Leoni
  • 11

2 Answers2

1

You can do this by using an .xinitrc file in your home directory, just be sure to append an & to each command.

See here for more information.

  • Depending on the display manager, on Debian .xinitrc may or may not get executed... – dirkt Aug 25 '17 at 05:42
  • If .xinitrc is not executed, create a symbolic link from it called .xsession. It's usually executed when logging in through a graphical login screen (such as XDM or GDM). – Kusalananda Aug 25 '17 at 06:02
  • Why is this getting downvoted? Just because there is a different way it doesn't make it wrong. For those (like myself) that run multi head on nvidia based hardware this is a PITA to put in xorg.conf as if you pull a screen, or move the video card, etc. X wont fallback to a default configuration that works. – HostFission Aug 26 '17 at 08:38
0

Even though you are already running an X server, that doesn't stop you from creating an xorg.conf file. So, open an editor, and start with an /etc/X11/xorg.conf file that looks like this:

Section "Screen"
    Identifier "myscreen"
    SubSection "Display"
         Depth 24
         Modes "1600x900" 
    EndSubSection
EndSection

I'm actually not sure if a "naked" screen section will work, you may also need a Device section, but for that we will need to know your driver (you can find this information in the log file, see below).

Before you do that, make sure you know how to login on the virtual console (text only), so you can repair things if it doesn't work. You will need root rights (sudo) to create the file /etc/X11/, or to move it there if you've created it somewhere else.

After you made the file, reboot (or restart the X server or display manager, if you know how to do that). See if it works; if it doesn't, look at /var/log/Xorg.0.log to find out what has gone wrong.

If you need a device section, and can't figure out how to make one with online tutorials, update your question with information about the driver X uses.

dirkt
  • 32,309