-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the profile for Ubuntu 22.04.3
- Loading branch information
1 parent
b2d74e4
commit 210c383
Showing
40 changed files
with
930 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tmp | ||
*.iso | ||
go-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/opt/luwrain-utils/lwr-default-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/opt/luwrain-utils/lwr-emacspeak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
|
||
/usr/bin/mplayer -fs -dvd-device "$1" dvd:https://1 &> /dev/null | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
|
||
/usr/bin/geeqie -f "$1" &> /dev/null | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
|
||
/usr/bin/mplayer -fs "$1" &> /dev/null | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
luwrain |
12 changes: 12 additions & 0 deletions
12
ubuntu/22-04.3/dist/opt/luwrain-utils/emacspeak-cyril.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -ur a/emacspeak-speak.el b/emacspeak-speak.el | ||
--- a/emacspeak-speak.el 2022-11-19 12:32:17.342953057 +0700 | ||
+++ b/emacspeak-speak.el 2022-11-19 12:32:49.463563953 +0700 | ||
@@ -1206,7 +1206,7 @@ | ||
(when char | ||
(cond | ||
((stringp display) (dtk-speak display)) | ||
- ((> char 128) (emacspeak-speak-char-name char)) | ||
+ ;((> char 128) (emacspeak-speak-char-name char)) | ||
((and (not prefix) | ||
(emacspeak-is-alpha-p char)) | ||
(dtk-speak (emacspeak-get-phonetic-string char))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
# Changes the default user in the installed system | ||
|
||
THIS="${0##*/}" | ||
|
||
[ -z "$1" ] && echo "ERROR: THIS: No partition" >&2 && exit 1 | ||
[ -z "$2" ] && echo "ERROR: THIS: No new user name" >&2 && exit 1 | ||
|
||
PART="$1" | ||
NEW_USER="$2" | ||
|
||
exit_handler() | ||
{ | ||
local rc=$? | ||
trap - EXIT | ||
cd / | ||
umount $PART &> /dev/null ||: | ||
exit $rc | ||
} | ||
trap exit_handler EXIT HUP INT QUIT PIPE TERM | ||
|
||
mount $PART /mnt | ||
chroot /mnt usermod -l "$NEW_USER" luwrain | ||
chroot /mnt groupmod -n "$NEW_USER" luwrain | ||
chroot /mnt usermod -d "/home/$NEW_USER" "$NEW_USER" | ||
mv /mnt/home/luwrain "/mnt/home/$NEW_USER" | ||
echo "$NEW_USER" > /mnt/etc/luwrain/default-user | ||
cd /mnt/etc/sudoers.d | ||
sed -i -e s/luwrain/"$NEW_USER"/ luwrain | ||
mv luwrain "$NEW_USER" | ||
cd / | ||
echo "Default system user has been successfully changed to $NEW_USER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
|
||
cat <<EOF | debconf-set-selections | ||
emacspeak shared/emacspeak/database select | ||
emacspeak shared/emacspeak/program string dtk-mv | ||
emacspeak shared/emacspeak/fake select | ||
emacspeak shared/emacspeak/rootgroup error | ||
emacspeak shared/emacspeak/device select DECtalk 3 | ||
emacspeak shared/emacspeak/invaliduser error | ||
emacspeak shared/emacspeak/port string none | ||
emacspeak shared/emacspeak/tcl string tcl | ||
emacspeak shared/emacspeak/groupies string | ||
emacspeak shared/emacspeak/invalidport error | ||
EOF | ||
|
||
TERM=dumb apt-get -y install emacs-gtk emacspeak w3m-el | ||
cd /usr/share/emacs/site-lisp/emacspeak/lisp | ||
rm -f *.elc ../debian_compiled_version | ||
patch -p1 < /opt/luwrain-utils/emacspeak-cyril.diff | ||
/usr/lib/emacsen-common/packages/install/emacspeak emacs | ||
|
||
cat <<EOF > /etc/emacspeak.conf | ||
# emacspeak configuration | ||
export DTK_PROGRAM=/usr/bin/voiceman-emacspeak | ||
export DTK_TCL=tcl | ||
export DTK_PORT=none | ||
export DTK_DEVICE="espeak" | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
alias s='sudo systemctl' | ||
alias d='udisksctl' | ||
alias n='sudo nmcli' | ||
alias bt=bluetoothctl | ||
alias ac='sudo apt-cache' | ||
alias ag='sudo apt-get' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
|
||
(setq user-mail-address "[email protected]") | ||
(setq user-full-name "The LUWRAIN user") | ||
|
||
(global-set-key [f2] 'save-buffer) | ||
(global-set-key [f3] 'find-file) | ||
(global-set-key [f4] 'kill-buffer) | ||
(global-set-key [f5] 'other-window) | ||
(global-set-key [f6] 'calendar) | ||
(global-set-key [f7] 'gnus) | ||
(global-set-key [f8] 'w3m-browse-url) | ||
(global-set-key [f9] 'compile) | ||
(global-set-key [f10] 'switch-to-buffer) | ||
(global-set-key [f11] 'delete-other-windows) | ||
(global-set-key [S-f3] 'shell-command) | ||
(global-set-key [S-f4] 'shell) | ||
|
||
(global-set-key (kbd "M-а") 'forward-word) | ||
(global-set-key (kbd "M-и") 'backward-word) | ||
(global-set-key (kbd "C-ц") 'kill-region) | ||
(global-set-key (kbd "M-ц") 'kill-ring-save) | ||
(global-set-key (kbd "C-н") 'yank) | ||
|
||
;;Open shell in the current window | ||
(push (cons "\\*shell\\*" display-buffer--same-window-action) display-buffer-alist) | ||
|
||
(setq make-backup-files nil) | ||
(setq inhibit-startup-screen t) | ||
(setq line-move-visual nil) | ||
(setq emacspeak-gnus-punctuation-mode 'all) | ||
(setq emacspeak-message-punctuation-mode 'all) | ||
(setq dtk-unicode-untouched-charsets '(ascii cyrillic-iso8859-5 latin-iso8859-1)) | ||
(setq kill-buffer-query-functions nil) | ||
(setq emacspeak-play-emacspeak-startup-icon nil) | ||
|
||
(require 'message) | ||
(setq mm-coding-system-priorities '(koi8-r)) | ||
(add-to-list 'mm-body-charset-encoding-alist '(koi8-r . 8bit)) | ||
(setq message-cite-function 'message-cite-original-without-signature) | ||
(setq smtpmail-default-smtp-server "localhost") | ||
(setq send-mail-function 'smtpmail-send-it) | ||
(require 'smtpmail) | ||
|
||
(require 'w3m) | ||
(setq mm-text-html-renderer 'w3m-standalone) | ||
(remove-hook 'w3m-after-cursor-move-hook 'w3m-print-this-url) | ||
(remove-hook 'w3m-after-cursor-move-hook 'w3m-show-form-hint) | ||
|
||
(remove-hook 'w3m-after-cursor-move-hook 'w3m-highlight-current-anchor) | ||
(remove-hook 'w3m-after-cursor-move-hook 'w3m-auto-show) | ||
|
||
(setq browse-url-browser-function 'w3m-browse-url) | ||
(setq w3m-search-engine-alist | ||
'( | ||
("google" "http:https://www.google.ru/search?q=%s&hl=ru&ie=koi8-r" koi8-r) | ||
)) | ||
(setq w3m-search-default-engine "google") | ||
(setq w3m-use-cookies t) | ||
|
||
(require 'dired-x) | ||
(add-hook 'dired-mode-hook | ||
(lambda () | ||
(setq dired-omit-files-p t) | ||
(setq dired-omit-extensions '("~" ".o" ".a" ".la" ".toc" ".aux" ".log")) | ||
(setq dired-omit-files "^\\.") | ||
)) | ||
|
||
;;java | ||
(require 'cc-mode) | ||
(add-hook 'java-mode-hook (lambda () | ||
(setq c-basic-offset 4) | ||
(c-set-offset 'substatement-open 0) | ||
(c-set-offset 'statement-cont 0) | ||
)) | ||
|
||
(defun emacspeak-speak-shell-command-output (&optional output) | ||
(emacspeak-auditory-icon 'task-done) | ||
(cond | ||
((or (stringp output) (bufferp output)) nil) | ||
((not output) | ||
(let ((buffer (get-buffer "*Shell Command Output*"))) | ||
(when buffer | ||
(with-current-buffer buffer | ||
(if (= (point-min) (point-max)) | ||
(dtk-speak (current-message)) | ||
(emacspeak-speak-region (point-min) (min (point-max) 8192)) | ||
(when (> (point-max) 8192) | ||
(emacspeak-queue-auditory-icon 'ellipses))))))) | ||
(:else | ||
(if (= (point) (mark 'force)) | ||
(dtk-speak "Empty output") | ||
(emacspeak-speak-region (point) (min (mark 'force) (+ (point) 8192))) | ||
(when (> (mark 'force) (+ (point) 8192)) | ||
(emacspeak-queue-auditory-icon 'ellipses)))))) | ||
|
||
(defadvice shell-command (around emacspeak activate) | ||
(let ((emacspeak-speak-messages nil)) | ||
ad-do-it) | ||
(when (called-interactively-p 'interactive) | ||
(emacspeak-speak-shell-command-output (ad-get-arg 1)))) | ||
|
||
(defadvice dired-do-shell-command (around emacspeak activate) | ||
(let ((emacspeak-speak-messages nil)) | ||
ad-do-it) | ||
(when (called-interactively-p 'interactive) | ||
(emacspeak-speak-shell-command-output))) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# An example entry for gmail.com: | ||
#poll pop.gmail.com port 995 proto POP3 user '[email protected]' pass 'example' ssl | ||
|
||
# An example entry for yandex.ru: | ||
#poll pop3.yandex.ru proto POP3 user '[email protected]' pass 'example' ssl sslcertck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
"pactl set-sink-volume @DEFAULT_SINK@ -10%" | ||
XF86AudioLowerVolume | ||
"pactl set-sink-volume @DEFAULT_SINK@ +10%" | ||
XF86AudioRaiseVolume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/bin/bash -e | ||
# Copyright 2022 Michael Pozhidaev <[email protected]> | ||
# Copyright 2015 Roman Volovodov <[email protected]> | ||
|
||
THIS="${0##*/}" | ||
|
||
# The log location | ||
LOG=/tmp/luwrain-install.log | ||
|
||
# Where we expecting the live CD squashfs image to be | ||
SQUASH_SRC=/cdrom/casper/filesystem.squashfs | ||
|
||
# Where we want the newly installed system to be, the values will be taken from the command line | ||
TARGET_GRUB_DEVICE='' | ||
TARGET_ROOT_DEV='' | ||
ESP_DEVICE='' | ||
|
||
print_help() | ||
{ | ||
cat <<EOF | ||
$THIS: The LUWRAIN installer | ||
Usage: | ||
$THIS [--help] [--root DEVICE] [--boot DEVICE] | ||
Options: | ||
--boot DEVICE - where you want the GRUB loader to be installed | ||
--root DEVICE - what partition must be used for the root filesystem (be careful, will be formatted) | ||
EOF | ||
} | ||
|
||
while [ -n "$1" ]; do | ||
if [ "$1" == --help ]; then | ||
print_help | ||
exit 0 | ||
elif [ "$1" == --boot ]; then | ||
TARGET_GRUB_DEVICE="$2" | ||
shift | ||
shift | ||
elif [ "$1" == --root ]; then | ||
TARGET_ROOT_DEV="$2" | ||
shift | ||
shift | ||
elif [ "$1" == --esp ]; then | ||
ESP_DEVICE="$2" | ||
shift | ||
shift | ||
else | ||
echo "$THIS: unknown command line option: $1:" >&2 | ||
exit 1 | ||
fi | ||
done | ||
|
||
[ -z "$TARGET_ROOT_DEV" ] && echo "$THIS: No root partition" >&2 && exit 1 | ||
[ -z "$TARGET_GRUB_DEVICE" ] && echo "$THIS: No grub destination device" >&2 && exit 1 | ||
|
||
if ! [ -e "$TARGET_ROOT_DEV" ]; then | ||
echo "$THIS: The root device $TARGET_ROOT_DEV does not exist" >&2 | ||
exit 1 | ||
fi | ||
|
||
if ! [ -e "$TARGET_GRUB_DEVICE" ]; then | ||
echo "$THIS: The grub destination device $TARGET_GRUB_DEVICE does not exist" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -n "$ESP_DEVICE" ] && ! [ -e "$ESP_DEVICE" ]; then | ||
echo "$THIS: The ESP device $ESP_DEVICE does not exist" >&2 | ||
exit 1 | ||
fi | ||
|
||
# Where we want the root filesystem to be mounted | ||
TARGET_MOUNT=$(mktemp -d) | ||
|
||
# Where we want to get squashfs image mounted | ||
SQUASH_MOUNT=$(mktemp -d) | ||
|
||
umount $TARGET_ROOT_DEV &> /dev/null ||: | ||
rm -f $LOG | ||
|
||
echo Formatting the root filesystem "($TARGET_ROOT_DEV)" | ||
mkfs.ext4 "$TARGET_ROOT_DEV" &>> $LOG | ||
tune2fs -c 0 "$TARGET_ROOT_DEV" &>> $LOG | ||
tune2fs -i 0 "$TARGET_ROOT_DEV" &>> $LOG | ||
mount $TARGET_ROOT_DEV $TARGET_MOUNT &>> $LOG | ||
mount $SQUASH_SRC $SQUASH_MOUNT &>> $LOG | ||
echo Copying files | ||
cp -afd $SQUASH_MOUNT/. $TARGET_MOUNT/ &>> $LOG | ||
echo Adding new fstab entries | ||
TARGET_ROOT_UUID="UUID=$(blkid "$TARGET_ROOT_DEV" | sed s/'^.*UUID="\([^"]*\)".*$'/'\1'/)" | ||
echo $TARGET_ROOT_DEV / ext4 noatime,errors=remount-ro 0 1 >> $TARGET_MOUNT/etc/fstab | ||
if [ -n "$ESP_DEVICE" ]; then | ||
echo "Adding ESP entry at $ESP_DEVICE" | ||
echo $ESP_DEVICE /boot/efi vfat defaults,noatime,discard 0 1 >> $TARGET_MOUNT/etc/fstab | ||
fi | ||
|
||
echo Installing grub | ||
for a in dev dev/pts sys proc; do mount --bind /$a $TARGET_MOUNT/$a &>> $LOG; done | ||
if [ -n "$ESP_DEVICE" ]; then | ||
mkdir $TARGET_MOUNT/boot/efi | ||
mount $ESP_DEVICE $TARGET_MOUNT/boot/efi | ||
fi | ||
grub-install --root-directory=$TARGET_MOUNT $TARGET_GRUB_DEVICE >> $LOG | ||
chroot $TARGET_MOUNT grub-mkconfig -o /boot/grub/grub.cfg &>> $LOG | ||
if [ -n "$ESP_DEVICE" ]; then | ||
umount $TARGET_MOUNT/boot/efi | ||
fi | ||
for a in dev/pts dev sys proc; do umount $TARGET_MOUNT/$a >> $LOG; done | ||
|
||
echo '127.0.0.1 localhost.localdomain localhost' >> $TARGET_MOUNT/etc/hosts | ||
rm -rf $TARGET_MOUNT/sbin/lwr-install | ||
|
||
#if [[ ! -z $TARGET_SWAP_DEV ]]; then | ||
# echo $TARGET_SWAP_DEV none swap defaults 0 0 >> $TARGET_MOUNT/etc/fstab | ||
#fi | ||
|
||
umount $TARGET_MOUNT $SQUASH_MOUNT &>> $LOG | ||
sync | ||
|
||
echo LUWRAIN has been successfully installed on your computer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash -e | ||
|
||
THIS="${0##*/}" | ||
|
||
[ -z "$1" ] && echo "$THIS:no Ubuntu image given" >&2 && exit 1 | ||
|
||
WORK="./tmp/image" | ||
CHROOT="$WORK/iso/chroot" | ||
DISK="$1" | ||
SQUASHFSSRC="$1/casper/filesystem.squashfs" | ||
|
||
echo Unpacking | ||
unsquashfs -d "$WORK" "$SQUASHFSSRC" > /dev/null | ||
mkdir -p "$WORK/iso/disk" | ||
cp -r "$DISK/." "$WORK/iso/disk" | ||
unsquashfs -d "$CHROOT" "$SQUASHFSSRC" > /dev/null | ||
df "$CHROOT" | ||
|
||
echo Preparing the image | ||
( | ||
#cp -r dist install "$WORK/iso" | ||
cp -r dist scripts/. "$WORK/iso" | ||
mount --bind /proc "$CHROOT/proc" | ||
chroot "$WORK" /iso/image-prepare | ||
umount "$CHROOT/proc" | ||
) &> /tmp/luwrain-iso.log | ||
|
||
echo Packing the image | ||
( | ||
rm -f "$WORK/iso/disk/casper/filesystem.squashfs" | ||
chroot "$WORK" /iso/image-pack | ||
cp "$WORK/iso/luwrain.iso" luwrain.iso | ||
) &>> /tmp/luwrain-iso.log | ||
|
||
echo 'OK!' |
Oops, something went wrong.