LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-06-2008, 05:05 AM   #16
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15

4 monitors currently

5th monitor wont be plugged up untill aother gfx-card is sourced..

But at the moment..

Only 4 monitors

2 LCD's
2 TV's

which would make three desktops including the main one

The only thing that will be runnin on the 2nd and 3rd xsessions would be vlc player and its playlist..

Last edited by F M J; 09-06-2008 at 05:21 AM.
 
Old 09-06-2008, 05:32 AM   #17
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
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:

Code:
metacity --display=:0.0 > "${HOME}/metacity.log" 2>&1 &
sleep 2
gnome-session&
fluxbox -screen 1 > "${HOME}/fluxbox_1.log" 2>&1 &
fluxbox -screen 2 > "${HOME}/fluxbox_2.log" 2>&1 &
Save it as ~/.xinitrc

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.

Let me know how it goes.

Last edited by i92guboj; 09-06-2008 at 05:33 AM.
 
Old 09-06-2008, 06:18 AM   #18
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15
ok well heres what happened..


Firstly, i made the file ~/.xinitrc

but also noticed there is a /etc/X11/xinitrc


Then i went to terminal and tried "init 3"

said i needed to be root..

so i did "sudo init 3" - brang me to a new line..

From here i didnt reboot, but though ctrl + alt +f1 - brang me to text login, entered, then killed gdm using

sudo /etc/init.d/gdm stop

Then continued to do startx

which ended up wit the following result


got a error saying something about XAuthority.


--= EDIT =--

All three log's u mentioned were empty..


Just incase its a distro thing.. this might be helpful ? https://wiki.ubuntu.com/CustomXSession

Last edited by F M J; 09-06-2008 at 07:01 AM.
 
Old 09-06-2008, 08:28 AM   #19
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15
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:
 
Old 09-06-2008, 12:16 PM   #20
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Hi again, and sorry for being late this time.

Quote:
Originally Posted by F M J View Post

got a error saying something about XAuthority.
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.

Cheers.

Last edited by i92guboj; 09-06-2008 at 12:18 PM.
 
Old 09-06-2008, 03:51 PM   #21
JonnerR
LQ Newbie
 
Registered: Dec 2005
Posts: 21

Rep: Reputation: 16
Check again

Quote:
Originally Posted by i92guboj View Post
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.
 
Old 09-06-2008, 04:06 PM   #22
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Quote:
Originally Posted by JonnerR View Post
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.

Last edited by i92guboj; 09-06-2008 at 04:08 PM.
 
Old 09-06-2008, 04:29 PM   #23
JonnerR
LQ Newbie
 
Registered: Dec 2005
Posts: 21

Rep: Reputation: 16
Quote:
Originally Posted by i92guboj View Post
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?
 
Old 09-06-2008, 04:41 PM   #24
JonnerR
LQ Newbie
 
Registered: Dec 2005
Posts: 21

Rep: Reputation: 16
Quote:
Originally Posted by F M J View Post
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.
 
Old 09-06-2008, 06:18 PM   #25
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Quote:
Originally Posted by JonnerR View Post
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...

Last edited by i92guboj; 09-06-2008 at 06:22 PM.
 
Old 09-06-2008, 06:33 PM   #26
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15
ok so from all of this..

Im assuming i should try xscreensaver and disable gnome-screensaver ?
 
Old 09-06-2008, 06:38 PM   #27
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Quote:
Originally Posted by F M J View Post
ok so from all of this..

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...
 
Old 09-06-2008, 06:47 PM   #28
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15
physics@physics:/etc/rc2.d$ gnome-screensaver --display =:0.0

** (gnome-screensaver:16845): WARNING **: cannot open display: =:0.0
physics@physics:/etc/rc2.d$ gnome-screensaver --help
Usage:
gnome-screensaver [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

physics@physics:/etc/rc2.d$ gnome-screensaver --display=0

** (gnome-screensaver:16867): WARNING **: cannot open display: 0
physics@physics:/etc/rc2.d$ gnome-screensaver --display=1
 
Old 09-06-2008, 06:49 PM   #29
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Crdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Try

Code:
gnome-screensaver --display=:0.0
Without the space.

EDIT: Make sure you first kill the previously running gnome-screensaver.

Last edited by i92guboj; 09-06-2008 at 06:51 PM.
 
Old 09-06-2008, 06:51 PM   #30
F M J
Member
 
Registered: Feb 2004
Location: New Zealand
Distribution: Ubuntu Hardy Heron, Fedora Core 3
Posts: 45

Original Poster
Rep: Reputation: 15
physics@physics:/etc/rc2.d$ gnome-screensaver --display=:0.0

** (gnome-screensaver:17061): WARNING **: screensaver already running in this session
physics@physics:/etc/rc2.d$


and it still puts screensaver up on all screens
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
have 2 monitors connected to my pc, but lspci only finds 1.. help nappy Linux - Hardware 4 02-11-2008 10:45 AM
how do I set up dual monitors is Ubuntu 7.0.4 mustang05 Linux - Software 1 06-14-2007 02:28 PM
trouble getting dual monitors set up revolthor Linux - Newbie 5 04-12-2005 12:17 AM
how to set up dual monitors contrasutra Linux - Software 1 04-07-2003 03:32 AM
two monitors set up in X? doublefailure Linux - General 15 04-28-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration