i am used to work with dwm on gentoo and have some customization i want to use. However, when choosing XSESSION in the session menu and logging in, the screen goes black for a second and then im at the login screen again. It seems like the .xsession is not evaluated by the system or dwm is started and terminated immediately.
Here is my .xsession (as it works on gentoo):
- Code: Select all
#!/bin/bash
#eval `dbus-launch --exit-with-session --sh-syntax`
#`which gnome-session`
urxvtd -q -o -f && urxvtc &
#amixer -q set Headphone 80% &
#display -window root repo/dwm/dwm.png
xsetroot -solid black
#xsetroot -solid gray30 &
#setxkbmap -model pc105 -layout us
#xmodmap ~/fk_win_natural_keyb
#turns CAPSLOCK off and lets it act as ESC
xmodmap -e "clear lock"
xmodmap -e "keycode 0x42 = Escape"
sleep 3 && firefox &
sleep 3 && thunderbird &
sleep 3 && evince &
wifi(){
STATUS="X`/sbin/iwgetid`"
if test "$STATUS" != "X" ; then
ESSID="`/sbin/iwgetid |awk -F ":" '{print $2}'|sed -e 's/"//g'`"
LINK="`awk '/wlan0:/ {print $3}' /proc/net/wireless |sed -e 's/\.//g'`"
echo " $ESSID:$LINK"
if [[ $- != *i* ]] ; then
fi
}
batt(){
FULL=`cat /sys/class/power_supply/BAT0/charge_full`
PRESENT=`cat /sys/class/power_supply/BAT0/present`
CHARGE=`cat /sys/class/power_supply/BAT0/charge_now`
STATUS=`cat /sys/class/power_supply/BAT0/status`
if test "$PRESENT" != "0" ; then
CHARGE=$((${CHARGE}*100/${FULL}))
case $STATUS in
Full)
SIGN="=";;
Charging)
SIGN="+";;
Discharging)
SIGN="-";;
esac
echo " ${CHARGE}${SIGN}"
else
echo " AC"
fi
}
volume(){
# STATUS="`amixer get Headphone |awk '/Front\ Left:/ {print $4}'`"
# if test "$STATUS" != "[on]" ; then
# echo " Mute"
# else
echo " `/usr/bin/amixer get PCM |awk '/Front\ Left:/ {print $5}' | sed -e 's/\[//g'|sed -e 's/%\]//g'` "
fi
}
cmusstats(){
if test "X`pgrep cmus`" != "X" ; then
TIME="`cmus-remote -Q |awk '/duration/ {print $2}'`"
CURR="`cmus-remote -Q |awk '/position/ {print $2}'`"
ARTIST="`cmus-remote -Q |sed -ne '/artist/s/tag artist //pg'`"
TITLE="`cmus-remote -Q |sed -ne '/title/s/tag title //pg'`"
echo "[$TITLE] [$ARTIST] [$CURR/$TIME] "
fi
}
xset b 0 440 50 & beep off
# start screen
if /usr/bin/screen -ls | grep -q Main; then
/usr/bin/xterm -e screen -xr Main &
else
/usr/bin/xterm -e screen -S Main &
fi
#original dwm
#while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
#My settings
#while xsetroot -name "`cmusstats``volume``date '+%A, %d. %b %Y %H:%M'`"
while xsetroot -name "`wifi``batt``volume``date '+%A, %d. %b %Y %H:%M'`"
do
sleep 1
done &
exec dwm
exit
the path in .bashrc should be correct,too since
- Code: Select all
me@localhost ~ $ whereis dwm
dwm: /usr/bin/dwm /usr/X11R6/bin/dwm /usr/local/bin/dwm /usr/share/dwm /usr/man/man1/dwm.1.bz2 /usr/share/man/man1/dwm.1.bz2
.bashrc
- Code: Select all
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
BLOCKSIZE=K; export BLOCKSIZE
EDITOR=vim; export EDITOR
PAGER=more; export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
BASH_ENV=$HOME/.shrc; export BASH_ENV
if [ -f ~/.shrc ]; then
source ~/.shrc
fi
# remove /usr/games and /usr/X11R6/bin if you want
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/opt/bin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/opt/bin:/usr/X11R6/bin:$HOME/bin:/usr/glocal/bin:~:/$HOME/documents/shellScripts:/$HOME/local/
# set PATH so it includes user's private bin if it exists
#if [ -d ~/bin ] ; then
# PATH=~/bin:"${PATH}"
#fi
export PATH
# do the same with MANPATH
#if [ -d ~/man ]; then
# MANPATH=~/man:"${MANPATH}"; export MANPATH
#fi
#locales und standarteditor setzen fuer den svn
#export LC_ALL=de_DE
export LC_ALL=en_US
export SVN_EDITOR=vim
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
### Screen Function Mirror in terminal :: scr ###
function scr {
if screen -ls | grep -q Main; then
screen -xr Main
else
screen -S Main
fi
}
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
#=================
#=== Aliase ===
#=================
alias c=clear
alias e=exit
alias dz='lpr -o number-up=2 -Pmark'
alias ff='rm .mozilla/firefox/default.bv8/.parentlock && firefox'
alias th='rm .thunderbird/rlxhkw3z.default/.parentlock && thunderbird'
alias vnc='vncserver -geometry 1280x1024'
alias vncbig='vncserver -geometry 1920x1200'
alias killvnc='vncserver -kill :1'
alias qstat='qstat -c'
alias vi='vim'
alias xfig='xfig -specialtext -latexfonts -startlatexFont default'
alias rm='trashit.sh'
alias xkill="kill -9 \$(psf|grep xsession|awk '{print \$2}')"
alias ps='ps auxww|less'
alias ls='ls -1 --group-directories-first --color'
alias tastatur='setxkbmap -model pc104 -layout us'
alias lpdouble='lpr -o number-up=2 -Plex174'
alias untarz="tar xfvz"
alias tarz="tar cfvz"
alias untar="tar xfv"
alias tarArchive="tar cfv"
Any suggestions, what might go wrong?
Cheers,
ff
