LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 01-12-2004, 04:11 AM   #1
Ac. K.
LQ Newbie
 
Registered: Jan 2004
Distribution: Fedora Core 1
Posts: 9

Rep: Reputation: 0
Thumbs down After fooling around with sessions a .xsession-errors - but no apparent error!


They often say there are no stupid questions, but this one proves the contrary.. Being foolish and too daring does the trick mighty fine. Just bare with the newbie.

Happily fiddling around I noticed the Preferences/Sessions option in the GNOME menu and thought "wow, I guess you can have many neat sessions saved so you can somewhere choose which one of them to open on login". I renamed the default session, which I had set up all nice and tidy for programming and created a new one.

Then I tried logging in again, thinking that at some point or another I would be asked whether I'd perhaps like another session than the default.. But no! Well, being all about learning the insides of my newly discovered free OS I su'd my way to the root account and found the /etc/X11/dm/Sessions directory. The files looked nice and simple so I copied gnome.desktop to a new name, edited the "Exec" part to include the proper switch for choosing a different session.

My new entry showed up in the Sessions menu of the log-in screen, but it didn't work. And as if that wasn't depressing enough, now on every log-in a .xsession-errors gets created with the following contents:

EDIT: the contents are meaningless, normal messages meant for debugging. So the problem is that the file gets created for some reason, even though no error has occurred or the error doesn't have code for actually appending to the file.

What I'd like to know is how to get the thing back to normal so that the file is there only when there HAVE been errors.. And if you're feeling generous, a hint on how my session-switching fantasy could be realized would be very much appreciated as well.

-ack-

Last edited by Ac. K.; 01-13-2004 at 04:00 AM.
 
Old 01-12-2004, 11:35 AM   #2
Hertattack
LQ Newbie
 
Registered: Jan 2004
Location: Netherlands
Distribution: Gentoo 1.4
Posts: 26

Rep: Reputation: 15
Ack,

I think you have mixed two thing up .... The sessions you can configure in the Gnome GUI are different from the ones you modified in your /etc directory...

You should return the file in your /etc dir to what it was before you "adjusted" it... And you should take a look in ~/.gnome2/session if I am not mistaken you wil find you renamed session there.

I hope this somehow helps you, if not, perhaps you can state the problem a bit more clearly or send the defective session file.

With regards,
Marcel
 
Old 01-13-2004, 12:36 AM   #3
Ac. K.
LQ Newbie
 
Registered: Jan 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
I think you have mixed two thing up .... The sessions you can configure in the Gnome GUI are different from the ones you modified in your /etc directory...
I'm not sure I have. See, I thought I'd first configure the session in GNOME and then add a new GNOME session choice to the log-in screen Sessions menu, with the "--choose-session=MyNewSession" (or something like that) switch.

Quote:
You should return the file in your /etc dir to what it was before you "adjusted" it...
I can't recall adjusting anything else than the test.desktop that I copied from gnome.desktop in /etc/X11/dm/Sessions.. And that file I of course deleted as soon as I figured it wouldn't work.

Quote:
And you should take a look in ~/.gnome2/session if I am not mistaken you wil find you renamed session there.
Actually I didn't mind losing the saved session, so I made myself a new user account, but the "error" of getting a .xsession-errors persists.

Quote:
I hope this somehow helps you, if not, perhaps you can state the problem a bit more clearly or send the defective session file.
I shouldn't have any defective files in my home directory, as all the files there were created by Fedora on the creation and first use of the new account. So if there's something wrong, it must be in /etc.. But where? I would imagine something in X11 or Gnome (must try going to KDE instead) is setting the "problems" flag or whatever that controls the creation of the .xsession-errors on.

How do I figure out if there's a real problem or not without an error message? Also, I like to check if the file's there whenever an application starts behaving strangely, but now I have to check the file's contents too to see if there's actually anything of interest there.

Last edited by Ac. K.; 01-13-2004 at 12:37 AM.
 
Old 01-13-2004, 02:45 AM   #4
Hertattack
LQ Newbie
 
Registered: Jan 2004
Location: Netherlands
Distribution: Gentoo 1.4
Posts: 26

Rep: Reputation: 15
The lines in your .xsession-errors comes from the file /etc/X11/gdm/PreSession/Default which appears to be OK, it is merely debugging information.

