Ok i have 3 monitors connected, each has its own xsession, is there any way i can set
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Nice, now I just need to figure out how to adjust in which screen will run gnome.
I don't have gnome installed so I am a bit blind here.
Anyway, we will try something. This will not interfere with your graphical login (it shouldn't, at least). First, install fluxbox. The way to do that depends on your distro. It's a very common package, and you should be able to find it in your package manager.
Once that is sorted, open ~/.xinitrc in a text editor, create it if it's not there. Paste this inside that file:
Now, we need to shut down X. So, be sure to write this into a piece of paper or something.
To turn off X you do into a terminal as root this:
Code:
init 3
Now you can use this to start X manually from the command line:
Code:
startx
If it works (I can't test, sorry) you should see gnome on one screen, and fluxbox on the others. If it doesn't, you can use this to revert back to your normal state (or just reboot):
Code:
init 5
As root.
All the errors should be logged to ~/metacity.log, ~/fluxbox_1.log and ~/fluxbox_2.log. That can help us to diagnose any potential problem.
ill give u some more info incase u ar going to ask about the xinitrc file that is sitting in /etc/X11/xinit/
inside that file says the following
Code:
!/bin/bash
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# invoke global X session script
. /etc/X11/Xsession
then inside the /etc/X11/ Xsession shell script it this
Code:
#!/bin/sh
#
# /etc/X11/Xsession
#
# global Xsession file -- used by display managers and xinit (startx)
# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $
set -e
PROGNAME=Xsession
message () {
# pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
message_nonl () {
# pretty-print messages of arbitrary length (no trailing newline); use
# xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
errormsg () {
# exit script with error
message "$*"
exit 1
}
internal_errormsg () {
# exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
# One big call to message() for the sake of xmessage; if we had two then
# the user would have dismissed the error we want reported before seeing the
# request to report it.
errormsg "$*" \
"Please report the installed version of the \"x11-common\"" \
"package and the complete text of this error message to" \
"<debian-x@lists.debian.org>."
}
# initialize variables for use by all session scripts
OPTIONFILE=/etc/X11/Xsession.options
SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources
SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors
# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
[ ! -L "$ERRFILE" ]; then
chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
"\"$ERRFILE\"; look for session log/errors in" \
"\"$TMPDIR/xsession-$USER\"."
fi
else
errormsg "unable to create X session log/error file; aborting."
fi
# truncate ERRFILE if it is too big to avoid disk usage DoS
if [ "`stat -c%s \"$ERRFILE\"`" -gt 500000 ]; then
T=`mktemp -p "$HOME"`
tail -c 500000 "$ERRFILE" > "$T" && mv -f "$T" "$ERRFILE" || rm -f "$T"
fi
exec >>"$ERRFILE" 2>&1
echo "$PROGNAME: X session started for $LOGNAME at $(date)"
# sanity check; is our session script directory present?
if [ ! -d "$SYSSESSIONDIR" ]; then
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
fi
# Attempt to create a file of non-zero length in /tmp; a full filesystem can
# cause mysterious X session failures. We do not use touch, :, or test -w
# because they won't actually create a file with contents. We also let standard
# error from tempfile and echo go to the error file to aid the user in
# determining what went wrong.
WRITE_TEST=$(tempfile)
if ! echo "*" >>"$WRITE_TEST"; then
message "warning: unable to write to ${WRITE_TEST%/*}; X session may exit" \
"with an error"
fi
rm -f "$WRITE_TEST"
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
set +e
for SESSIONFILE in $SESSIONFILES; do
. $SESSIONFILE
done
set -e
fi
exit 0
# vim:set ai et sts=2 sw=2 tw=80:
That's a strange thing. Please, try to post at least the relevant part of the error. Maybe it's because you killed the server. Try to repeat the steps above, but before doing startx, do this:
Code:
rm -rf ~/.Xauthority*
That should allow you to startx (at least until the point where the WM's can actually fail themselvels ).
Quote:
All three log's u mentioned were empty..
Yes. That's because X failed to start, so the WM did not even get into scene.
This thread shouldn't be that complicated to solve. Most video players do have an option to disable the screen saver and powersaving stuff when they are running. This should work out of the box or with very little configuration on the video player program.
I will not discuss the exact terminology because I am not really sure and don't have the time to check right now. But if you are running on X server on each screen (and if you are not using xinerama or twinview, then that's the case), you can run even a different WM on each screen (I've done it without a problem lots of times). So, let alone the screensaver... Each WM can be started with it's own set of apps, including it's own screensaver (or none at all).
If the first solution I mentioned does not work, I can provide sample xinitrc files for almost anything. I just need to search a bit, so let me know if you need specific help with that. I've experimented quite a lot with multi head setups.
Maybe you should read some documentation because you seem confused about the relationship between monitors and screens in X. The xorg.conf ¿F M J¿ supplied clearly had three screens defined, and a single ServerLayout with all three screens, one keyboard, and one mouse. This means there is exactly one instance of X running (one session) with three distinct screens.
This HOWTO has the basics, though it's a bit dated. That HOWTO is specifically about using Xinerama, but you can use multiple screens with or without Xinerama. Multiple screens is completely distinct from newer mechanisms like TwinView that drive multiple monitors from one frame buffer.
Maybe you should read some documentation because you seem confused about the relationship between monitors and screens in X. The xorg.conf ¿F M J¿ supplied clearly had three screens defined, and a single ServerLayout with all three screens, one keyboard, and one mouse. This means there is exactly one instance of X running (one session) with three distinct screens.
I know that monitors and screen are different things. I know how they interact. And I know how a dual server scheme differs from a twinview setup.
But they are not mutually exclusive, that's the whole point of this conversation
I also explicitly stated that this will only work if you use a real multihead setup, again and once more: without xinerama nor twinview.
Whether this is possible or not is out of the question. I have done it millions of times (and the last time was this morning while making that sample xinitrc). You can run different WMs on each screen (and I mean "screen", and not "monitor" as per the Xorg definition). The whole thing here is that Xorg will spawn a new instance for each screen if you don't use twinview to join the devices, just look at top.
I know that monitors and screen are different things. I know how they interact. And I know how a dual server scheme differs from a twinview setup.
But they are not mutually exclusive, that's the whole point of this conversation
I also explicitly stated that this will only work if you use a real multihead setup, again and once more: without xinerama nor twinview.
Whether this is possible or not is out of the question. I have done it millions of times (and the last time was this morning while making that sample xinitrc). You can run different WMs on each screen (and I mean "screen", and not "monitor" as per the Xorg definition). The whole thing here is that Xorg will spawn a new instance for each screen if you don't use twinview to join the devices, just look at top.
Separate screens, Xinerama, and Twinview are all types of multi-head setups; none is more "real" than the others. You also seem to be confusing multiple X servers (each has a single process named Xorg typically) with multiple window managers and other X11 clients.
The problem is not running multiple window managers, but multiple screen savers. I just tried both gnome-screensaver and xscreensaver on an X configuration with two independent screens (:0.0 and :0.1) and both controlled both screens regardless of whether I started them with DISPLAY=:0.0 or DISPLAY=:0.1.
Xscreensaver runs a separate display program on each screen when it activates, but gnome-screensaver displays exactly the same thing on both. Both of them deactivate on both screens when I move the mouse or hit a key. Which screen saver have you used that displays on one screen only?
Well basically what i though i was asking was simple...
Apparently not..
All i wanna do is stop the screen-saver from running on all screens bar the primary one...
With these other ideas, it sounds like i will need 3 keyboards and 3 mice, which isnt a very good alternative..
???????
That's different from what I understood you wanted initially. I had understood that you wanted to have a separate screen saver controlling each screen independently. Disabling the screen savers on all but the primary screen may be more feasible, but unfortunately at least xscreensaver and gnome-screensaver seem to take over all screens of a session automatically.
Xscreensaver runs a separate display program on each screen when it activates, but gnome-screensaver displays exactly the same thing on both. Both of them deactivate on both screens when I move the mouse or hit a key. Which screen saver have you used that displays on one screen only?
I see your point. However, xscreensaver has a -display parameter, -display :0.0 (or :0.1, or whatever) *should* do the trick. And if it doesn't, then there's a problem in your system, or in xscreensaver (and that would be a bug to report).
So, at least xscreensaver, should support this.
If this works, the OP could continue using gnome just like it's now, and launch the xscreensaver daemon manually so it runs only on a given screen. It *should* work.
EDIT: Reading it's man page I see this:
Code:
-display host:display.screen
The X display to use. For displays with multiple screens, XScreenSaver will manage all screens on the display simultaniously.
I don't really understand this entirely. The -display parameter accepts a "screen" parameter, but the description doesn't make it so clear. So I don't really know...
Im assuming i should try xscreensaver and disable gnome-screensaver ?
Yes. Probably. You can kill gnome-screensaver on a terminal, then launch xscreensaver -display =:0.0 (or wahtever screen). After that, launch xscreensaver-demo on another terminal and play with it a bit, see if the achieved effect is the desired one. I don't really know if it will work.
You could also try gnome-screensaver --help and check if it has any similar option...
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
Application Options:
--version Version of this application
--no-daemon Don't become a daemon
--debug Enable debugging code
--display=DISPLAY X display to use
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.