From: Alex Kost <alezost@gmail.com>
To: help-guix@gnu.org
Subject: [HOWTO] Start X server manually instead of using a login manager
Date: Thu, 19 Jul 2018 23:33:54 +0300 [thread overview]
Message-ID: <87d0vjm0ct.fsf@gmail.com> (raw)
Hello,
People often ask how they can use startx/xinit on GuixSD. It is
possible, although it is not as easy as on other distros. Hopefully,
this tutorial will answer some questions on the subject.
At first, a couple of points:
- We will run X server with user privileges, so if something goes wrong,
look at the X log, which is placed at "~/.local/share/xorg/Xorg.N.log"
by default.
- We will run "xinit", not "startx": the latter is just a wrapper that
does some preparations and runs "xinit". (startx is a usual shell
script with a usual script's behavior: it does not like that Guix
violates Filesystem Hierarchy Standard, so it successfully fails to
start).
Now the steps you need to do to use "xinit":
1. Install xinit, X server and required modules to some guix profile,
for example:
guix package -i xinit xorg-server xf86-input-libinput xf86-video-fbdev xf86-video-nouveau
2. Make "~/.xinitrc" file. If you don't know what its content should
be, just put "exec xterm" there, or even better read:
https://wiki.archlinux.org/index.php/Xinit
3. Running "xinit" requires specifying multiple arguments, so you will
probably make an auxiliary script to run it. This script will look
like this:
--8<---------------cut here---------------start------------->8---
#!/bin/sh
DIR=$HOME/.guix-profile
$DIR/bin/xinit -- $DIR/bin/Xorg :0 vt1 -keeptty \
-configdir $DIR/share/X11/xorg.conf.d \
-modulepath $DIR/lib/xorg/modules
--8<---------------cut here---------------end--------------->8---
Note that using the current terminal ("vt1" in this case) and
"-keeptty" is required, otherwise X server refuses to start without
root privileges.
For testing purposes, you may change the above arguments to ":1 vt2",
switch to vt2 (Ctrl-Alt-F2) and run this script.
4. Finally (if the above script works), you can remove login manager
from your os services (if you use %desktop-services):
--8<---------------cut here---------------start------------->8---
(use-modules
;; ...
(srfi srfi-1) ; for 'remove'
(gnu services desktop)
(gnu services xorg))
(operating-system
;; ...
(services
(remove (lambda (service)
(eq? (service-kind service) slim-service-type))
%desktop-services)))
--8<---------------cut here---------------end--------------->8---
--
Alex
next reply other threads:[~2018-07-19 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 20:33 Alex Kost [this message]
2018-07-19 21:56 ` [HOWTO] Start X server manually instead of using a login manager Divan Santana
2018-07-23 7:43 ` Divan Santana
2018-07-23 9:52 ` zloster
2018-07-26 15:34 ` Ludovic Courtès
2024-02-26 14:47 ` Tomas Volf
2024-02-26 17:28 ` Felix Lechner via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0vjm0ct.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.