This snippet is from from the Default file. You can also find some info in man xdm.
----- 8< -------
if command -v sessreg > /dev/null 2>&1; then
# some output for easy debugging
echo "$0: Registering your session with wtmp and utmp"
echo "$0: running: sessreg -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER"

exec sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
# this is not reached
fi
----- 8< -------

However you still have only one session to choose from... I do believe that adding a file to the /etx/X11/Sessions will enable you to choose a different session.

I have copied a file in that dir to another name and it appeared in the list with sessions to choose from.

I don't know if you know this, but you must first type in your username and give <enter> if necessary before you choose the session you want. If you first choose a session an then you type in your username, the previous session will be used.

I hope this will help you a little further,

Marcel
 
Old 01-13-2004, 03:42 AM   #5
Ac. K.
LQ Newbie
 
Registered: Jan 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
The lines in your .xsession-errors comes from the file /etc/X11/gdm/PreSession/Default which appears to be OK, it is merely debugging information.
Of this I was already aware, sorry about forgetting to mention that..

I already tried commenting out the echoes there, but the SESSION_MANAGER line still gets written to the file, so it's not the PreSession script that's creating the file in the first place.. Must be something before it, or then the thing that assigns the session manager. I tried grepping for it in /etc with no luck ... What is this ICE thing about anyway?

Quote:
I don't know if you know this, but you must first type in your username and give <enter> if necessary before you choose the session you want. If you first choose a session an then you type in your username, the previous session will be used.
Hmm, do you mean the GNOME/KDE/Failsafe sessions or the saved sessions? I can go to KDE by choosing it from the Sessions menu and after that writing my username and password.

I'd still like to lose the strange .xsession-errors before trying anything new out with the saved session selection.

-ack-
 
Old 01-13-2004, 03:58 AM   #6
Ac. K.
LQ Newbie
 
Registered: Jan 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, scratch that about the SESSION_MANAGER: when choosing KDE in the Sessions menu I still get the .xsession-errors file, but with totally different, apparently normal KDE debugging messages. So it really must be something before GNOME and KDE ... I'm just not intimately familiar with how all these things play together. Any suggestions on where to go looking next?

-ack-
 
Old 01-13-2004, 04:31 AM   #7
Hertattack
LQ Newbie
 
Registered: Jan 2004
Location: Netherlands
Distribution: Gentoo 1.4
Posts: 26

Rep: Reputation: 15
Perhaps this link will help you:

http://www.tldp.org/HOWTO/XWindow-User-HOWTO/index.html
 
Old 01-15-2004, 02:01 AM   #8
Ac. K.
LQ Newbie
 
Registered: Jan 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Realizing I had already put more effort into trying to figure out what was causing the problem than a re-installation would actually take, I finally took out the CDs and went for another try.. Only to find out that even after formatting the partition the "error" remains. So I guess it's a feature and not a configuration problem after all.

If someone with a freshly installed Fedora Core is reading this, I would appreciate it if you took a looksie in your home directory to see if .xsession-errors is actually created for no reason on your installation too every time a desktop environment is started (or maybe it's the window manager? ... guess I should try installing something else than Metacity as well).

On another note, I got the session switching working with a .desktop file in the /etc/dm/Sessions directory that has the Exec variable set to a symbolic link in my home directory that points to a sh script with sed feeding just the link name to 'gnome-session --choose-session='. I wonder if this is the simplest solution, but on the other hand it requires no editing of system files, just the addition of .desktop files for each session that needs to be choosable, and I suppose there would be no other way to get them into the menu.

Thanks for all the thoughts and the link, Marcel! I bookmarked it for a later read, I'll still have to see about getting rid of the useless error file and understanding what happens between gdm, xdm and Gnome on session start first seems like the way to go. But for now I'm going to stick to something a bit simpler and more suitable for a newbie such as myself.

-ack-
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
~/.xsession-errors Phiebie Debian 2 12-21-2004 09:00 AM
.xsession-errors caphead Debian 5 10-11-2004 07:52 AM
insight into .xsession-errors kodon Slackware 4 08-29-2004 04:29 AM
xsession errors DB Troll Linux - General 0 07-15-2003 11:09 PM
.xsession-errors egh128 Linux - General 3 05-31-2002 11:37 PM


All times are GMT -5. The time now is 12:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration