FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-29-2012, 06:50 AM
Chris Bannister
 
Default .xinitrc doesn't work, .xsessionrc does! (was ... startx vs. xdm)

On Sat, Jul 28, 2012 at 10:52:58AM -0600, Javier Vasquez wrote:
> On Sat, Jul 28, 2012 at 9:52 AM, Chris Bannister
> > I use startx, and only have an .xsessionrc file. I know it is read
> > because of the xterm settings.
>
> Resources, whether for xterm, urxvt, or similar, usually are not
> configured into .xinitrc, neither .xsession (I never used
> .xsessionrc). Instead they are specified in .Xresources and
> .Xdefaults. However it might be you "xrdb" them from .xsessionrc,
> though .Xdefaults the old days was supposed to beloaded automatically
> without being loaded through xrdb.
>
> Now, to make both startx and xdm (and other DMs using .xsession) what
> is required is to have .xinitrc with execute permissions (.xsession
> requires them for for several DMs if I recall correctly since it gets
> executed), and then create a link from .xinitrc to .xsession.

If I don't call it .xsessionrc, startx doesn't work, it just dumps me
back to the tty with:

X.Org X Server 1.12.1.902 (1.12.2 RC 2)
Release Date: 2012-05-19
[snip other]
xinit: connection to X server lost

The screen doesn't even flicker.

I am using fvwm, no DM at all.

I have tried, .xinitrc, .xsession, with and without execute permission,
all give above message¹: "xinit: connection to X server lost"

I don't have either an ".Xdefaults" or a ".Xresources" file.

.xsessionrc works whether it is executable or not

¹ I also get that message when I quit fvwm. The point is, X doesn't even
start in this case.

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120729065031.GC1884@tal
 
Old 07-29-2012, 05:14 PM
Javier Vasquez
 
Default .xinitrc doesn't work, .xsessionrc does! (was ... startx vs. xdm)

On Sun, Jul 29, 2012 at 12:50 AM, Chris Bannister
<cbannister@slingshot.co.nz> wrote:
> On Sat, Jul 28, 2012 at 10:52:58AM -0600, Javier Vasquez wrote:
>> On Sat, Jul 28, 2012 at 9:52 AM, Chris Bannister
>> > I use startx, and only have an .xsessionrc file. I know it is read
>> > because of the xterm settings.
>>
>> Resources, whether for xterm, urxvt, or similar, usually are not
>> configured into .xinitrc, neither .xsession (I never used
>> .xsessionrc). Instead they are specified in .Xresources and
>> .Xdefaults. However it might be you "xrdb" them from .xsessionrc,
>> though .Xdefaults the old days was supposed to beloaded automatically
>> without being loaded through xrdb.
>>
>> Now, to make both startx and xdm (and other DMs using .xsession) what
>> is required is to have .xinitrc with execute permissions (.xsession
>> requires them for for several DMs if I recall correctly since it gets
>> executed), and then create a link from .xinitrc to .xsession.
>
> If I don't call it .xsessionrc, startx doesn't work, it just dumps me
> back to the tty with:
>
> X.Org X Server 1.12.1.902 (1.12.2 RC 2)
> Release Date: 2012-05-19
> [snip other]
> xinit: connection to X server lost
>
> The screen doesn't even flicker.
>
> I am using fvwm, no DM at all.
>
> I have tried, .xinitrc, .xsession, with and without execute permission,
> all give above messageน: "xinit: connection to X server lost"
>
> I don't have either an ".Xdefaults" or a ".Xresources" file.
>
> .xsessionrc works whether it is executable or not
>
> น I also get that message when I quit fvwm. The point is, X doesn't even
> start in this case.

Have you tried not having your .xssesionrc at all? Does it provide
the same result to you as with .xsessionrc?

I've been using .xinitrc and .xsession with plain fluxbox (no DE), to
work with plain startx or xdm (other DMs as well such as slim and
wdm), and I have had no problems for around 10 years (well I no longer
use slim neither wdm now a days)... For setting resources I use
.Xresources and .Xdefaults.

Any ways if you look at the startx man page, you'll see at the bottom
the configuration files. It only talks about .xinitrc, and .xserverrc
(not .xsessionrc), and I would not play around with .xserverrc, the
one in /etc works just fine. There's even an example in the example
section there where they call twm. The last thing to call is the
WM... If the call for the WM is not there, then Xorg will just start
and then terminate. But if the WM is called, and Xorg starts and
crashes, then you need to look at the Xorg errors...

If you look at the xdm man page, you'll notice as well in the overview
section, that ~/.xsession needs to be executable, and it's what the
xdm Xsession calls... There's even an example in there where they
call twm as the WM... If there's no WM, and you're not using a DE,
then Xorg will start and die. Same thing with startx.

Now, this is the reason I recommended, to reduce maintaining several
initialization files, just provide execute permissions for .xinitrc,
and then make a link from it to .xsession. Make sure you call the WM
as the last thing on .xinitrc, "exec startfluxbox" for example, and
don't worry about .Xresources and .Xdefaults yet. BTW, startx does
not use .xession at all...

Can you provide the .xinitrc you're trying for your startx attempts?
As a fallback, before calling your WM, you can also call xterm, or
some other term, to keep Xorg up while the term is up... If that
works, then it might be something is wrong when calling the WM...

--
Javier.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CALUrRGdVNhYonLPSpg-xQ+16kNq4Yija3b1xWcFf5nsEhZjT9A@mail.gmail.com">ht tp://lists.debian.org/CALUrRGdVNhYonLPSpg-xQ+16kNq4Yija3b1xWcFf5nsEhZjT9A@mail.gmail.com
 
Old 07-29-2012, 05:34 PM
Javier Vasquez
 
Default .xinitrc doesn't work, .xsessionrc does! (was ... startx vs. xdm)

On Sun, Jul 29, 2012 at 11:14 AM, Javier Vasquez
<j.e.vasquez.v@gmail.com> wrote:
> On Sun, Jul 29, 2012 at 12:50 AM, Chris Bannister
> <cbannister@slingshot.co.nz> wrote:
>> On Sat, Jul 28, 2012 at 10:52:58AM -0600, Javier Vasquez wrote:
>>> On Sat, Jul 28, 2012 at 9:52 AM, Chris Bannister
>>> > I use startx, and only have an .xsessionrc file. I know it is read
>>> > because of the xterm settings.
>>>
>>> Resources, whether for xterm, urxvt, or similar, usually are not
>>> configured into .xinitrc, neither .xsession (I never used
>>> .xsessionrc). Instead they are specified in .Xresources and
>>> .Xdefaults. However it might be you "xrdb" them from .xsessionrc,
>>> though .Xdefaults the old days was supposed to beloaded automatically
>>> without being loaded through xrdb.
>>>
>>> Now, to make both startx and xdm (and other DMs using .xsession) what
>>> is required is to have .xinitrc with execute permissions (.xsession
>>> requires them for for several DMs if I recall correctly since it gets
>>> executed), and then create a link from .xinitrc to .xsession.
>>
>> If I don't call it .xsessionrc, startx doesn't work, it just dumps me
>> back to the tty with:
>>
>> X.Org X Server 1.12.1.902 (1.12.2 RC 2)
>> Release Date: 2012-05-19
>> [snip other]
>> xinit: connection to X server lost
>>
>> The screen doesn't even flicker.
>>
>> I am using fvwm, no DM at all.
>>
>> I have tried, .xinitrc, .xsession, with and without execute permission,
>> all give above messageน: "xinit: connection to X server lost"
>>
>> I don't have either an ".Xdefaults" or a ".Xresources" file.
>>
>> .xsessionrc works whether it is executable or not
>>
>> น I also get that message when I quit fvwm. The point is, X doesn't even
>> start in this case.
>
> Have you tried not having your .xssesionrc at all? Does it provide
> the same result to you as with .xsessionrc?
>
> I've been using .xinitrc and .xsession with plain fluxbox (no DE), to
> work with plain startx or xdm (other DMs as well such as slim and
> wdm), and I have had no problems for around 10 years (well I no longer
> use slim neither wdm now a days)... For setting resources I use
> .Xresources and .Xdefaults.
>
> Any ways if you look at the startx man page, you'll see at the bottom
> the configuration files. It only talks about .xinitrc, and .xserverrc
> (not .xsessionrc), and I would not play around with .xserverrc, the
> one in /etc works just fine. There's even an example in the example
> section there where they call twm. The last thing to call is the
> WM... If the call for the WM is not there, then Xorg will just start
> and then terminate. But if the WM is called, and Xorg starts and
> crashes, then you need to look at the Xorg errors...
>
> If you look at the xdm man page, you'll notice as well in the overview
> section, that ~/.xsession needs to be executable, and it's what the
> xdm Xsession calls... There's even an example in there where they
> call twm as the WM... If there's no WM, and you're not using a DE,
> then Xorg will start and die. Same thing with startx.
>
> Now, this is the reason I recommended, to reduce maintaining several
> initialization files, just provide execute permissions for .xinitrc,
> and then make a link from it to .xsession. Make sure you call the WM
> as the last thing on .xinitrc, "exec startfluxbox" for example, and
> don't worry about .Xresources and .Xdefaults yet. BTW, startx does
> not use .xession at all...
>
> Can you provide the .xinitrc you're trying for your startx attempts?
> As a fallback, before calling your WM, you can also call xterm, or
> some other term, to keep Xorg up while the term is up... If that
> works, then it might be something is wrong when calling the WM...
>
> --
> Javier.

Hmm, just in case, as I don't see the example section in the debian
man page, though I see it in the startx arch man page, I'm copying the
.xinitrc example from the man page here:

**************
EXAMPLE
Below is a sample .xinitrc that starts several applications
and leaves the window manager running as the 'last' application.
Assuming that the
window manager has been configured properly, the user then
chooses the 'Exit' menu item to shut down X.

xrdb -load $HOME/.Xresources
xsetroot -solid gray &
xbiff -geometry -430+5 &
oclock -geometry 75x75-0-0 &
xload -geometry -80-0 &
xterm -geometry +0+60 -ls &
xterm -geometry +0-100 &
xconsole -geometry -0+0 -fn 5x7 &
exec twm
**************

And I don't even see the xdm man page in debian, so here I copy the
example from the man page :

**************
The user's .xsession file might look something like this
example. Don't forget that the file must have execute permission.
#! /bin/csh
# no -f in the previous line so .cshrc gets run to set $PATH
twm &
xrdb -merge "$HOME/.Xresources"
emacs -geometry +0+50 &
xbiff -geometry -430+5 &
xterm -geometry -0+50 -ls
**************

However I have my setting in both arch and debian boxes (before I even
only used debian)...

--
Javier.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CALUrRGf37ho_GaNO9ZRpTy-x-ni_OVOjfj_2=Sm0Rv=Uud1_8g@mail.gmail.com
 
Old 07-31-2012, 06:56 PM
Chris Bannister
 
Default .xinitrc doesn't work, .xsessionrc does! (was ... startx vs. xdm)

On Sun, Jul 29, 2012 at 11:14:54AM -0600, Javier Vasquez wrote:
> Have you tried not having your .xssesionrc at all? Does it provide
> the same result to you as with .xsessionrc?

Yes, except for:

---------8< ---- .xsessionrc ---------8< ----
/home/chrisb/background.sh &

xterm -fn 10x20 -xrm "XTerm.vt100.background: #CCA8AA" -xrm
"XTerm.vt100.foreground: blue" -geom 120x15 &

---------8< ---- .xsessionrc ---------8< ----

---------8< ---- background.sh ---------8< ----

feh --bg-max /home/chrisb/images/logo.gif

---------8< ---- background.sh ---------8< ----

IOW, it reads .xsessionrc If I call it .xsession/.xinitrc it doesn't work,
probably cause I haven't got the "exec fvwm &" cantation at the end of the
.xsessionrc file.

Starting fvwm is handled via the alternatives system:

