Dual Monitors in XFCE

Forum rules
Before you post please read this

Dual Monitors in XFCE

Postby gooner237 on Wed Jun 20, 2012 1:45 pm

Thought it would be easy to run dual monitors just like i do in Mint 10/11/12/13

But in LMDE XFCE 32 Bit it is not so easy.

Any tips or links greatly appreciated. I have tried searching the forums but not found anything I can get my head around so far.

Thanks
Matthew
User avatar
gooner237
Level 1
Level 1
 
Posts: 4
Joined: Fri Jun 03, 2011 6:51 am

Linux Mint is funded by ads and donations.
 

Re: Dual Monitors in XFCE

Postby jjaythomas on Thu Jun 21, 2012 12:29 pm

How trying two use monitors?? As cloned screens OR separate outputs (screens output, panels ect)

If cloned output, only need to say use in setting>display (can set different resolutions)

if separate outputs per screen a little harder :? .
easiest to install arandr package to set where to use screen outputs (right-left/above-below ect).
Then you can set different wallpapers per monitor (SETTINGS>DESKTOP). Can set panels to different outputs (settings>panel) Set where windows will display (setting>window manager and settings.widow manager tweaks).
The virtual workspaces and pager seems to be global in xfce4 :evil: , but you can drag windows between monitors (if pager properties set to wrapping per viewports in (but switching window to virtual desktop works using 'window Button' right click menu :?

P.S. haven't really done this (my 2nd monitor (larger LCD TV), and my Laptop/tablet is connected to port-dock with internal screen turned of (can't see, it's in desk anyways).
SO maybe able to play with setting to get way like :)

J.Jay

P.S. I believe if you have XFCE installed over a Gnome ISO you can (mostly) *use their GUI's when in XFCE session*, and settings will save to the XFCE session :?: . But nautilus and other Gnome components may cause trouble (plus you well use a little more resources/memory.
jjaythomas
Level 5
Level 5
 
Posts: 597
Joined: Sun Mar 07, 2010 12:52 pm

Re: Dual Monitors in XFCE

Postby Anakinholland on Sun Jun 24, 2012 11:39 am

I use XFCE on my work-laptop, and the generic desktop config only works well with auto-detection which has its quircks. So I have created the following script to hook it up to beamers or monitors:

Code: Select all
#!/bin/bash

function buildmenu()
{

## First we define variables.
## Do not use Spaces in parameters for this function
## as the declare will slice them into different entries
## of the array

declare -a lines=(`echo ${@}`)
counter=1
ar=0

## Go into loop, and create a menu based on the number
## of entries that have been passed to this function

until [[ ${counter} > ${#} ]]
do
   echo "${counter}. ${lines[${ar}]}"
   counter=`expr ${counter} + 1`
   ar=`expr ${ar} + 1`
done
echo
}

function dimensions()
{
echo "Would you like to auto-detect the resolution?"
echo

## Call function to display the menu, and record the
## answer given by the user

buildmenu Automatically Manually
read ANSWER

## Validate the input. If not valid, restart this function
## to ask the question again.
## If user wants to set manually, ask him/her to do so.
## If he/she does not, set it to "auto".

if [[ ${ANSWER} != [12] ]]
then
   echo "invalid input. Try again."
   read TEMP
   dimensions
elif [[ ${ANSWER} == 1 ]]
then
   MODE="auto"
else
   echo -n 'Please enter dimensions, example "1280x768": '
   read ANSWER
   MODE="mode ${ANSWER}"
fi
export MODE
}

function positions()
{
echo "Where is the external monitor positioned?"
echo

## Call function to display the menu, and record the
## answer given by the user

buildmenu Left Right Above Below
read ANSWER

## Validate the input. If not valid, restart this function
## to ask the question again.

if [[ ${ANSWER} != [1-4] ]]
then
        echo "invalid input. Try again."
        read TEMP
        positions
fi

## compare input to values and execute related commands

case ${ANSWER} in
   1)   POSITION='left-of'
      ;;
   2)   POSITION='right-of'
      ;;
   3)   POSITION='above'
      ;;
   4)   POSITION='below'
      ;;
   *)   echo "Error experienced. exiting."
      exit 10
      ;;
esac

export POSITION
}

echo "Let's set the monitor properly"
echo
echo "Do you want to enable or disable external monitor?"
echo

## Call function to display the menu, and record the
## answer given by the user

buildmenu Enable Disable Settings
read ANSWER

## compare input to values and execute related commands

case ${ANSWER} in
   1)      dimensions
           positions
           xrandr --output LVDS1 --auto --output VGA1 --primary --${MODE} --${POSITION} LVDS1
      ;;
   2)   xrandr --output VGA1 --off
           xrandr --output LVDS1 --primary --auto --rotate normal
      ;;
   3)   clear
           xrandr -q
      ;;
   *)   echo "Invalid entry. Try again."
      exit 14
      ;;
esac


First off, use the command

Code: Select all
xrandr -q


to have it show you the possibilities, and change VGA/LVDS to the connections you yourself have. This should be done when connected to the external monitor/beamer.

When running the script you will presented a couple of menus where you make your choices.

If you want to make things permanent (if you have a PC with 2 monitors for instance, or never move your laptop), you could determine the settings you need and execute it during logon. Probably something like this:

Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Dual Monitor
Comment=Extend desktop
Exec=xrandr --output HDMI1 --auto --output HDMI2 --primary --mode 1280x768 --right-of HDMI1
Type=Application
Categories=GTK;Utility;
StartupNotify=false
X-GNOME-Autostart-enabled=true
Terminal=false
NoDisplay=true
Hidden=false


Entered into a file in ~/.config/autostart/

After that start Menu -> Settings -> Session and startup -> Application autostart and tag the new entry you made, so it will be started next time you log in.

Good Luck!!

Anakin
Please Edit your initial post title and add [SOLVED] once your question is resolved.
User avatar
Anakinholland
Level 3
Level 3
 
Posts: 145
Joined: Sun Oct 30, 2011 8:09 am

Re: Dual Monitors in XFCE

Postby ellipse55 on Mon Jun 25, 2012 10:00 pm

Hi all,

I've just started using arandr and it works very well (I'm using LMDE xfce - it's in the standard repositories). You can save monitor setups (e.g., one for the office where my second screen is above, one for school where it's on the right side, one for when I don't have a second monitor) and just choose whichever you wish, as needed. Works well with panel placement, as mentioned above. I prefer it to the gnome applet that does something similar (it's easier to setup exactly the way you want it), and I seem to recall that it doesn't work properly in xfce (not sure here...).

Best,
Pierre.
User avatar
ellipse55
Level 1
Level 1
 
Posts: 21
Joined: Thu Feb 04, 2010 12:57 pm


Return to XFCE

Who is online

Users browsing this forum: No registered users and 5 guests