LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   nother blackbox question (https://www.linuxquestions.org/questions/linux-software-2/nother-blackbox-question-82386/)

SnowSurfAir 08-15-2003 07:07 PM

nother blackbox question
 
I just want to launch blackbox, not make it so that it perminantly always shows when I start up?How can I do this?

I try just typin blackbox but it says:
Code:

BScreen::BScreen: an error occured while querying the X server.
  another window manager already running on display :0.0.
Blackbox::Blackbox: no managable screens found, aborting.


Mega Man X 08-15-2003 07:27 PM

How are you doing exactly? You are just logging in and typeing blackbox in a X? You know that you cannot have two X servers running at the same time don't you? :). You have to go into:

/etc/X11/xinit

and there change Xclients or xinitrc, depending how you log in (graphical or text mode) add blackbox there.... For example, I "commented" (add a hash "#" sign to comment out) gnome in my Xclients, in the line:

PREFERRED=gnome-section

and added:

PREFERRED=blackbox

I log in in text mode. The I simply type startx and there I go. There're many other ways to do that. Sometimes you've to copy Xclients or xinitrc to your /home/user... well, the important thing to have in mind is to not try to run blackbox from another X, cause it won't work :).

SnowSurfAir 08-15-2003 08:22 PM

since I boot to a graphical interface, after adding that blackbox thing will I be able to choose between Gnome, Kde, blackbox, or Flukbox(if I install flukbox)

SnowSurfAir 08-16-2003 12:20 AM

which one is for the graphical log in

SnowSurfAir 08-16-2003 12:35 AM

ok on Xclients it has alot of Preffered:
Code:

#!/bin/bash
# Copyright 1999 - 2001 Red Hat, Inc.
# License:  GNU General Public License v2

# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
    . /etc/sysconfig/desktop
    if [ "$DESKTOP" = "GNOME" ]; then
        PREFERRED=gnome-session
    elif [ "$DESKTOP" = "KDE" ]; then
        PREFERRED=startkde
    elif [ "$DESKTOP" = "WINDOWMAKER" ]; then
        PREFERRED=wmaker
    fi
fi

if [ -n "$PREFERRED" ] && which $PREFERRED >/dev/null 2>&1; then
    PREFERRED=`which $PREFERRED`
    exec $PREFERRED
fi

# now if we can reach here, either no desktop file was present,
# or the desktop requested is not installed.

if [ -z "$PREFERRED" ]; then
 
    GSESSION=gnome-session
    STARTKDE=startkde
 
    # by default, we run GNOME.
    if which $GSESSION >/dev/null 2>&1; then
        exec `which $GSESSION`
    fi

    # if GNOME isn't installed, try KDE.
    if which $STARTKDE >/dev/null 2>&1; then
        exec `which $STARTKDE`
    fi
fi

# Failsafe.

# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0
rm -f /tmp/fvwmrc* 2>/dev/null

# First thing - check the user preferences
if [ -f $HOME/.wm_style ] ; then
    WMSTYLE=`cat $HOME/.wm_style |tr A-Z a-z`
    case "$WMSTYLE" in
        afterstep|windowmaker|mmaker)
        exec /usr/X11R6/bin/RunWM --WindowMaker
        ;;
        fvwm95|fvwm|fvwm2)
        exec /usr/X11R6/bin/RunWM --Fvwm95
        ;;
        mwm|lesstif)
        exec /usr/X11R6/bin/RunWM --FvwmMWM
        ;;
    esac
fi

# Argh! Nothing good is installed. Fall back to fvwm2 (win95-style) or twm
/usr/X11R6/bin/RunWM --Fvwm95 || {
    # gosh, neither fvwm95 nor fvwm2 is available;
    # fall back to failsafe settings
    xclock -geometry 100x100-5+5 &
    xterm -geometry 80x50-50+150 &
    if [ -f /usr/bin/mozilla -a -f /usr/share/doc/HTML/index.html ]; then
        mozilla /usr/share/doc/HTML/index.html &
    fi
    if [ -f /usr/X11R6/bin/fvwm ]; then
        exec fvwm
    else
        exec twm
    fi
}

Which do I need to change?and also in the man page for it on how to get it to work section of it I cant find ~/.xinitrc or ~/.xsession. and I have to add blackbox to the end of either of those. do I absolutly need to do that?

Mega Man X 08-16-2003 04:29 AM

I am not sure which one is for graphical login :) In RedHat 9.0 I change the Xclients and it works (text login) in Slackware, I change xinitrc (text login) and it also works... Well, try doing this at the beginning of your Xclients, it read:

if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
PREFERRED=gnome-session
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde

I don't know which desktop you start with, so let's say it's gnome, so do this:

if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
# PREFERRED=gnome-session
PREFERRED=blackbox
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde


You could also change your /etc/sysconfig/desktop and write blackbox in there... then you need to ad a line at your Xclients like this:

if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if["$DESKTOP" = "blackbox"]; then
PREFERRED=blackbox
elif [ "$DESKTOP" = "GNOME" ]; then
PREFERRED=gnome-session
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde

I don't how to do it in graphical login and to add an entry in the graphical login either :(. I always have used text login because from time to time I mess up my X and have to fix it from there :) hehe

Good Luck

ichbinesderelch 08-16-2003 05:48 AM

hey snow, if i noticed right you are using redhat 9? well i had the same problem, but just put a link of blackbox to /etc/X11/gdm/Sessions/ if you are using gdm manager, than you can choose blackbox on startup

Mega Man X 08-16-2003 06:05 AM

hey that's cool :) I didn't know that :). Thanks ichbinesderelch

ichbinesderelch 08-16-2003 06:18 AM

np ;) its a bit simpler than editin the file which you discribed, i tried this first too :)

SnowSurfAir 08-16-2003 06:10 PM

wait is it only supposed to say desktop="gnome" in it? and if so do I just add desktop="blackbox"? or do Ichange it from gnome to blackbox?

ichbinesderelch 08-16-2003 06:16 PM

read the thing i wrote, linkin blackbox to /etc/X11/gdm/Sessions, its simpler ;)

SnowSurfAir 08-16-2003 06:24 PM

k u were right but how do I change the background?

ichbinesderelch 08-16-2003 06:29 PM

bsetbg -c filename,
but you should edit the style file
if you have installed it normaly than it should be in /usr/local/share/blackbox/styles/

SnowSurfAir 08-16-2003 06:33 PM

what does the bsetbg command do?

ichbinesderelch 08-16-2003 06:36 PM

bsetbg tells blackbox to set a background ;)


All times are GMT -5. The time now is 04:34 PM.