Переглянути джерело

update readme instructions

update various notes regarding XC1 and hidpi

update installed package list

enable ntpd during installation

add additional error handling to installation process

update packer scripts (still some bugs to work out)
Casey DeLorme 4 роки тому
батько
коміт
273105dfe4
7 змінених файлів з 51 додано та 31 видалено
  1. 8 19
      arch.sh
  2. 4 2
      notes/hidpi.md
  3. 7 0
      notes/x1c.md
  4. 3 1
      packer.json
  5. 20 9
      readme.md
  6. 5 0
      setup/install.sh
  7. 4 0
      setup/packer.sh

+ 8 - 19
arch.sh

@@ -24,9 +24,9 @@ hwclock -w --utc
 
 # setup locale
 sed -i "/^en_US.UTF-8/d" /etc/locale.gen
-# sed -i "/^ja_JP.UTF-8/d" /etc/locale.gen
+sed -i "/^ja_JP.UTF-8/d" /etc/locale.gen
 echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
-# echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
+echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
 locale-gen
 echo "LANG=en_US.UTF-8" > /etc/locale.conf
 
@@ -53,7 +53,7 @@ curl -O https://download.sublimetext.com/sublimehq-pub.gpg && pacman-key --add s
 [ $(grep -c "sublime-text" /etc/pacman.conf) -eq 0 ] && echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | tee -a /etc/pacman.conf
 
 # update and install all packages
-pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal vulkan-tools arandr feh hsetroot openbox archlinux-xdg-menu compton xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks sublime-text
+pacman -Syu --noconfirm sudo bash-completion tmux vim linux-firmware linux-headers dkms smartmontools cryptsetup usbutils btrfs-progs gvfs gvfs-mtp gvfs-afc android-udev dmidecode parted pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq at bc cronie iptables rsync net-tools openssh sshfs ntp wget curl wireless_tools bluez bluez-utils lzop unzip p7zip xz unrar unace lrzip arj git mercurial subversion bzr postgresql mesa lib32-mesa dbus polkit xorg-server xorg-server-devel xorg-xinit xorg-xinput xorg-xdpyinfo xorg-xprop xdotool xsel pulseaudio libpulse lib32-libpulse openal lib32-openal vulkan-tools arandr feh hsetroot openbox archlinux-xdg-menu compton xarchiver innoextract pavucontrol pasystray xdg-utils xdg-user-dirs tint2 conky pcmanfm gmrun rxvt-unicode urxvt-perls gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine lxappearance graphicsmagick imagemagick lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libexif ffmpeg ffmpegthumbnailer tumbler joyutils evtest lm_sensors lshw gparted psensor gparted hardinfo fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono mpv openshot gimp krita transmission-cli discord evince viewnior virtualbox-host-modules-arch virtualbox vagrant obs-studio dia mednafen mame ppsspp lutris steam wine python-pip python-setuptools winetricks sublime-text
 
 # if the active network device is wireless install connman
 [ -d "/sys/class/net/${active_network_device}/wireless" ] && pacman -Syu connman wpa_supplicant openvpn ethtool iwd pptpclient && systemctl enable connman
