I am fairly new to guix, thus bear with me please. I want to start X on my system with startx - i.e. log into my system just from a tty, and then start X by hand (and i3 will be my window manager, I just have an .xsession file in my $HOME, where I start i3) - I do not want any desktop-services / desktop-manager / graphical login manager (this may seem old school - but has worked fine for me for years under debian). I cannot really get this working though: I have xinit installed (with startx therein, cf. my config below), but when I startx on the command line, I get this: xauth: file /home/rx/.serverauth.1957 does not exist xinit: unable to run server "/gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin/X": No such file or directory Use the -- option, or make sure that /gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin is in your path and that "/gnu/store/8v0sja48lmlx5j28hs2mci2rr7v8ilm5-xinit-1.4.1/bin/X" is a program or a link to the right type of server for your display. Possible server names include: Xorg Common X server for most displays Xvfb Virtual frame buffer Xfake kdrive-based virtual frame buffer Xnest X server nested in a window on another X server Xephyr kdrive-based nested X server Xvnc X server accessed over VNC's RFB protocol Xdmx Distributed Multi-head X server xinit: giving up xinit: unable to connect to X server: Connection refused xinit: unexpected signal 2 Also, in the guix manual I find an "xorg-start-command" mentioned, but I don't know how that is supposed to be used (or if I need it at all)? - thus xorg-start-command is commented out below. Thanks in advance. -A (packages (append (map specification->package '( "xinit" "i3-wm" "python" "rsync" ;; "python-hy" ;; "" ) ) %base-packages)) (services (append (list (service openssh-service-type (openssh-configuration ;; (x11-forwarding? #t) ;; (permit-root-without-password) (permit-root-login #t) )) (service dhcp-client-service-type) (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout) )) ;; (xorg-start-command ) ) %base-services) ) ;; services
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --] On 2021-08-21, Andreas Reuleaux wrote: > I am fairly new to guix, thus bear with me please. Welcome! > I want to start X on my system with startx - i.e. log into my system > just from a tty, and then start X by hand (and i3 will be my window > manager, I just have an .xsession file in my $HOME, where I start i3) > - I do not want any desktop-services / desktop-manager / graphical login manager > (this may seem old school - but has worked fine for me for years > under debian). > > I cannot really get this working though: I have xinit installed (with > startx therein, cf. my config below), but when I > > startx > > on the command line, I get this: > > xauth: file /home/rx/.serverauth.1957 does not exist ... I struggled with this for a bit and eventually gave up. In theory, if you make enough executables setuid, you might be able to get startx to work properly (other distros such as Debian make startx work by installing various executables setuid). In the end, I switched using sway, which is very similar to i3 but uses wayland natively instead of X11 (though there are still X11 compatibility layers). The main thing is you need to have elogind configured in your system, and then you can login and run "exec sway" and it "just works". So, not exactly a direct answer to your question, but maybe it is a workable alternative for you. live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --]
OK, many thanks. fine with sway - I wanted to switch to wayland some time anyway. And I will give eglogind a try. I did see another thread - after asking my question on this list - by the way: https://www.mail-archive.com/help-guix@gnu.org/msg11407.html and the consensus seems to be that this has never been easy: https://www.mail-archive.com/help-guix@gnu.org/msg11418.html "It has never been simple on Guix System to use xinit / startx,..." And I would really appreciate if some more care would be given to this: as much as I like the core ideas of guix, things like these I find discouraging / off putting - sorry to say this. -A Vagrant Cascadian <vagrant@debian.org> writes: > On 2021-08-21, Andreas Reuleaux wrote: >> I am fairly new to guix, thus bear with me please. > > Welcome! > >> I want to start X on my system with startx - i.e. log into my system >> just from a tty, and then start X by hand (and i3 will be my window >> manager, I just have an .xsession file in my $HOME, where I start i3) >> - I do not want any desktop-services / desktop-manager / graphical login manager >> (this may seem old school - but has worked fine for me for years >> under debian). >> >> I cannot really get this working though: I have xinit installed (with >> startx therein, cf. my config below), but when I >> >> startx >> >> on the command line, I get this: >> >> xauth: file /home/rx/.serverauth.1957 does not exist > ... > > I struggled with this for a bit and eventually gave up. In theory, if > you make enough executables setuid, you might be able to get startx to > work properly (other distros such as Debian make startx work by > installing various executables setuid). > > In the end, I switched using sway, which is very similar to i3 but uses > wayland natively instead of X11 (though there are still X11 > compatibility layers). The main thing is you need to have elogind > configured in your system, and then you can login and run "exec sway" > and it "just works". > > So, not exactly a direct answer to your question, but maybe it is a > workable alternative for you. > > > live well, > vagrant
Andreas Reuleaux <rx@a-rx.info> writes:
> [...]
> I want to start X on my system with startx - i.e. log into my system
> just from a tty, and then start X by hand (and i3 will be my window
> manager, I just have an .xsession file in my $HOME, where I start i3)
Hello, you can use 'xorg-server-service-type' (not documented, patch
welcome!) with 'sx' (recommended) or 'xinit':
1. Add 'xorg-server-service-type' to the system config, and reconfigure.
After this you'll have 'X' and 'Xorg' in '/run/current-system/profile/bin'.
2. Install 'sx' or 'xinit', config them:
- For 'sx', create the ~/.config/sx/sxrc script, which likely ends
with 'exec dbus-run-session -- i3' .
- For 'xinit', create the ~/.xinitrc script and a ~/.xserverrc with:
--8<---------------cut here---------------start------------->8---
tty=$(tty)
tty=${tty#/dev/tty}
X vt${tty}
--8<---------------cut here---------------end--------------->8---
This xserverrc is needed for rootless X to start with the current tty.
3. Run 'sx' or 'xinit' from tty. I think you also need to to be in the
'video' and 'input' group for this to work.
Hope it helps!
OK, thanks for that as well: I will have a look.
-A
宋文武 <iyzsong@outlook.com> writes:
> Andreas Reuleaux <rx@a-rx.info> writes:
>
>> [...]
>> I want to start X on my system with startx - i.e. log into my system
>> just from a tty, and then start X by hand (and i3 will be my window
>> manager, I just have an .xsession file in my $HOME, where I start i3)
>
> Hello, you can use 'xorg-server-service-type' (not documented, patch
> welcome!) with 'sx' (recommended) or 'xinit':
>
> 1. Add 'xorg-server-service-type' to the system config, and reconfigure.
> After this you'll have 'X' and 'Xorg' in '/run/current-system/profile/bin'.
>
> 2. Install 'sx' or 'xinit', config them:
> - For 'sx', create the ~/.config/sx/sxrc script, which likely ends
> with 'exec dbus-run-session -- i3' .
> - For 'xinit', create the ~/.xinitrc script and a ~/.xserverrc with:
>
> tty=$(tty)
> tty=${tty#/dev/tty}
> X vt${tty}
>
> This xserverrc is needed for rootless X to start with the current tty.
>
> 3. Run 'sx' or 'xinit' from tty. I think you also need to to be in the
> 'video' and 'input' group for this to work.
>
> Hope it helps!
hi again,
sx is working fine for me now, thanks a lot again.
so far w/ i3 i.e. - I will want to replace that w/ sway (wayland) next.
-A
宋文武 <iyzsong@outlook.com> writes:
> Andreas Reuleaux <rx@a-rx.info> writes:
>
>> [...]
>> I want to start X on my system with startx - i.e. log into my system
>> just from a tty, and then start X by hand (and i3 will be my window
>> manager, I just have an .xsession file in my $HOME, where I start i3)
>
> Hello, you can use 'xorg-server-service-type' (not documented, patch
> welcome!) with 'sx' (recommended) or 'xinit':
>
> 1. Add 'xorg-server-service-type' to the system config, and reconfigure.
> After this you'll have 'X' and 'Xorg' in '/run/current-system/profile/bin'.
>
> 2. Install 'sx' or 'xinit', config them:
> - For 'sx', create the ~/.config/sx/sxrc script, which likely ends
> with 'exec dbus-run-session -- i3' .
> - For 'xinit', create the ~/.xinitrc script and a ~/.xserverrc with:
>
> tty=$(tty)
> tty=${tty#/dev/tty}
> X vt${tty}
>
> This xserverrc is needed for rootless X to start with the current tty.
>
> 3. Run 'sx' or 'xinit' from tty. I think you also need to to be in the
> 'video' and 'input' group for this to work.
>
> Hope it helps!
Andreas Reuleaux <rx@a-rx.info> writes:
> I am fairly new to guix, thus bear with me please.
>
> I want to start X on my system with startx - i.e. log into my system
> just from a tty, and then start X by hand (and i3 will be my window
> manager, I just have an .xsession file in my $HOME, where I start i3)
> - I do not want any desktop-services / desktop-manager / graphical login manager
> (this may seem old school - but has worked fine for me for years
> under debian).
Somewhere in you $PATH… startx witch:
#+BEGIN_SRC shell
#!/bin/sh
DIR=$HOME/.guix-profile
# 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
# Get current tty
tty_num=$(tty | grep -oE '[0-9]+$')
vtarg="vt$tty_num -keeptty"
$DIR/bin/xinit -- $DIR/bin/Xorg $defaultdisplay $vtarg \
-configdir $DIR/share/X11/xorg.conf.d \
-modulepath $DIR/lib/xorg/modules
#+END_SRC
In your guix user profile manifest:
#+BEGIN_SRC lisp
(define %packages-xorg
(list
"xorg-server"
"xf86-video-amdgpu"
"xf86-input-libinput"
"xf86-input-wacom"
"xinit"))
(concatenate-manifests
(list (specifications->manifest
(append %packages-xorg
%packages-desktop-hlwm
%packages-desktop-windowmaker
%packages-desktop-wms-complementary
%packages-desktop-complementary
%packages-fonts
%packages-complementary))
#+END_SRC
--
WBR, Boris Dekshteyn
"Boris A. Dekshteyn" <boris.dekshteyn@gmail.com> writes:
> Andreas Reuleaux <rx@a-rx.info> writes:
>
> Somewhere in you $PATH… startx witch:
witch -> which, sorry for misspell.
--
WBR, Boris Dekshteyn
OK, thanks as well (for both of your messages).
I have X already running now from the commandline with sx
as suggested by 宋文武 <iyzsong@outlook.com>
Thanks in any case.
-A
"Boris A. Dekshteyn" <boris.dekshteyn@gmail.com> writes:
> "Boris A. Dekshteyn" <boris.dekshteyn@gmail.com> writes:
>
>> Andreas Reuleaux <rx@a-rx.info> writes:
>>
>> Somewhere in you $PATH… startx witch:
>
> witch -> which, sorry for misspell.