You are not logged in.

#1 2017-05-29 08:40:37

privacyrequired
Member
Registered: 2017-05-09
Posts: 12

lightdm and .xinitrc

I would like to know how to make .xinitrc work with lightdm because I can not do it.

Offline

#2 2017-05-29 09:22:57

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: lightdm and .xinitrc

What do you want to do with .xinitrc ?

Offline

#3 2017-05-29 12:05:49

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: lightdm and .xinitrc

~/.config/openbox/autostart is used to start most of the desktop programs in BunsenLabs, this file is parsed whether LightDM is used or not as long as openbox-session is set as x-session-manager in /etc/alternatives

~/.xsessionrc is used to set environmental variables and suchlike, that file is read by LightDM and most other display managers.

It is also possible to drop .desktop files in ~/.config/autostart and LightDM will honour these as per the freedesktop.org specification.

If you want to use ~/.xinitrc with LightDM then symlink that file to ~/.xsession and select "Default XSession" as the desktop in LightDM.

ln -s ~/.xinitrc ~/.xsession

Or, if you are as allergic to symlinks as I am:

echo ". ~/.xinitrc" > ~/.xsession

I've just checked my Debian jessie system and that uses a slightly more robust version:

# ~/.xsession
/bin/bash --login -i ~/.xinitrc

Offline

#4 2017-05-29 15:35:37

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: lightdm and .xinitrc

Cool stuff Hoas, thanks for some insights. Am currently embroiled in similar Nixish activities which parallel this topic myself. So of course ... Google !!!! Who's how to on autologin + startx + systemd goodness do I come across again ? Hoas's o course and it's a cool share and appreciated too.

Sheesh as long as I've been dorking with gnu/Nix such should be childs play by now. Though as usual am also trying to eat the elephant one bite at a time ... as in, IN ONE BITE. tongue

Fourteen different inter-tangled and similar topics bleeding together. Arghhhhhh! Ok shutting it folks. smile

Last edited by BLizgreat! (2017-05-29 15:37:02)

Offline

#5 2017-05-29 15:53:50

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,901

Re: lightdm and .xinitrc

BLizgreat! wrote:

Cool stuff Hoas, thanks for some insights. Am currently embroiled in similar Nixish activities which parallel this topic myself. So of course ... Google !!!! Who's how to on autologin + startx + systemd goodness do I come across again ? Hoas's o course and it's a cool share and appreciated too.

Sheesh as long as I've been dorking with gnu/Nix such should be childs play by now. Though as usual am also trying to eat the elephant one bite at a time ... as in, IN ONE BITE. tongue

Fourteen different inter-tangled and similar topics bleeding together. Arghhhhhh! Ok shutting it folks. smile

Lay off the caffeine and sugar my friend  tongue


Real Men Use Linux

Offline

#6 2017-05-29 15:56:45

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: lightdm and .xinitrc

^ Good point. smile

Though atm, isn't a realistic prospect. If someone ran the "uptime" command on me, output would be 36+hrs. Still have things to do ! If I stop drinking coffee I'm a goner. tongue

Update: Switched over to high gravity lager, that out to do it. Nappy time is fast approaching.

Last edited by BLizgreat! (2017-05-29 18:29:22)

Offline

#7 2017-05-30 03:12:45

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,666
Website

Re: lightdm and .xinitrc

.xsessionrc will be read by a LightDm-free plain 'startx' session too.

grep -r '.xsessionrc' /etc/X11

Although it's supposed to be for evvars and the like, you can use any shell commands you want, just like .config/openbox/autostart, and .config/openbox/environment for that matter. The difference of course is that the openbox files won't be run by other window managers.

.xinitrc will likely be ignored by lightdm (haven't tested) and with startx its presence in ~/ will cause all the usual Debian startup commands (see /etc/X11/Xsession.d/) to be skipped, so you have to do everything yourself. Some people might prefer that.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#8 2017-05-30 15:39:43

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: lightdm and .xinitrc

+1 John-san, if I've read up correctly, seems ~/.xsessionrc is a Debian and based specific approach to this vs .xinitrc, which supposedly requires being used along with a display manager anyway. So between what John just added and Hoas's how to here. Somebody has everything they need to auto-login and startx without the bloat of a display-manager. Yay !

Thanks Hoas and John. smile

Pointless afterthought babble:

Though believe Hoa's kickbutt tute will execute default xsession as it is. Whereas John's inclusion and use of an ~/.xsessionrc file should provide a person finer grain control over it. ie: Which gui (Desktop/windows manager)is launched kinda deal ?

From a Debian webpg on how the X startup process works ...

The Debian reference manual describes how the defaults work:

    If the user has a ~/.xsessionrc file, read it.

    If a specific session was selected in gdm3, run it.

    Otherwise, if the user has a ~/.xsession or ~/.Xsession file, run it.

    Otherwise, if the /usr/bin/x-session-manager command exists, run it.

    Otherwise, if the /usr/bin/x-window-manager command exists, run it.

    Otherwise, if the /usr/bin/x-terminal-manager command exists, run it.

No mention of .xinitrc there, though assume some display-managers could check for one and execute if found. That's just a guess and assumption.

Last edited by BLizgreat! (2017-05-30 18:01:50)

Offline

#9 2017-06-02 03:18:37

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,666
Website

Re: lightdm and .xinitrc

.xinitrc is not needed in the standard Debian boot-up. My understanding is that if it does exist, then a lot of - going on most of - those other files are ignored.

It dates from 2012, but back in #! I dived into this stuff because it was bothering me, and wrote it up. Now reposted here: https://forums.bunsenlabs.org/viewtopic.php?id=3774 If you're interested...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#10 2017-06-02 07:07:28

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: lightdm and .xinitrc

I think if ~/.xinitrc is used then Debian assumes that the user wants to specify *exactly* what starts in that file and nowhere else.

Thanks for re-posting that guide johnraff, I keep forgetting about the /etc/X11/Xsession.d quirk  :8

EDIT:

BLizgreat! wrote:

No mention of .xinitrc there, though assume some display-managers could check for one and execute if found.

No, display managers will ignore ~/.xinitrc

Last edited by Head_on_a_Stick (2017-06-02 07:09:25)

Offline

#11 2017-06-02 12:57:28

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: lightdm and .xinitrc

Thanks Hoas and already thanked John for posting some useful X/ness in another thread. big_smile

Offline

Board footer

Powered by FluxBB