LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-04-2006, 03:09 AM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
.xinitrc and .xsession not executing with GDM under Xorg


I have a very simple question, the answer of which I don;t know.

I have to give the following command:

xset s off

which will bascially disable the blank screen which appears after every 10 mins.

Now to make the changes permanent, it was suggested that I put this command in .xsession or .xinitrc and make them executable.

I did that but for some reasons none of the files get executed when I boot into GNOME. Also I tried giving test commands like

date > /tmp/date.txt

but even those are nbt executed.

I am using Debian testing with Xorg and GDM as login manager.
 
Old 02-04-2006, 07:24 AM   #2
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
~/.xinitrc is the config file for starting X with "startx" command from the command line.

~/.xsession is the config file for xdm, although also kdm and gdm should read it if you choose the "default session".
 
Old 02-04-2006, 01:22 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Dead Parrot
~/.xinitrc is the config file for starting X with "startx" command from the command line.

~/.xsession is the config file for xdm, although also kdm and gdm should read it if you choose the "default session".
Thanks for reply. From where do I choose the default session?

Also is there any file where we can put commands that we want to execute every time the system boots?
 
Old 02-04-2006, 05:26 PM   #4
macondo
Senior Member
 
Registered: Jul 2003
Posts: 1,016

Rep: Reputation: 52
Here's my ~/.xsession:

#!/bin/sh

xscreensaver &
exec icewm

Hmm, but i use no gdm, just 'startx'.

Last edited by macondo; 02-04-2006 at 05:30 PM.
 
Old 02-05-2006, 03:37 AM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
That;s what. Dead Parrot mentioned something about Default Session if we want GDM to read the .xsession and .xinitrc. But how? I don;t know.

any inputs will be greatly appreciated.

Thanks
 
Old 02-05-2006, 05:29 AM   #6
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
From where do I choose the default session?
Gdm has a "session menu" that lists all the available X sessions. If you view this session menu, one of the entries should be named "Default session" (or something like that) and choosing it should make gdm to read your ~/.xsession file.

In case this doesn't work, you can "su" to root and create a new file called /etc/X11/Xsession.d/startup, and then write the "xset -dpms s off &" line into this file.
 
Old 02-06-2006, 04:27 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Dead Parrot
Gdm has a "session menu" that lists all the available X sessions. If you view this session menu, one of the entries should be named "Default session" (or something like that) and choosing it should make gdm to read your ~/.xsession file.
I tried the above method but it did not work. I selected "Default Session" from the GDM login screen and created the file .xsession with the line 'xset -dpms s off &'. When I tried to login it says "Your last session lasted for less than 10 seconds. Please see the file .xsession-errors and it logs me out. This happens only when I select the Default Session.

The contents of .xsession-error file are as follow:

Code:
/etc/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/gdm/PreSession/Default: running: /usr/X11R6/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/lib/gdm/:0.Xservers" -h "" -l ":0" "root"
/etc/gdm/Xsession: Beginning session setup...
SESSION_MANAGER=local/debian:/tmp/.ICE-unix/3728
Gnome-Message: gnome_execute_async_with_env_fds: returning -1
Gnome-Message: gnome_execute_async_with_env_fds: returning -1
Gnome-Message: gnome_execute_async_with_env_fds: returning -1
I do not see anything strange in there. Is there?


Quote:
In case this doesn't work, you can "su" to root and create a new file called /etc/X11/Xsession.d/startup, and then write the "xset -dpms s off &" line into this file.
I even created the file startup and added the line xset -dpms s off & but nothing happened.

How do I make this command(xset s off) run everytime I log into my Gnome Sessiom.???

Anyone?

Thanks
 
Old 02-06-2006, 05:37 PM   #8
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
I tried the above method but it did not work. I selected "Default Session" from the GDM login screen and created the file .xsession with the line 'xset -dpms s off &'. When I tried to login it says "Your last session lasted for less than 10 seconds. Please see the file .xsession-errors and it logs me out. This happens only when I select the Default Session.
So, does your .xsession file look like this?
Code:
xset -dpms s off &
exec gnome-session
Quote:
I even created the file startup and added the line xset -dpms s off & but nothing happened.
Do you mean the screen went blank after 10 minutes just like before? And "xset q" doesn't show any change from default values? Or do you mean "nothing happened = the screen didn't go blank after 10 minutes"?
 
Old 02-06-2006, 05:48 PM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
[QUOTE=Dead Parrot]So, does your .xsession file look like this?
Code:
xset -dpms s off &
exec gnome-session
No, my .xsession file looks like this:
Code:
xset -dpms s off &
do I have to add the line exec gnome-session?? I thought GDM will automatically start GNOME. Actually, I am really confused about how the startup scripts are called and in what order. Any insight on this topic will be useful.

Quote:
Originally Posted by Dead Parrot
Do you mean the screen went blank after 10 minutes just like before? And "xset q" doesn't show any change from default values? Or do you mean "nothing happened = the screen didn't go blank after 10 minutes"?
Yes there was no change in the settings. The screen went blank after 10 mins because the timeout period was still set to 600 seconds when you give the command
xset q.
 
Old 02-06-2006, 06:12 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Ok, I added the line
exec gnome-session

and it worked.

Thank you so much deadparrot. I would really appreciate it if you can give some insight as to how does the startx gets called and why we have to add exec gnome-session when we choose Default Session from GDM.

Thank you once again.
 
Old 02-06-2006, 06:42 PM   #11
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
I would really appreciate it if you can give some insight as to how does the startx gets called and why we have to add exec gnome-session when we choose Default Session from GDM.
The X Window System is quite complex and there's no easy way to tell what you need to know about it. You'll probably pick up all the important bits along the way when you run into troubles and ask for advice.

You can type "man startx", "man gdm", "man Xsession" and "man X" in a terminal window to get some preliminary introduction to the topic. (You can browse man pages by pressing the space bar and you can quit a man page by pressing "q".) And you can view the "Debian X Window System Frequently Asked Questions": http://necrotic.deadbeast.net/svn/xf...ocal/FAQ.xhtml
 
Old 02-07-2006, 12:09 PM   #12
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Thanks a lot. Yes i agree it is quite complex since there are so many scripts that gets invoked by different program and on top of it we have GDM,XDM,KDM and GNOME,KDE which have specific requirements. I wish there was a guide which would explain all the procedure wrt these components.

till then I think I shud more.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.xinitrc and .xsession ignored Whitman Debian 2 09-18-2005 12:11 PM
.xinitrc vs. .Xdefaults vs .Xsession frankie_DJ Linux - Newbie 4 08-02-2005 05:39 AM
.Xsession .xinitrc a10392 Linux - Newbie 2 12-10-2004 02:34 PM
.xinitrc/.xsession - Where are they? Fluxbox the_rydster Slackware 3 03-07-2004 01:45 PM
No .Xdefaults, .xsession, .xinitrc madchmst82 Linux - Newbie 3 09-23-2003 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:30 PM.

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