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

Re: automation of xrandr

Le 29.11.2014 15:58, peter@easthope.ca a écrit :
helped to establish a usable multi-screen configuration.

Now what is the recommendation to automate?  Put the
xrandr command in .profile?

Sorry for delay, lot of mails btw.
Personally, I use .xinitrc, but I am not using a big DE.

So, here is what looks like my .xinitrc on the machine I currently am on:
$ cat .xinitrc
xrandr --output VGA-1 --off
xrandr --output DVI-I-1 --primary --mode 1920x1080
xrandr --output HDMI-1 --mode 1920x1080 --right-of DVI-I-1
ssh-agent i3 --shmlog-size=26414400

What does it does?
When I log in my TTY1, I have a .bash_profile (I should move that stuff in .profile btw!) with those lines:
$ cat .bash_profile
if [ -d "$HOME/scripts" ] ; then

export CC=clang
export CXX=clang++
export MAKEFLAGS="-j `grep -c processor /proc/cpuinfo`"

if [ -z "$DISPLAY" ] && [ `tty` == /dev/tty1 ]
	#VBoxHeadless -startvm debian-dev > /dev/null &

What's interesting is the section testing if I am login on TTY1 (thanks to gentoo's wiki btw!), and if so, running the command startx. This is what starts Xorg, which, AFAIU, runs the script in .xinitrc at start, so, the xrandr stuff and the effective window manager (with a ssh-agent session, so that I only need to write my passphrase once. Very useful thing.).

If tomorrow, I want to adopt a DE, or change my window manager for this user, I just have one line to change.

Reply to: