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 > Gentoo > Gentoo Desktop

 
 
LinkBack Thread Tools
 
Old 10-25-2010, 08:30 PM
Michał Górny
 
Default DM info variants for the new xdm init.d script

Hello,

I think we already agreed that xdm init.d script is currently too
complex and not flexible enough, and it needs redesign. First, I'd like
to discuss on how should we handle different display managers.

I have the following ideas:


1) 'profile' files installed by DMs
-----------------------------------

This is the most flexible yet heaviest of the possible solutions. It
assumes that we set up some kind of 'session' directory in which
various DMs install a single file describing how to launch them, and
the XDM script tries to match one of these files and use them to set
the DM up.

For example, xdm would install a file like:

# /usr/share/gentoo/dms/xdm
exe=/usr/bin/xdm
pidfile=/var/run/xdm.pid

This is very close to what we do now. It still requires a lot of
customization for non-typical DMs (like lxde).

On the other hand, this way we could grab 'any installed DM' easily
without requiring user to specify it in DISPLAYMANAGER.


2) separate init.d scripts
--------------------------

This one is even heavier but more clean. This way, we only keep
a minimal subset of DM-related code in common, and let every DM install
its own init.d script. This way, we keep them clean and flexible.

On the other hand, that would introduce a lot of repeating code,
and user would need to explicitly add appropriate DM to the runlevel.


3) fixing DMs and a lot of guessing
-----------------------------------

Many DMs resemble a common concept of executable name and pidfile. If
we limited the amount of DISPLAYMANAGER possibilities, we could use
an approach like:

EXE=$(which ${MY_XDM})
PIDFILE=/var/run/${MY_XDM}.pid

But that won't work with all current DMs, so we'll probably end up with
a thing similar to what we do now...


Maybe someone else has a better idea on how to handle it?

--
Best regards,
Michał Górny
 
Old 10-25-2010, 10:02 PM
Duncan
 
Default DM info variants for the new xdm init.d script

Michał Górny posted on Mon, 25 Oct 2010 22:30:22 +0200 as excerpted:

> 2) separate init.d scripts
> --------------------------
>
> This one is even heavier but more clean. This way, we only keep
> a minimal subset of DM-related code in common, and let every DM install
> its own init.d script. This way, we keep them clean and flexible.
>
> On the other hand, that would introduce a lot of repeating code,
> and user would need to explicitly add appropriate DM to the runlevel.

Consider this a user vote for this one.

Perhaps put the common code in some sort of dependency (the initscripts
could source a common base), and let each ?DM install its own init-script
front-end.

That would allow users (like me) who don't use a ?DM (text login, custom
scripts that do some setup and run startx) to kill the initscripts and
associated infrastructure (in the common dependency), currently shipping
with xorg-server, for them.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
 
Old 10-26-2010, 01:54 PM
Donnie Berkholz
 
Default DM info variants for the new xdm init.d script

On 22:30 Mon 25 Oct , Michał Górny wrote:
> 1) 'profile' files installed by DMs
> -----------------------------------
>
> This is the most flexible yet heaviest of the possible solutions. It
> assumes that we set up some kind of 'session' directory in which
> various DMs install a single file describing how to launch them, and
> the XDM script tries to match one of these files and use them to set
> the DM up.
>
> For example, xdm would install a file like:
>
> # /usr/share/gentoo/dms/xdm
> exe=/usr/bin/xdm
> pidfile=/var/run/xdm.pid
>
> This is very close to what we do now. It still requires a lot of
> customization for non-typical DMs (like lxde).
>
> On the other hand, this way we could grab 'any installed DM' easily
> without requiring user to specify it in DISPLAYMANAGER.

I do like the idea of not needing to modify xdm/xinit stuff every time
there's a new DM. I also like the parallels with Xsessions
(/etc/X11/Sessions/).

> 2) separate init.d scripts
> --------------------------
>
> This one is even heavier but more clean. This way, we only keep
> a minimal subset of DM-related code in common, and let every DM install
> its own init.d script. This way, we keep them clean and flexible.
>
> On the other hand, that would introduce a lot of repeating code,
> and user would need to explicitly add appropriate DM to the runlevel.

Meh. The problems you pointed out are enough to hammer the nails into
this one's coffin.

> 3) fixing DMs and a lot of guessing
> -----------------------------------
>
> Many DMs resemble a common concept of executable name and pidfile. If
> we limited the amount of DISPLAYMANAGER possibilities, we could use
> an approach like:
>
> EXE=$(which ${MY_XDM})
> PIDFILE=/var/run/${MY_XDM}.pid
>
> But that won't work with all current DMs, so we'll probably end up with
> a thing similar to what we do now...

The guessing games will have to be done (or pre-empted) somewhere. It
makes sense to me to do it in a way that pushes work onto the DM
maintainers (who are experts in that DM).

--
Thanks,
Donnie

Donnie Berkholz
Desktop project lead
Gentoo Linux
Blog: http://dberkholz.wordpress.com
 

Thread Tools




All times are GMT. The time now is 12:08 PM.

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