:: Re: [DNG] Xorg stopped working afte…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: viverna
Fecha:  
A: dng
Asunto: Re: [DNG] Xorg stopped working after upgrade to Beowulf
il devuanizzato spiralofhope <spiralofhope@???> il 26-09-20 02:45:21 ha scritto:
>On Tue, 22 Sep 2020 20:30:53 +0200
>viverna <viverna@???> wrote:
>
>> or xinit with custom command line, for example:
>> xinit /home/user/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt2 -keeptty
>
>I had some entertainment dealing with this problem over the years.
>When I switched to Devuan I had to tinker a bit. I can't remember any
>of the details, but this is what I ended with in my zsh login script:
>
>
>
>string="$TTY"
># I don't know why this works, even though $TTY is actually /dev/pts1
>pattern='/dev/tty'
>tty_to_use=''
># I could rewrite this in POSIX sh if someone needs
>tty_to_use="${string##${pattern}}"
>tty_to_use="${string##*${pattern}}"
>
>xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :$(( tty_to_use - 1 )) \
>vt"$tty_to_use" -auth "$( \tempfile --prefix='serverauth.' )"
>
>logout

xinit parameters sometimes needs tuning.
I use my script for start X (don't use startx).
In beowulf just upgraded xinit with usual parameters (ascii works well)
don't work.
I digged inside startx script and get this:


# Automatically determine an unused $DISPLAY
d=0
while true ; do
    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break
    d=$(($d + 1))
done
defaultdisplay=":$d"
unset d



and I added this:


if tty|grep "/dev/tty[0-9]*" >/dev/null ; then
    VT="vt`tty|grep "/dev/tty[0-9]*"|sed 's/\/dev\/tty//g'`"
else
    printf "Virtual terminal not found.\n"
    return 1
fi



Passing $defaultdisplay (display number) and $VT (virtual terminal) X
start without problem.

>
>
>----
>
>
>If anyone really really wants to dig through my history of desperate
>experimentation throughout multiple Linuxes:
>
>https://github.com/spiralofhope/shell-random/commits/master/live/zsh/dot_zsh/4-login.sh

Thanks interesting.

-- 
 _________
< Viverna >
 ---------
       \                    ^    /^
        \                  / \  // \
         \   |\___/|      /   \//  .\
          \  /0  0  \__  /    //  | \ \           *----*
            /     /  \/_/    //   |  \  \          \   |
            @_^_@`/   \/_   //    |   \   \         \/\ \
            //_^_/     \/_ //     |    \    \         \  \
         ( //) |        \///      |     \     \       |  |
       ( / /)  |         //       |      \     _\     |  /
     ( // /)   |          ; -.    |    _ _\.-~       /   /
   (( / / ))   |        _      *-.|.-~-.           .~    ~
  (( // / ))    \      /                 ~-. _ .-~      /
  (( /// ))      `.   }            {                   /
   (( / ))      .----~-.\        \-`                 .~
                ///.----..<        \             _ -~
                   ///-._ _ _ _ _ _ _{^ - - - - ~