t@tal:~# update-alternatives --display x-window-manager
x-window-manager - auto mode
link currently points to /usr/bin/fvwm2
/usr/bin/fvwm2 - priority 50
slave x-window-manager.1.gz: /usr/share/man/man1/fvwm2.1.gz
Current 'best' version is '/usr/bin/fvwm2'.

> I've been using .xinitrc and .xsession with plain fluxbox (no DE), to
> work with plain startx or xdm (other DMs as well such as slim and
> wdm), and I have had no problems for around 10 years (well I no longer
> use slim neither wdm now a days)... For setting resources I use
> .Xresources and .Xdefaults.

What does: "update-alternatives --display x-window-manager" display for
you?

> Any ways if you look at the startx man page, you'll see at the bottom
> the configuration files. It only talks about .xinitrc, and .xserverrc
> (not .xsessionrc), and I would not play around with .xserverrc, the

I read about .xsessionrc somewhere, can't remember where, cause I was
having trouble on an upgrade. Not sure if it was etch -> lenny,
or lenny -> squeeze

> Now, this is the reason I recommended, to reduce maintaining several
> initialization files, just provide execute permissions for .xinitrc,
> and then make a link from it to .xsession. Make sure you call the WM

Already now you have two initialization files.
I could get away with none (no .xinitrc, no .xsession, no .xsessionrc)
but then I'd have to put all configuration in the "~/.fvwm/config" file.

Although the default setup is quite good. That is, if you don't have a
"~/.fvwm/config" file.

> BTW, startx does not use .xession at all...

Right.

> Can you provide the .xinitrc you're trying for your startx attempts?

See above explanation.

> As a fallback, before calling your WM, you can also call xterm, or
> some other term, to keep Xorg up while the term is up... If that
> works, then it might be something is wrong when calling the WM...

JTFR, there *IS* no problem. This may be because I'm using fvwm which is
hooked into the alternatives system *AND* has a working default.

IOW, if I try some other WM, I could very well need an .xinitrc with
some "exec <WM - here> &" cantation, BUT it looks like it is handled
by the alternatives system. Using .xinitrc could be defunct, but no one
has told us. :-)

Maybe, if you use .Xresources and/or .Xdefaults you need an .xinitrc.

P.S. Possibly this "exec fvwm &" cantation not working was the cause
of my search, leading to the use of an .xsessionrc -- but It was a long
time ago now and my memory is a bit hazy on the details.

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120731185651.GA25954@tal
 
Old 07-31-2012, 08:35 PM
Javier Vasquez
 
Default .xinitrc doesn't work, .xsessionrc does! (was ... startx vs. xdm)

On Tue, Jul 31, 2012 at 12:56 PM, Chris Bannister
<cbannister@slingshot.co.nz> wrote:
> On Sun, Jul 29, 2012 at 11:14:54AM -0600, Javier Vasquez wrote:
>> Have you tried not having your .xssesionrc at all? Does it provide
>> the same result to you as with .xsessionrc?
>
> Yes, except for:
>
> ...
>
> IOW, it reads .xsessionrc If I call it .xsession/.xinitrc it doesn't work,
> probably cause I haven't got the "exec fvwm &" cantation at the end of the
> .xsessionrc file.
>
> Starting fvwm is handled via the alternatives system:
>
> t@tal:~# update-alternatives --display x-window-manager
> x-window-manager - auto mode
> link currently points to /usr/bin/fvwm2
> /usr/bin/fvwm2 - priority 50
> slave x-window-manager.1.gz: /usr/share/man/man1/fvwm2.1.gz
> Current 'best' version is '/usr/bin/fvwm2'.

Hmm, to me it doesn't matter, I call the WM from withing .xinitrc, as
the last thing to call:

% tail -1 ~/.xinitrc
exec startfluxbox

>
>> I've been using .xinitrc and .xsession with plain fluxbox (no DE), to
>> work with plain startx or xdm (other DMs as well such as slim and
>> wdm), and I have had no problems for around 10 years (well I no longer
>> use slim neither wdm now a days)... For setting resources I use
>> .Xresources and .Xdefaults.
>
> What does: "update-alternatives --display x-window-manager" display for
> you?

Ups, again, it doesn't matter to me. But as I only have fluxbox
installed, then that's what I expect to show up. Any ways the output
on the debian boxes is:

% update-alternatives --display x-window-manager
x-window-manager - auto mode
link currently points to /usr/bin/startfluxbox
/usr/bin/startfluxbox - priority 50
slave x-window-manager.1.gz: /usr/share/man/man1/fluxbox.1.gz
Current 'best' version is '/usr/bin/startfluxbox'.

>
>> Any ways if you look at the startx man page, you'll see at the bottom
>> the configuration files. It only talks about .xinitrc, and .xserverrc
>> (not .xsessionrc), and I would not play around with .xserverrc, the
>
> I read about .xsessionrc somewhere, can't remember where, cause I was
> having trouble on an upgrade. Not sure if it was etch -> lenny,
> or lenny -> squeeze
>
>> Now, this is the reason I recommended, to reduce maintaining several
>> initialization files, just provide execute permissions for .xinitrc,
>> and then make a link from it to .xsession. Make sure you call the WM
>
> Already now you have two initialization files.
> I could get away with none (no .xinitrc, no .xsession, no .xsessionrc)
> but then I'd have to put all configuration in the "~/.fvwm/config" file.

:-) As you wish. BTW, .Xresources is not a initialization script,
its purpose is to specify the X applications resources, for example
the ones I have for xautolock and xlockmore:

% 'grep' 'X.*ock' ~/.Xresources
Xautolock.locker: xlock
Xautolock.time: 5
XLock.mode: blank
XLock.lockdelay: 0
XLock.timeout: 25
XLock.background: black
XLock.foreground: red
XLock.mousemotion: on

This is pretty independent upon the WM, so I prefer to set this in
.Xresources, than any other way... I've played around with fvwm2,
blackbox, and other WMs, and the .Xresources remains invariant for all
of them, :-)

>
> Although the default setup is quite good. That is, if you don't have a
> "~/.fvwm/config" file.
>
>> BTW, startx does not use .xession at all...
>
> Right.
>
>> Can you provide the .xinitrc you're trying for your startx attempts?
>
> See above explanation.
>
>> As a fallback, before calling your WM, you can also call xterm, or
>> some other term, to keep Xorg up while the term is up... If that
>> works, then it might be something is wrong when calling the WM...
>
> JTFR, there *IS* no problem. This may be because I'm using fvwm which is
> hooked into the alternatives system *AND* has a working default.
>
> IOW, if I try some other WM, I could very well need an .xinitrc with
> some "exec <WM - here> &" cantation, BUT it looks like it is handled
> by the alternatives system. Using .xinitrc could be defunct, but no one
> has told us. :-)

Nope, .xinitrc works just fine. You need to call the WM from there,
that's it. It's been working for years, and keeps working today.

Actually it works on other distros the same way it does for debian,
:-) That's the part of its beauty... I use it on debian and arch,
and I have also used it on sourceMage essentially without variations.

XDM also works the same way with .xsession on all distros I've tried.

So nothing of this has been deprecated yet.

>
> Maybe, if you use .Xresources and/or .Xdefaults you need an .xinitrc.

Nope. They are not initialization scripts. startx automatically
reads .Xresources and I don't recall if XDM calls .Xdefaults. At any
rate, your init scripts can run "xrdb" to use such resources
specifications. They are meant to specify resources for X
applications, like terminals fonts and shading, but they don't execute
a single thing.

>
> P.S. Possibly this "exec fvwm &" cantation not working was the cause
> of my search, leading to the use of an .xsessionrc -- but It was a long
> time ago now and my memory is a bit hazy on the details.

Yeap. I've never used .xsessionrc at all... To me .xinitrc has
always worked with startx and .xsession has always worked with XDM,
and to simplify things I make links...

--
Javier.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CALUrRGfsaSkjVC=bKGMVDJwepHgxc=B3EHsZFFiHt6zNLGgGh g@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 06:54 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org