public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] XSESSION="Xsession" doesn't work!
@ 2007-07-17 21:01 Stroller
  2007-07-18  4:28 ` Volker Armin Hemmann
  2007-07-18  6:03 ` Elias Probst
  0 siblings, 2 replies; 20+ messages in thread
From: Stroller @ 2007-07-17 21:01 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 5095 bytes --]

Hi there,

I'm fairly experienced with Linux and have been using Gentoo for over  
3 years, but mostly I only use it on headless servers, so I'm afraid  
I don't know much about GUI stuff.

I've just installed Gentoo on my PS3, which I want to use mostly for  
playing DVDs at the moment (and as a MythTV frontend eventually). My  
expectations when running X (let's say adding /etc/init.d/xdm to the  
default runlevel) are that I'm presented with a login prompt, there  
should be a mouse cursor & stuff and when I log in I should be  
presented with a terminal window in which I can type my command to  
run `mplayer` or whatever.

I'd expect shortly to get mplayer or vlc or something running  
automatically when the system completes booting-up - this is what  
MythTV users typically do so that their system behaves more like a TV- 
appliance than a Linux machine - but I'd like to skip that for the  
moment whilst I log in as my own user, play with different media  
players & work out which one suits me best.

Gentoo for the PS3 is supplied as a LiveCD for chrooting and a stage4  
tarball - I've only ever used stage1 (3 or more years ago) and stage3  
(more recently) tarballs in the past. This stage4 is  quick to set up  
and the basics seem to work very well - I can log in at the  
framebuffer & surf the internet using elinks :D. This stag4 also  
includes fluxbox, which I haven't used before & am not really  
interested in but which I haven't uninstalled yet.

The Gentoo X Server Configuration HOWTO <http://www.gentoo.org/doc/en/ 
xorg-config.xml> has much that doesn't seem relevant to me right now,  
seeing as the stage comes with both Xorg itself and a suitable  
xorg.conf for the PS3 preinstalled, but if I skip to just after code  
listing 3.6 it tells me how the value of XSESSION is read from /etc/ 
rc.conf

Reading /etc/rc.conf I find:
   # Xsession - will start a terminal and a few other nice apps
This seem perfect for me. I don't care that it's described elsewhere  
as ugly - I think this is twm, Xorg's own default window-manager? -   
but if it pops open a terminal window when I log in, and maybe xclock  
then I'm good to go.

What confuses me is that this doesn't work. It works perfectly if I set:
   XSESSION="fluxbox"
- I get the fluxbox menubar at the bottom of the screen and I can  
open terminal windows & stuff
but not when I set
   XSESSION="Xsession"

Diagnostics I can think of:
    $ grep ^X /etc/rc.conf
    XSESSION="Xsession"
    $ ls -l /etc/X11/Sessions/
    total 8
    -rwxr-xr-x 1 root root 2187 Jun 10 19:31 Xsession
    -rwxr-xr-x 1 root root   22 Jun 10 19:50 fluxbox
    $ grep DISPLAYMANAGER /etc/conf.d/xdm
    DISPLAYMANAGER="xdm"

When I log in remotely & run `sudo /etc/init.d/xdm start` I get a  
simple login window with an X11-type logo on the right-hand side.  
Once I use the connected keyboard & mouse - which work perfectly - to  
enter my user & password I see a window titled "Session Menu";  it  
appears to have a kind of text box in which is displayed  
"chooseSessionListWidget" - all I can choose is the "Failsafe /  
Default" which gives me a grey X11 background with the (correct)  
chunky black X cursor. No terminals or other windows open and I'm  
unable to work out how the heck to start an app. When I `sudo /etc/ 
init.d/xdm restart` via SSH I again get the login window and this  
time the Session Menu says "fail safe" in the "text box" - I now have  
extra load session & delete session buttons but they don't do  
anything useful.

I have followed the pointers in the "startx no longer gives gnome"  
thread <http://thread.gmane.org/gmane.linux.gentoo.user/185659> but  
no joy. If, instead of starting `/etc/init.d/xdm`, I log in at the  
framebuffer prompt and type ` XSESSION="Xsession" startx` I again get  
the "Session Menu" window and the X cursor, but this time a black  
background behind that widow and a _black_ screen when I log in.

There's no .xsession stuff in my home directory - I even deleted  
~/.*to be paranoid-sure of this. Whups, there goes my bash history!!  
None of the log files show anything useful or relevant - I've even  
run `watch -n 0.3 ls -lt /var/log/` and the only ones that change are  
xdm.log, Xorg.0.log and the weird binary file wtmp. They all show X  
starting swimingly but not the sesssion stuff. I don't know what else  
to say.

