This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:lxde_dual-monitor_setup [2013/04/27 07:26] clee231 created and written by clee231 |
linux:lxde_dual-monitor_setup [2021/05/02 21:36] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== LXDE Setup ====== | ||
+ | |||
+ | |||
+ | **As of July 2013, this fix seems to be outdated.... Not sure what walter did, but it seems to be fixed without using the lxdm configuration files.** | ||
+ | |||
====== Setup ====== | ====== Setup ====== | ||
Workstations with a dual-monitor setup have some issues with deciding which monitor to use as the primary monitor. This will cause some issues with some games, applications, and issues with screen alignment. | Workstations with a dual-monitor setup have some issues with deciding which monitor to use as the primary monitor. This will cause some issues with some games, applications, and issues with screen alignment. | ||
Line 13: | Line 18: | ||
</code> | </code> | ||
- | Please note that this has only been testing on the HP workstations running Arch, and have not been extensively testing on single-monitor setups and the like. | + | Please note that this has only been tested on the HP workstations running ArchLinux, and have not been extensively tested on single-monitor setups and the like. |
====== Running at Login ====== | ====== Running at Login ====== | ||
Line 20: | Line 25: | ||
In order to automate this process,(instead of making users do this themselves) we can put this script in the corresponding LXDM configurations files. The LXDM files are run at specific times during the login and logout process. Appending these commands will automatically setup the dual-monitor layout. | In order to automate this process,(instead of making users do this themselves) we can put this script in the corresponding LXDM configurations files. The LXDM files are run at specific times during the login and logout process. Appending these commands will automatically setup the dual-monitor layout. | ||
- | The following are copies of the modified LXDM configurations files as of April 27, 2013: | + | The following are copies of the modified LXDM configurations files as of **May 13, 2013**: |
Note that these settings should not be applied to single-monitor setups, as this may result in unintended results. | Note that these settings should not be applied to single-monitor setups, as this may result in unintended results. | ||
- | ==== /etc/lxdm/PreShutdown ==== | + | ==== /etc/lxdm/PreShutdown | (Executed as root) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # | ||
Line 29: | Line 34: | ||
</code> | </code> | ||
- | ==== /etc/lxdm/PostLogin ==== | + | ==== /etc/lxdm/PostLogin | (Executed as logged-in user) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # | ||
Line 44: | Line 49: | ||
- | ==== /etc/lxdm/PreReboot ==== | + | ==== /etc/lxdm/PreReboot | (Executed as root) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # | ||
Line 51: | Line 56: | ||
- | ==== /etc/lxdm/PostLogout ==== | + | ==== /etc/lxdm/PostLogout (Executed as logged-in user) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # | ||
Line 57: | Line 62: | ||
if [ "$USER" == "acmguest" ] | if [ "$USER" == "acmguest" ] | ||
then | then | ||
- | umount /opt/acmguest/.local/share/Steam | ||
sudo /usr/local/sbin/guestd restart | sudo /usr/local/sbin/guestd restart | ||
fi | fi | ||
- | if [ "$USER" == "lol" ] | + | umount $HOME/.local/share/Steam |
+ | killall --user $USER -TERM | ||
+ | xsetroot -solid black | ||
+ | test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r | ||
+ | # this makes sure lxdm is restarted if it crashes | ||
+ | if [ ! -z "$(pgrep lxdm)" ] | ||
then | then | ||
- | umount /opt/lol/.local/share/Steam | + | systemctl restart lxdm |
- | else | + | |
- | umount /home/$USER/.local/share/Steam | + | |
fi | fi | ||
- | killall --user $USER -TERM | + | |
+ | # this forces users t o logout | ||
+ | loginctl terminate-user user1 user2 | ||
# Begin Josh Kilmer's (jkilmer)(srjek) dualmonitor script | # Begin Josh Kilmer's (jkilmer)(srjek) dualmonitor script | ||
xrandr --output DVI-I-3 --off | xrandr --output DVI-I-3 --off | ||
Line 73: | Line 83: | ||
- | ==== /etc/lxdm/PreLogin ==== | + | ==== /etc/lxdm/PreLogin | (Executed as root) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # | ||
Line 87: | Line 97: | ||
# mount -B /opt/Steam /home/$USER/Steam | # mount -B /opt/Steam /home/$USER/Steam | ||
#fi | #fi | ||
- | if [ "$USER" == "lol" ] | + | #!/bin/sh |
- | then | + | # |
- | mount -B /opt/Steamlocal /opt/lol/.local/share/Steam | + | # Note: this is a sample and will not be run as is. |
- | chown -R lol:users /opt/lol/.local/share/Steam | + | #!/bin/sh |
- | else | + | # |
- | if [ "$USER" == "acmguest" ] | + | # Note: this is a sample and will not be run as is. |
- | then | + | |
- | mount -B /opt/Steamlocal /opt/acmguest/.local/share/Steam | + | |
- | chown -R acmguest:users /opt/acmguest/.local/share/Steam | + | |
- | else | + | |
- | mount -B /opt/Steamlocal /home/$USER/.local/share/Steam | + | |
- | if [ "$?" -ne "0" ] | + | mount -B /opt/Steamlocal $HOME/.local/share/Steam |
- | then | + | chown -R $USER:users $HOME/.local/share/Steam |
- | mkdir /home/$USER/.local/share/Steam | + | |
- | mount -B /opt/Steamlocal /home/$USER/.local/share/Steam | + | |
- | fi | + | |
- | chown -R $USER:users /home/$USER/.local/share/Steam | + | |
- | fi | + | |
- | fi | + | |
# Begin Josh Kilmer's (jkilmer)(srjek) dualmonitor script | # Begin Josh Kilmer's (jkilmer)(srjek) dualmonitor script | ||
xrandr --output DVI-I-3 --off | xrandr --output DVI-I-3 --off | ||
Line 168: | Line 167: | ||
- | ==== /etc/lxdm/LoginReady ==== | + | ==== /etc/lxdm/LoginReady | (Executed as root) ==== |
<code>#!/bin/sh | <code>#!/bin/sh | ||
# | # |