Blog Code Forum

ArchLive

From Wiki.cyring.fr

(Difference between revisions)
Jump to: navigation, search
(packages.both)
(slim.conf)
Line 137: Line 137:
===== slim.conf =====
===== slim.conf =====
<pre>
<pre>
-
# Path, X server and arguments (if needed)
 
-
# Note: -xauth $authfile is automatically appended
 
-
default_path        /bin:/usr/bin:/usr/local/bin
 
-
default_xserver    /usr/bin/X
 
-
xserver_arguments -nolisten tcp vt07
 
-
 
-
# Commands for halt, login, etc.
 
-
halt_cmd            /sbin/shutdown -h now
 
-
reboot_cmd          /sbin/shutdown -r now
 
-
console_cmd        /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
 
-
#suspend_cmd        /usr/sbin/suspend
 
-
 
-
# Full path to the xauth binary
 
-
xauth_path        /usr/bin/xauth
 
-
 
-
# Xauth file for server
 
-
authfile          /var/run/slim.auth
 
-
 
-
 
-
# Activate numlock when slim starts. Valid values: on|off
 
-
# numlock            on
 
-
 
-
# Hide the mouse cursor (note: does not work with some WMs).
 
-
# Valid values: true|false
 
-
# hidecursor          false
 
-
 
-
# This command is executed after a succesful login.
 
-
# you can place the %session and %theme variables
 
-
# to handle launching of specific commands in .xinitrc
 
-
# depending of chosen session and slim theme
 
-
#
 
-
# NOTE: if your system does not have bash you need
 
-
# to adjust the command according to your preferred shell,
 
-
# i.e. for freebsd use:
 
-
# login_cmd          exec /bin/sh - ~/.xinitrc %session
 
login_cmd          exec /bin/zsh -l ~/.xinitrc %session
login_cmd          exec /bin/zsh -l ~/.xinitrc %session
-
 
-
# Commands executed when starting and exiting a session.
 
-
# They can be used for registering a X11 session with
 
-
# sessreg. You can use the %user variable
 
-
#
 
-
# sessionstart_cmd some command
 
-
# sessionstop_cmd some command
 
-
 
-
# Start in daemon mode. Valid values: yes | no
 
-
# Note that this can be overriden by the command line
 
-
# options "-d" and "-nodaemon"
 
-
# daemon yes
 
-
 
-
# Available sessions (first one is the default).
 
-
# The current chosen session name is replaced in the login_cmd
 
-
# above, so your login command can handle different sessions.
 
-
# see the xinitrc.sample file shipped with slim sources
 
-
sessions            xfce4,icewm-session,wmaker,blackbox
 
-
 
-
# Executed when pressing F11 (requires imagemagick)
 
-
screenshot_cmd      import -window root /slim.png
 
-
 
-
# welcome message. Available variables: %host, %domain
 
-
welcome_msg        Welcome to %host
 
-
 
-
# Session message. Prepended to the session name when pressing F1
 
-
# session_msg        Session:
 
-
 
-
# shutdown / reboot messages
 
-
shutdown_msg      The system is halting...
 
-
reboot_msg        The system is rebooting...
 
-
 
-
# default user, leave blank or remove this line
 
-
# for avoid pre-loading the username.
 
default_user        root
default_user        root
-
 
-
# Focus the password field on start when default_user is set
 
-
# Set to "yes" to enable this feature
 
-
#focus_password      no
 
-
 
-
# Automatically login the default user (without entering
 
-
# the password. Set to "yes" to enable this feature
 
auto_login          yes
auto_login          yes
-
 
-
 
-
# current theme, use comma separated list to specify a set to
 
-
# randomly choose from
 
-
#current_theme      default
 
current_theme      archlinux-simplyblack
current_theme      archlinux-simplyblack
 +
</pre>
-
# Lock file
 
-
lockfile            /var/lock/slim.lock
 
-
 
-
# Log file
 
-
logfile            /var/log/slim.log
 
-
</pre>
 
===== display-manager.service =====
===== display-manager.service =====
<pre>
<pre>

Revision as of 06:01, 14 November 2012

Contents