What's weird is that I _did_ see the expected terminal windows  
opening yesterday, but I can't reproduce them now. The behaviour  
seemed to be correct when I ran `startx` but not when I added xdm to  
the default runlevel & started it that way. But now it doesn't work  
at all.

I've attached the actual /etc/X11/Sessions/Xsession file, but I'm  
sure this is unchanged - I'm sure it's exactly as shipped by Gentoo  
by default. I've thought about replacing that with a simple `echo  
"hello world`", but I'm not sure how to do that within the X11  
environment.

Many thanks indeed for the time you've taken reading this, and for  
your patience and in advance for any help or suggestions you can offer,

Stroller.



[-- Attachment #2: Xsession --]
[-- Type: application/octet-stream, Size: 2187 bytes --]

#!/bin/sh
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $

case $# in
1)
	case $1 in
	failsafe)
		exec xterm -geometry 80x24-0-0
		;;
	esac
esac

# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
	if ( cp /dev/null "$errfile" 2> /dev/null )
	then
		chmod 600 "$errfile"
		exec > "$errfile" 2>&1
		break
	fi
done

# clean up after xbanner
if which freetemp 2> /dev/null ; then
	freetemp
fi

startup=$HOME/.xsession

userresources=$HOME/.Xresources 
usermodmap=$HOME/.Xmodmap 
userxkbmap=$HOME/.Xkbmap

sysresources=/etc/X11/Xresources 
sysmodmap=/etc/X11/Xmodmap 
sysxkbmap=/etc/X11/Xkbmap

rh6sysresources=/etc/X11/xinit/Xresources 
rh6sysmodmap=/etc/X11/xinit/Xmodmap 


# merge in defaults
if [ -f "$rh6sysresources" ]; then
    xrdb -merge "$rh6sysresources"
fi

if [ -f "$sysresources" ]; then
    xrdb -merge "$sysresources"
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

# merge in keymaps
if [ -f "$sysxkbmap" ]; then
    setxkbmap `cat "$sysxkbmap"`
    XKB_IN_USE=yes
fi

if [ -f "$userxkbmap" ]; then
    setxkbmap `cat "$userxkbmap"`
    XKB_IN_USE=yes
fi

#
# Eeek, this seems like too much magic here
#
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
    if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
       xkbsymbols=`sed -n -e 's/^[     ]*XkbSymbols[   ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
       if [ -n "$xkbsymbols" ]; then
           setxkbmap -symbols "$xkbsymbols"
           XKB_IN_USE=yes
       fi
    fi
fi

# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
    if [ -f "$rh6sysmodmap" ]; then
       xmodmap "$rh6sysmodmap"
    fi

    if [ -f "$sysmodmap" ]; then
       xmodmap "$sysmodmap"
    fi

    if [ -f "$usermodmap" ]; then
       xmodmap "$usermodmap"
    fi
fi

unset XKB_IN_USE

if [ -x "$startup" ]; then
	exec "$startup"
elif [ -x "$HOME/.Xclients" ]; then
	exec "$HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
	exec /etc/X11/xinit/Xclients
elif [ -x /etc/X11/Xclients ]; then
	exec /etc/X11/Xclients
else
	exec xsm
fi

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-07-19 23:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 21:01 [gentoo-user] XSESSION="Xsession" doesn't work! Stroller
2007-07-18  4:28 ` Volker Armin Hemmann
2007-07-18  6:03 ` Elias Probst
2007-07-18  6:16   ` Dale
2007-07-18  6:25     ` Patrick Holthaus
2007-07-18  6:43       ` Dale
2007-07-18  8:20     ` Neil Bothwick
2007-07-18  8:32       ` [gentoo-user] Multiple Messages (was: XSESSION="Xsession" doesn't work!) Alexander Skwar
2007-07-18 18:26     ` [gentoo-user] XSESSION="Xsession" doesn't work! Mick
2007-07-18 23:10       ` Stroller
2007-07-18 23:47         ` James Ausmus
2007-07-19 23:51           ` Stroller
2007-07-19  0:22         ` Dan Farrell
2007-07-18  7:49   ` [gentoo-user] Mail client usage? (was: XSESSION="Xsession" doesn't work!) Alexander Skwar
2007-07-18  7:58     ` Dirk Heinrichs
2007-07-18  8:55       ` Dirk Heinrichs
2007-07-18  9:07         ` [gentoo-user] Mail client usage? Alexander Skwar
2007-07-18  9:12           ` [gentoo-user] " Alexander Skwar
2007-07-18 17:42             ` Volker Armin Hemmann
2007-07-18 12:47   ` [gentoo-user] XSESSION="Xsession" doesn't work! Stroller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox