[Mageia-dev] Deprecating startx

Colin Guthrie mageia at colin.guthr.ie
Wed Mar 7 15:49:04 CET 2012


'Twas brillig, and Shlomi Fish at 07/03/12 14:09 did gyre and gimble:
> Hello Colin,
> 
> On Wed, 07 Mar 2012 11:15:29 +0000
> Colin Guthrie <mageia at colin.guthr.ie> wrote:
> 
>> 'Twas brillig, and Wolfgang Bornath at 07/03/12 10:13 did gyre and gimble:
>>> 2012/3/7 Guillaume Rousse <guillomovitch at gmail.com>:
>>>> Le 07/03/2012 10:26, Colin Guthrie a écrit :
>>>>>
>>>>> Hi,
>>>>>
>>>>> Unless someone comes along and does a reasonable amount of coding before
>>>>> mga2, I think we'll have to deprecate supporting startx (it can still be
>>>>> used in some circumstances, but audio and accelerated graphics will not
>>>>> be available).
>>>>>
>>>>> See this comment (and the link therein) for more info on the issue:
>>>>> https://bugs.mageia.org/show_bug.cgi?id=4652#c9
>>>>
>>>> What is the operational translation of 'deprecating support of foo' ?
>>>> automatic answer "no support" to any user reporting issue with it ? removing
>>>> it from the distribution ?
>>>>
>>>> While I don't care about the first one, I do care about the second
>>>> interpretation. Given the very high fragility of the gnome environment
>>>> nowadays, using old-days tools to workaround those various issues is
>>>> frequently useful.
>>>
>>> Different from Guillaume I do care about the impact for the user.
>>> There are many out there who are used to startx and also docs and
>>> howtos which use it. Therefore we will need an explanation for
>>> switching off startx.  An explanation to be used in forums, which is a
>>> bit more than just a link to a bug report. In other words: to be
>>> understood by non-techie users.
>>
>> To answer Guillaume's question, I wasn't personally planning on removing
>> it fully. Just documenting that it is broken and that users should not
>> use this as a mechanism for starting X.
>>
>> I would propose just putting in "echo 'startx is deprecated. Here is
>> why.....   Press any key to continue anyway.' >&2; read -n 1" in the
>> startx script such that users using it will be warned. Does this seem
>> sensible?
> 
> Having to press this every time will drive me nuts. If you are going to do it,
> please also use an optional environment variable to trigger it off.

Env var or a switch to pass to it (and you could then put alias
startx='startx --no-session-warning' or similar in your bashrc? Thinking
about this, it might make more sense to warn the user AFTER they have
logged in... e.g. via zenity or knotify or similar. But again with the
option to hide it still)

> Luckily for me (and for Mageia) I am a programmer and can write the required
> code to make startx play nice with the rest of systemd again. I'll read the URL
> of the bug and see what is needed and hopefully with some guidance from the
> people on Freenode, will make it work. If anyone wants to help, I'm "rindolf"
> there and I'm also reachable by other forms of IM and by other means:

It would be nice if you wanted to take on this project. Basically you'd
be writing a DM (like gdm) which is able to talk to PAM and do all those
things needed for proper session management. Of course your DM would be
very much cut down - i.e. it would not actually have any UI, but just
implement and autologin system.

I'd imagine how it would work is that your program would be installed as
setuid, thus regular users can run it, it can find the username who run
it and store that, then call the necessary commands to gain root
privileges, do the whole pam conversation and then login the user. This
will require a specific PAM config (e.g. /etc/pam.d/startx) to allow
passwordless authentication for your user.

This is just a very rough overview of what would be needed.

Good luck :)

Col





-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list