Working directory

  1. pacman -S archiso
  2. mkdir live
  3. chdir live
  4. cp -rv /usr/share/archiso/configs/releng/ .
  5. cd releng
  6. nano packages.both
  7. nano pacman.conf
  8. mkdir -p root-image/etc/modules-load.d
  9. nano root-image/etc/modules-load.d/archiso.conf
  10. mkdir -p root-image/etc/X11/xorg.conf.d
  11. nano root-image/etc/X11/xorg.conf.d/10-evdev.conf
  12. mkdir -p root-image/etc/skel
  13. cp -v /etc/skel/.xinitrc root-image/etc/skel/
  14. nano root-image/etc/skel/.xinitrc
  15. chmod +x root-image/etc/skel/.xinitrc
  16. nano root-image/etc/slim.conf
  17. cp -v /etc/vconsole.conf root-image/etc/
  18. ln -vs /usr/share/zoneinfo/Europe/Paris root-image/etc/localtime
  19. nano root-image/etc/systemd/system/display-manager.service

Settings

packages.both
  • add the following packages
archlinux-themes-slim
base-devel
blender
chromium
cuda
flashplugin
gtk2
hddtemp
libvdpau
lm_sensors
nvidia
pangox-compat
slim
xorg-server
xf86-video-vesa
xfce4
pacman.conf
SigLevel = Never
#[testing]
#SigLevel = PackageRequired
#Include = /etc/pacman.d/mirrorlist

[core]
#SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
#SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#SigLevel = PackageRequired
#Include = /etc/pacman.d/mirrorlist

[community]
#SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
archiso.conf
  • (optional) modules claimed by CoreMod
msr
dmi-sysfs
10-evdev.conf
  • remark : AZERTY keyboard
Section "InputClass"
        Identifier      "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "evdev"
        Option          "xkb_layout" "fr"
        Option          "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "InputClass"
        Identifier      "evdev pointer catchall"
        MatchIsPointer  "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "evdev"
        Option          "SampleRate" "500"
EndSection

Section "InputClass"
        Identifier      "evdev touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "evdev"
EndSection

Section "InputClass"
        Identifier      "evdev tablet catchall"
        MatchIsTablet   "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "evdev"
EndSection

Section "InputClass"
        Identifier      "evdev touchscreen catchall"
        MatchIsTouchscreen      "on"
        MatchDevicePath "/dev/input/event*"
        Driver          "evdev"
EndSection
.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice
slim.conf
login_cmd           exec /bin/zsh -l ~/.xinitrc %session
default_user        root
auto_login          yes
current_theme       archlinux-simplyblack
display-manager.service
[Unit]
Description=SLiM Simple Login Manager
After=systemd-user-sessions.service

[Service]
ExecStart=/usr/bin/slim -nodaemon

[Install]
Alias=display-manager.service

Desktop Environment

Xfce

  1. wget https://www.archlinux.org/static/logos/archlinux-logo-dark-90dpi.png -O root-image/root/archlinux-logo-dark-90dpi.png
  2. mkdir -p root-image/root/.config/xfce4/xfconf/xfce-perchannel-xml
  3. nano root-image/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-desktop" version="1.0">
  <property name="backdrop" type="empty">
    <property name="screen0" type="empty">
      <property name="monitor0" type="empty">
        <property name="image-path" type="string" value="/root/archlinux-logo-dark-90dpi.png"/>
        <property name="last-image" type="string" value="/usr/share/backgrounds/xfce/xfce-blue.jpg"/>
        <property name="last-single-image" type="string" value="/root/archlinux-logo-dark-90dpi.png"/>
        <property name="image-style" type="int" value="1"/>
        <property name="image-show" type="bool" value="true"/>
      </property>
    </property>
  </property>
  <property name="desktop-icons" type="empty">
    <property name="icon-size" type="uint" value="32"/>
    <property name="file-icons" type="empty">
      <property name="show-home" type="bool" value="false"/>
      <property name="show-filesystem" type="bool" value="false"/>
      <property name="show-trash" type="bool" value="false"/>
    </property>
  </property>
</channel>
  1. nano root-image/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
  • with application shorcuts
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-panel" version="1.0">
  <property name="configver" type="int" value="2"/>
  <property name="panels" type="array">
    <value type="int" value="1"/>
    <property name="panel-1" type="empty">
      <property name="position" type="string" value="p=6;x=17;y=72"/>
      <property name="mode" type="uint" value="1"/>
      <property name="size" type="uint" value="48"/>
      <property name="background-style" type="uint" value="1"/>
      <property name="plugin-ids" type="array">
        <value type="int" value="4"/>
        <value type="int" value="3"/>
        <value type="int" value="2"/>
        <value type="int" value="6"/>
        <value type="int" value="1"/>
      </property>
      <property name="position-locked" type="bool" value="true"/>
      <property name="length" type="uint" value="100"/>
      <property name="background-color" type="array">
        <value type="uint" value="5911"/>
        <value type="uint" value="35723"/>
        <value type="uint" value="50629"/>
        <value type="uint" value="65535"/>
      </property>
    </property>
  </property>
  <property name="plugins" type="empty">
    <property name="plugin-1" type="string" value="tasklist">
      <property name="show-labels" type="bool" value="false"/>
      <property name="show-handle" type="bool" value="false"/>
    </property>
    <property name="plugin-3" type="string" value="systray"/>
    <property name="plugin-4" type="string" value="clock">
      <property name="mode" type="uint" value="4"/>
      <property name="show-frame" type="bool" value="false"/>
    </property>
    <property name="plugin-6" type="string" value="launcher">
      <property name="items" type="array">
        <value type="string" value="13526260781.desktop"/>
      </property>
      <property name="arrow-position" type="uint" value="0"/>
      <property name="move-first" type="bool" value="false"/>
      <property name="show-label" type="bool" value="false"/>
      <property name="disable-tooltips" type="bool" value="false"/>
    </property>
    <property name="plugin-2" type="string" value="launcher">
      <property name="items" type="array">
        <value type="string" value="13526269274.desktop"/>
      </property>
    </property>
  </property>
</channel>
  • without application shortcuts
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-panel" version="1.0">
  <property name="configver" type="int" value="2"/>
  <property name="panels" type="array">
    <value type="int" value="1"/>
    <property name="panel-1" type="empty">
      <property name="position" type="string" value="p=6;x=17;y=72"/>
      <property name="mode" type="uint" value="1"/>
      <property name="size" type="uint" value="48"/>
      <property name="background-style" type="uint" value="1"/>
      <property name="plugin-ids" type="array">
        <value type="int" value="4"/>
        <value type="int" value="3"/>
        <value type="int" value="2"/>
        <value type="int" value="6"/>
        <value type="int" value="1"/>
      </property>
      <property name="position-locked" type="bool" value="true"/>
      <property name="length" type="uint" value="100"/>
      <property name="background-color" type="array">
        <value type="uint" value="5911"/>
        <value type="uint" value="35723"/>
        <value type="uint" value="50629"/>
        <value type="uint" value="65535"/>
      </property>
    </property>
  </property>
  <property name="plugins" type="empty">
    <property name="plugin-1" type="string" value="tasklist">
      <property name="show-labels" type="bool" value="false"/>
      <property name="show-handle" type="bool" value="false"/>
    </property>
    <property name="plugin-3" type="string" value="systray"/>
    <property name="plugin-4" type="string" value="clock">
      <property name="mode" type="uint" value="4"/>
      <property name="show-frame" type="bool" value="false"/>
    </property>
  </property>
</channel>

Terminal

  1. mkdir -p root-image/root/.config/Terminal
  2. nano root-image/root/.config/Terminal/terminalrc
[Configuration]
FontName=Monospace 9
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x36
MiscInheritGeometry=FALSE
MiscMenubarDefault=FALSE
MiscMouseAutohide=FALSE
MiscToolbarsDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE

Application shortcuts

Chrome

Common
  • allow chrome to start as root using argument --user-data-dir
  1. mkdir root-image/etc/chromium
  2. nano root-image/etc/chromium/default
# Default settings for chromium. This file is sourced by /usr/bin/chromium

# Options to pass to chromium
CHROMIUM_FLAGS="-user-data-dir=/tmp/chromium"
Button
  1. mkdir -p root-image/root/.config/xfce4/panel/launcher-6
  2. nano root-image/root/.config/xfce4/panel/launcher-6/13526260781.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Chrome
Comment=
Exec=chromium --user-data-dir=/tmp/chromium
Icon=chromium
Path=
Terminal=false
StartupNotify=false

Blender

Button
  1. mkdir -p root-image/root/.config/xfce4/panel/launcher-2
  2. nano root-image/root/.config/xfce4/panel/launcher-2/13526269274.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Blender
Comment=
Exec=blender
Icon=blender
Path=
Terminal=false
StartupNotify=false

User management

  • (optional) define user passwords
Login Passwd
root root
arch <empty>
  1. nano root-image/etc/passwd
  2. nano root-image/etc/shadow
passwd
root:x:0:0:root:/root:/bin/zsh
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
ftp:x:14:11:ftp:/srv/ftp:/bin/false
http:x:33:33:http:/srv/http:/bin/false
uuidd:x:68:68:uuidd:/:/sbin/nologin
nobody:x:99:99:nobody:/:/bin/false
dbus:x:81:81:System message bus:/:/bin/false
nbd:x:44:44::/var/empty:/bin/false
dnsmasq:x:999:999:dnsmasq daemon:/:/sbin/nologin
ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/bin/false
partimag:x:110:110:Partimage user:/dev/null:/bin/false
avahi:x:84:84:avahi:/:/bin/false
polkitd:x:102:102:Policy Kit Daemon:/:/bin/false
usbmux:x:140:140:usbmux user:/:/sbin/nologin
shadow
root:$6$pYrbz273$cOl7DOb0PDY5tg95ejfwp2zA1pnRxz1MpnVXXYYQYS0Fw0mzu6lI66.eG/YawVcpPmyyXbtl1fk5vDdzYQvXL/:15657::::::
bin:x:14871::::::
daemon:x:14871::::::
mail:x:14871::::::
ftp:x:14871::::::
http:x:14871::::::
uuidd:x:14871::::::
nobody:x:14871::::::
dbus:!:15657:0:99999:7:::
nbd:!:15657::::::
dnsmasq:!:15657::::::
ntp:!:15657:0:99999:7:::
partimag:!:15657:0:99999:7:::
avahi:!:15657::::::
polkitd:!:15657:0:99999:7:::
usbmux:!:15657:0:99999:7:::

Boot Loader

SysLinux

  • blacklist the nouveau module in favor of nvidia
  • autologin with SLiM
  1. nano syslinux/archiso_sys.cfg
LABEL arch
TEXT HELP
Boot the Arch Linux live medium. It allows you to install Arch Linux or
perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux
LINUX boot/%ARCH%/vmlinuz
INITRD boot/%ARCH%/archiso.img
APPEND quiet modprobe.blacklist=nouveau systemd.unit=graphical.target archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
  1. nano syslinux/archiso_head.cfg
DEFAULT arch
TIMEOUT 30

SERIAL 0 38400
UI boot/syslinux/vesamenu.c32
MENU TITLE Arch Linux
MENU BACKGROUND boot/syslinux/splash.png

MENU WIDTH 78
MENU MARGIN 4
MENU ROWS 6
MENU VSHIFT 10
MENU TABMSGROW 14
MENU CMDLINEROW 14
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29

# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu

MENU COLOR border       30;44   #40ffffff #a0000000 std
MENU COLOR title        1;36;44 #9033ccff #a0000000 std
MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel        37;44   #50ffffff #a0000000 std
MENU COLOR help         37;40   #c0ffffff #a0000000 std
MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07        37;40   #90ffffff #a0000000 std
MENU COLOR tabmsg       31;40   #30ffffff #00000000 std

Build

  1. ./build.sh clean single
  2. ./build.sh -v build single

Test

  • update the host syslinux configuration for a live test on computer
  1. cp -v out/archlinux-*-x86_64.iso /boot/
  2. ln -fs /boot/archlinux-*-x86_64.iso /boot/archlive.iso
  3. nano /boot/syslinux/syslinux.cfg
LABEL cdrom
        MENU LABEL ^CD-ROM
        LINUX memdisk
        INITRD archlive.iso
        APPEND iso raw
  • reboot the computer and press [C] to boot the live CD

ArchLive002-150x150.png ArchLive003-150x150.png ArchLive004-150x150.png

  • (optional) open a Terminal, change to the directory CoreMod then build & run coremod
  1. mkdir ~/CoreMod
  2. wget http://code.cyring.fr/FTS/Source/C/CoreMod/Nightly_Build/2012-0.1.4/Makefile -O ~/CoreMod/Makefile
  3. wget http://code.cyring.fr/FTS/Source/C/CoreMod/Nightly_Build/2012-0.1.4/coremod.c -O ~/CoreMod/coremod.c
  4. wget http://code.cyring.fr/FTS/Source/C/CoreMod/Nightly_Build/2012-0.1.4/coremod.h -O ~/CoreMod/coremod.h
  5. cd ~/CoreMod
  6. make
  7. bin/coremod