@@ -96,13 +96,9 @@ echo "${aur_username} ALL= NOPASSWD: /usr/bin/pacman" > /etc/sudoers.d/${aur_use
 # install laptop packages and optimize system configuration
 export chassistype=$(dmidecode --string chassis-type)
 if [[ "$chassistype" = "Laptop" || "$chassistype" = "Portable" || "$chassistype" = "Notebook" || "$chassistype" = "Sub Notebook" ]]; then
-	pacman -Syu --noconfirm xf86-input-synaptics acpid hdparm sdparm acpilight connman wpa_supplicant openvpn ethtool iwd pptpclient
+	pacman -Syu --noconfirm xf86-input-synaptics acpid hdparm sdparm acpilight connman wpa_supplicant openvpn ethtool iwd pptpclient tlp
 	systemctl enable connman
 	systemctl enable acpid
-
-	sudo -u $aur_username git clone https://aur.archlinux.org/laptop-mode-tools.git /home/${aur_username}/laptop-mode-tools
-	(cd /home/${aur_username}/laptop-mode-tools && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
-	systemctl enable laptop-mode
 fi
 
 # install xcursor-chameleon-skyblue
@@ -117,14 +113,6 @@ sudo -u $aur_username git clone https://aur.archlinux.org/numix-icon-theme-git.g
 sudo -u $aur_username git clone https://aur.archlinux.org/google-chrome.git /home/${aur_username}/google-chrome
 (cd /home/${aur_username}/google-chrome && sudo -u ${aur_username} makepkg -rcsi --noconfirm)
 
-# install libc++; a dependency of discord; has broken pgp and tests?
-sudo -u $aur_username git clone https://aur.archlinux.org/libc++.git /home/${aur_username}/libc++
-(cd /home/${aur_username}/libc++ && sudo -u ${aur_username} makepkg -rcsi --noconfirm --skippgpcheck --nocheck)
-
-# install discord; ignore tests to save time
-sudo -u $aur_username git clone https://aur.archlinux.org/discord.git /home/${aur_username}/discord
-(cd /home/${aur_username}/discord && sudo -u ${aur_username} makepkg --nocheck -rcsi --noconfirm)
-
 # cleanup aur user
 rm -rf /etc/sudoers.d/${aur_username}
 userdel -fr $aur_username
@@ -261,18 +249,19 @@ ln -sf /usr/bin/vim /usr/local/bin/vi
 
 # enable services for next reboot
 systemctl enable iptables
+systemctl enable ntpd
 systemctl enable sshd
 systemctl enable bluetooth
 systemctl enable transmission
 systemctl enable postgresql
 systemctl enable cronie
 
-# enable wired connections on reboot
+# try to enable wired connections on reboot
 export active_network_device=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//')
-[ ! -d "/sys/class/net/${active_network_device}/wireless" ] && systemctl enable dhcpcd@${active_network_device}
+[ ! -d "/sys/class/net/${active_network_device}/wireless" ] && (systemctl enable dhcpcd@${active_network_device} || echo "failed to enable dhcp service")
 
 # build the init module
-mkinitcpio -p linux
+mkinitcpio -p linux || echo "mkinitcpio failed?"
 
 # install the bootloader
 bootctl install

+ 4 - 2
notes/hidpi.md

@@ -19,12 +19,14 @@ First, for the openbox menu, conky, and others, changing `Xft.dpi`.
 
 For gnome based applications this is recommended:
 
-	gsettings set org.gnome.desktop.interface text-scaling-factor 2.0
+	gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
 
-For `Sublime Text` you need to add `"ui_scale": 2.0` to user configuration.
+For `Sublime Text` you need to add `"ui_scale": 1.5` to user configuration.
 
 Finally, the scaling of `urxvt` makes the `urzvtq` dimensions a bit large, so I modify `geometry 200x24` to `geometry 200x16` inside `/usr/local/bin/urxvtq`.  _We rely on a width larger than the display to force Openbox to auto-shrink it._
 
 For the console displayed at boot, I ran `pacman -Syu terminus-font` and then modified `FONT=koi8u_8x16` to `FONT=ter-932n` inside `/etc/vconsole.conf`.  _I prefer `koi8u_8x16` aesthetically, but it is too small on large displays._
 
 To fix the cursor several files needed to be modified from `Chameleon-SkyBlue-Regular` to `Chameleon-SkyBlue-Large`.  _This includes `~/.gtkrc-2.0`, `~/.config/gtk-3.0/settings.ini`, `~/.icons/default/index.theme`, and `~/.Xdefaults`._
+
+You may also want to adjust `~/.config/tint2/tint2rc` by adding `scale_relative_to_dpi = 140`.

+ 7 - 0
notes/x1c.md

@@ -60,3 +60,10 @@ The system recharged its battery from 50% to 100% in just over 2 hours while in
 I had to add and modify a few configuration files to get brightness working as well as improved touchpad behavior.
 
 The display did accrue some smudges when I accidentally touched it, fortunately I had some cleaning cloths for that.
+
+
+## supplemental
+
+I found errors in my logs regarding CPU thermal throttling, which seems to be related to a bug that Lenovo claimed to be working on in 2017.  **This can be fixed by installing `throttled` and loading `systemctl enable --now lenovo_fix.service`.**
+
+A similar problem with similar "we're working on it" reporting from 2017 is that the touchpad does not report `ABS_TOOL_WIDTH`, which is required for palm detection.  _I could not verify a means of fixing this that did not involve significant and poorly documented manual compilation work._  However, a work-around might involve testing the `*Edge` properties with `synclient` and storing those in your `/etc/X11/xorg.conf.d/70-synaptics.conf`.

+ 3 - 1
packer.json

@@ -54,6 +54,7 @@
 			"skip_clean": true,
 			"expect_disconnect": true,
 			"environment_vars": [
+				"PACKER=y",
 				"DEBUG=true",
 				"enable_hibernation=y",
 				"root_password={{user `root_password`}}",
@@ -64,7 +65,8 @@
 		},
 		{
 			"type": "shell",
-			"script": "setup/packer.sh"
+			"script": "setup/packer.sh",
+			"pause_before": "30s"
 		}
 	],
 	"post-processors": [

+ 20 - 9
readme.md

@@ -1,34 +1,44 @@
 
 # [arch-desktop](https://git.caseydelorme.com/cdelorme/arch-desktop)
 
-This repository contains automation that matches [debian-stretch-desktop](https://git.caseydelorme.com/cdelorme/debian-stretch-desktop), but has been retooled for [arch](https://www.archlinux.org/) systems.
+This repository contains automation to establish a highly functional and lightweight desktop environment.
 
-As a rolling release, there will be no need to create new repositories, I will simply update this one as needed.
+It was originally written to parity [debian-stretch-desktop](https://git.caseydelorme.com/cdelorme/debian-stretch-desktop).
 
-There are two driving factors for me using arch:
+As there are no "releases" to match, this repository will instead be updated over time as is needed.
 
-1. I want it on my laptop and arch has way better modern driver support as it is a rolling release.
-2. We have just entered the post-freeze on debian buster which is always a painful wait.
 
-_During the creation of this project I have been surprised at how stable arch is and while I will still use debian for servers I may consider moving to arch for my desktop and development machine._
+## why
+
+I have been a debian proponent for years, and will continue to be for servers.
+
+**However, the 6 months prior to a new debian release are horrible for desktop users.**
+
+Additionally, if attempting to upgrade hardware the lack of up to date drivers due to locked kernel are a serious pain.
+
+_Finally, having now used Arch as my main system for nearly 6 months I am shocked at how stable it is._
 
 
 ## usage
 
-If you want to test my build locally, you can do so with [`virtualbox`](https://www.virtualbox.org/), [`packer`](https://www.vagrantup.com/), and [`vagrant`](https://www.packer.io/) by running these commands with them installed.
+If you want to test my build locally, you can do so by installing [`virtualbox`](https://www.virtualbox.org/), [`packer`](https://www.vagrantup.com/), and [`vagrant`](https://www.packer.io/).
+
+Simply run these commands; the first will build the base image and the second will launch a VM using that base image:
 
 	packer build packer.json
 	vagrant up
 
-The first will build an entire image, which takes roughly 5GB of disk space, and the second will launch an instance from that image that is accessible with the username and password of `vagrant`.
+_This may require a combined total of 5GB of disk space for the installation image and outputs, and uses the user name and password of `vagrant`._
 
-You can also run these commands from the installation terminal:
+If you are actually doing an installation, you can run these commands from the arch installation terminal:
 
 	pacman -S git
 	git clone https://git.caseydelorme.com/cdelorme/arch-desktop.git
 	cd arch-desktop
 	./setup/install.sh
 
+_This may ask for input, and will reboot when finished._
+
 
 ## notes
 
@@ -52,3 +62,4 @@ Finally, while I am not a fan of how `systemd` forced proliferation into all lin
 - [ip command cheatsheat](https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf)
 - [packer-arch by elasticdog](https://github.com/elasticdog/packer-arch)
 - [touchpad configuration](http://add4jhf.blogspot.com/2013/09/touch-pad-deactivation-while-typing-and.html)
+- [yay AUR Package Manager](https://github.com/Jguer/yay)

+ 5 - 0
setup/install.sh

@@ -89,5 +89,10 @@ cp arch.sh /mnt/srv/arch-desktop/
 
 # proceed to automate arch-chroot installation then umount and reboot with an async delay
 arch-chroot /mnt /srv/arch-desktop/arch.sh
+if [ -n "$PACKER" ]; then
+	sed -i "/^#\?PermitRootLogin/d" /mnt/etc/ssh/sshd_config
+	echo "PermitRootLogin yes" >> /mnt/etc/ssh/sshd_config
+fi
+sleep 10m
 umount -R /mnt
 (sleep 5 && systemctl reboot) &

+ 4 - 0
setup/packer.sh

@@ -1,5 +1,9 @@
 #!/usr/bin/bash -x
 
+# re-secure ssh
+sed -i "/^#\?PermitRootLogin/d" /etc/ssh/sshd_config
+echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
+
 # VirtualBox Guest Additions
 # https://wiki.archlinux.org/index.php/VirtualBox
 pacman -S --noconfirm linux-headers virtualbox-guest-utils virtualbox-guest-modules-arch nfs-utils