[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dual-Monitor help



Nelson Green wrote:
> So, my final question is, where is my X11 start-up file?

There are several different ways to start up X11.  Probably the
simplest for you is to create a $HOME/.xsession file.  The
xdm/gdm/kdm/lightdm processes will use it if the file exists.  Create
it with the following contents.

Create this ~/.xsession file:

  #!/bin/bash --login
  if xrandr --query | grep -q DVI-I-2=3B then
    xrandr --auto --output DVI-I-2 --right-of DVI-I-1
  fi
  exec x-session-manager

Then make sure to make the file executable.

  chmod a+x ~/.xsession

The '#!/bin/bash --login' part if your login shell is /bin/bash and it
ensures that your ~/.profile or ~/.bash_profile is read just the same
as if you were logging into the system otherwise.  Then your PATH and
LANG and other variables will be set as you desire.

The 'x-session-manager' is a Debian package specific symlink handle
that always points to the currently configured window manager.  This
could be any of gnome, kde, lxde, xfce, fvwm, twm, openbox, or any of
the others.  It depends upon what you have installed.  A system
default.  Of course you can also specifically call out one of your
desired desktop environments or window managers explicitly.

You can see what is configured with:

  update-alternatives --display x-session-manager

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: