PDA

View Full Version : xinitrc


qaywsx
30-05-2004, 20:26
Ciao gente,
visto che kde è troppo pesante ho deciso di usare fluxbox.
Ora però c'è un problema... sotto /home/*****/.kde/Autostart potevo comodamente mettere i programmi da far startare.
Sotto fluxbox le faq dicono di modificare il file xinitrc ma DOVE SI TROVA QUESTO FILE e soprattutto COME BISOGNA MODIFICARLO ?
grazie

kingv
30-05-2004, 20:32
si trova nella home di ogni utente col nome .xinitrc

se non viene trovato viene utilizzato /etc/X11/xinit/xinitrc

lo puoi editare con vi o qualsiasi editor di testo.

qaywsx
30-05-2004, 20:33
grazie, ora provo a editarlo e ti faccio sapere

kingv
30-05-2004, 20:36
Originariamente inviato da qaywsx
grazie, ora provo a editarlo e ti faccio sapere


riguarda il messaggio precedente, mi ero dimenticato una directory :fagiano:

qaywsx
30-05-2004, 20:47
ma in che modo devo aggiungere il nome dei programmi che voglio far partire ?
Io ho aggiunto semplicemente
gnome-settings-daemon
fbdesk -l nomedesktop.jpg

però fluxbox praticamente non parte :muro:

qaywsx
30-05-2004, 20:59
Devo copiare /etc/X11/xinitrc/xinitrc in /home/*****/.xinitrc giusto?
Se aggiungo qualcosa sotto la riga # Add your own lines here... (ad esembio gnome-settings-daemon) fluxbox non si avvia più!:muro: Help:muro: :mad:

kingv
30-05-2004, 21:03
non so cosa sia gnome-settings-daemon, aggiungi un programma tipo xclock e guarda se parte all'avvio del WM



posta anche tutto .xinitrc (non dovrebbe essere lungo)

qaywsx
30-05-2004, 21:07
Ora qualcosa ho capito, o provato a mettere xterm e all'avvio fa partire un terminale. Sul terminale digito exit poi parte fluxbox.
Come posso fargli partire insieme ?
Ecco .xinitrc
------------------------------------------------------------
#!/bin/bash
#
# Sample .xinitrc for SuSE Linux
# This script is called from 'startx' when you start an X session
#

#
# In case everything goes wrong, we at least fall back to a plain xterm
#
failsafe="xterm -ls -T Failsave -geometry 80x24-0-0"
trap "exec $failsafe" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO

#
# Some bash (1 and 2) settings to avoid trouble on a
# failed program call.
#
test -n "$BASH" && set +o posix
no_exit_on_failed_exec=1
type shopt > /dev/null 2>&1 && shopt -s execfail
set +e > /dev/null 2>&1

#
# This should be the default
#
export TERM=xterm

#
# choose a window manager
#
if test -n "$WINDOWMANAGER" ; then
WINDOWMANAGER=`type -p $WINDOWMANAGER`
fi
if test -z "$WINDOWMANAGER" ; then
if test -x /usr/X11R6/bin/kde ; then
WINDOWMANAGER=/usr/X11R6/bin/kde
elif test -x /usr/X11R6/bin/startkde ; then
WINDOWMANAGER=/usr/X11R6/bin/startkde
elif test -x /usr/X11R6/bin/fvwm2 ; then
WINDOWMANAGER=/usr/X11R6/bin/fvwm2
elif test -x /usr/X11R6/bin/wmlist ; then
for i in `/usr/X11R6/bin/wmlist` ; do
WINDOWMANAGER=`type -p $i`
test -n "$WINDOWMANAGER" && break
done
elif test -x /usr/X11R6/bin/twm ; then
WINDOWMANAGER=/usr/X11R6/bin/twm
fi
fi

if test -z "$WINDOWMANAGER" ; then
echo "Error: Unable to find a window manager. Please make sure you installed one!"
echo "Exiting..."
xmessage -timeout 10 -default okay -center -file - <<-EOF
Error: Unable to find a window manager. Please make sure you installed one!
Exiting...
EOF
exit 1
fi

#
# Load system and users resources if not already done
# (XSESSION_IS_UP set by xdm in $XLIBDIR/xdm/Xsession)
#
if test "$XSESSION_IS_UP" != "yes" ; then
XLIBDIR=/usr/X11R6/lib/X11
test -r $XLIBDIR/Xmodmap && xmodmap $XLIBDIR/Xmodmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
test -r $XLIBDIR/Xresources && xrdb -load -retain $XLIBDIR/Xresources
test -r $HOME/.Xdefaults && xrdb -I$HOME -merge $HOME/.Xdefaults
test -r $HOME/.Xresources && xrdb -I$HOME -merge $HOME/.Xresources
fi

# Start the XIM server
XIMFILE=/etc/X11/xim
test -r $HOME/.xim && XIMFILE=$HOME/.xim
test -r $XIMFILE && source $XIMFILE

# Enable Numlock if set
test -r /var/run/numlock-on -a -x /usr/X11R6/bin/numlock && /usr/X11R6/bin/numlock

# Disable new Xcursor themes if none is specified resp. located in $HOME
# (use "unset XCURSOR_CORE" to enable them again later)
#if [ "x$XCURSOR_THEME" == "x" -a ! -d $HOME/.icons ]; then
# export XCURSOR_CORE=true
#else
# unset XCURSOR_CORE
#fi

# Prevent keyboard bouncing for Toshiba Notebooks
# Means, disable AccessX
test -r /etc/sysconfig/sax && source /etc/sysconfig/sax
if [ "x$KBD_BOUNCE_FIX" = "xyes" ]; then
test -x /usr/X11R6/bin/xbounce && /usr/X11R6/bin/xbounce
fi

#
# Add your own lines here...
konsole
#


# day planer deamon
# pland &

#
# finally start the window manager
#
exec $WINDOWMANAGER

# call failsafe
exit 0

------------------------------------------------------------

kingv
30-05-2004, 21:11
non vedo la chiamata a fluxbox :confused:



come fa a partire?

guldo76
30-05-2004, 21:12
Ad esempio, il mio .xinitrc e` tutto qua:
exec wterm +sb -bg azure -fg black &
exec hotkeys -o off -t sk2500 -d /dev/hdb &
exec fluxbox

Guldo

qaywsx
30-05-2004, 21:12
la faccio partire tramite kdm

kingv
30-05-2004, 21:17
se usi kdm devi utilizzare un file che si chiama .xsession (nella tua home)


controlla che sia eseguibile ( chmod ug+x .xsession)

kingv
30-05-2004, 21:19
tanto per fare una prova creati un .xsession semplice, tipo:


fluxbox & fbpid=$!

xterm &

wait $fbpid

qaywsx
30-05-2004, 21:25
MITICOOOOOOOO; ora funziona
ecco il file .xsession
------------------------------------------
fluxbox & fbpid=$!
kicker
gnome-settings-daemon &
fbsetbg -l /home/*****/.kde/share/wallpapers/acqua.jpg
/home/*****/.kahakai/adsl.sh

wait $fbpid
------------------------------------------
comunque quel wait $fbpid cosa significa ?

kingv
30-05-2004, 21:32
dato che Xfree sta in piedi finche' l'esecuzione di xinitrc (o xsession) non e' terminata quel wait aspetta che venga chiuso il WM, finche' il WM non e' terminato non termina nemmeno l'esecuzione dello script



;)

qaywsx
30-05-2004, 21:36
ok, ora posso andare a dormire !:D
Tra l'altro ... conosci mica qualche altro programma tipo superkaramba simile al menu di mac os x ?

kingv
30-05-2004, 21:41
Originariamente inviato da qaywsx
ok, ora posso andare a dormire !:D
Tra l'altro ... conosci mica qualche altro programma tipo superkaramba simile al menu di mac os x ?


no mi spiace, a essere sincero non ho mai usato neanche superkaramba....