Wed Feb 22, 2017 2:50 am
Wed Feb 22, 2017 4:05 am
apt-get remove localepurge asunder man-db
apt -u --reinstall --fix-missing install $(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '\n' | sort -u)
apt install asunder man-db
apt-install locales-all
Wed Feb 22, 2017 5:07 pm
#!/bin/bash
# live-hook script to fix lightdm locale bug
# name: lightdm-fix-hook (or whatever you prefer)
#
# Put it somewhere accessable and invoke e.g. like this:
# hooks=file:///lib/live/mount/medium/lightdm-fix-hook
cat <<'EOF' > /#etc/X11/Xsession.d/21-lightdm-language-fix
# workaround for session language selection in lightdm greeter
# we need this only if lightdm is being used
if pidof lightdm
then
# use Language setting from ~/.dmrc
export LANG=`cat "$HOME/.dmrc" | grep '^Language=' | cut -d '=' -f 2- | sed 's/utf8/UTF-8/'`
# if $LANGUAGE is set, sync it with chosen locale
[ -n "$LANGUAGE" ] && export LANGUAGE=`echo $LANG | cut -d '.' -f 1`:`echo -n $LANG | cut -d '.' -f 1 | cut -d '_' -f 1`
# remove untrustworthy $GDM_LANG
[ -n "$GDM_LANG" ] && unset GDM_LANG
fi
EOF
chmod 755 /#etc/X11/Xsession.d/21-lightdm-language-fix
rm -f /home/user/.dmrc
exit 0
Wed Feb 22, 2017 11:29 pm
cp /lib/live/mount/medium/c-refracta8_xfce_i386-20170218_2229/refracta /etc/init.d/
ln -s /init.d/refracta /etc/rc2.d/S98refracta
ln -s /init.d/refracta /etc/rc3.d/S98refracta
ln -s /init.d/refracta /etc/rc4.d/S98refracta
ln -s /init.d/refracta /etc/rc5.d/S98refracta
ln -s /init.d/refracta /etc/rc0.d/K01refracta
ln -s /init.d/refracta /etc/rc1.d/K01refracta
ln -s /init.d/refracta /etc/rc6.d/K01refracta
#! /bin/sh
### BEGIN INIT INFO
# Provides: refracta
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Refracta configuration
# Description: Refracta live configuration
### END INIT INFO
/lib/live/mount/medium/refracta8_xfce_i386-20170218_2229
#!/bin/bash
my_log=/tmp/$(basename $0).log
# Do not execute again when restarting X
[ -f $my_log ] && exit
touch $my_log
# Jelentések, hibaüzenetek átírányítása naplóba
# Redirect STDOUT file descriptor to log file
exec 1>>$my_log
# Redirect STDERR to log file
exec 2>>$my_log
echo "Executing all executable SH files in {1..3} subdirectories"
for i in {1..3}
do
for f in $(dirname $(realpath $0))/c-$(basename $0)/$i/*.sh
do
[ -f $f ] && [ -x $f ] && echo -e "\n$(date +"%F %T")\n$f" && $f
done
done
echo -e "\nAll done"
[[ $(echo $DISPLAY) = "" ]] || xmessage -timeout 2 "Refracta configuration executed"
exit 0
$ file /etc/rc3.d/S98refracta
/etc/rc3.d/S98refracta: broken symbolic link to /init.d/refracta
echo "/lib/live/mount/medium/refracta8_xfce_i386-20170218_2229" >> /etc/init.d/rc.local
wlan0 Interface doesn't support scanning : Network is down
ln -s /lib/live/mount/medium/c-refracta8_xfce_i386-20170218_2229/r.desktop /home/user/.config/autostart/r.desktop
[Desktop Entry]
Exec=/lib/live/mount/medium/refracta8_xfce_i386-20170218_2229
menuentry 'refracta8_xfce_i386-20170218_2229 hu-lang london hooks' {
set OS=refracta8_xfce_i386-20170218_2229
linux /boot/$OS/live/vmlinuz bootfrom=/dev/sda1 live-media-path=/boot/$OS/live/ \
boot=live lang=hu_HU timezone=Europe/London noeject noprompt quiet \
hooks=file:///lib/live/mount/medium/c-refracta8_xfce_i386-20170218_2229/hooks
initrd /boot/$OS/live/initrd.img
}
Thu Feb 23, 2017 1:15 am
Thu Feb 23, 2017 3:47 am
Though I use only live systems I never heard about the possibility of setting the behaviour of a live system by passing hook-boot-options and using hook scripts. I did a Google search and didn't find any information. Is there any tutorial, link about this?
Sun Feb 26, 2017 12:51 am
Sun Feb 26, 2017 11:50 am
I'm using autologin in the live sessions, so the only way to change language without rebooting is to edit /etc/default/locale.
In an install, using Xsession.d/21-lightdm-language-fix allows me to change language at the lightdm login screen. However, it does not go back to the defualt language if I log out and log in again, unless I remove .dmrc first.
Sun Feb 26, 2017 12:06 pm
In an install, using Xsession.d/21-lightdm-language-fix allows me to change language at the lightdm login screen. However, it does not go back to the defualt language if I log out and log in again, unless I remove .dmrc first.
What happens if you reset it in the greeter? It should do what you set. I don't have install with lightdm available today, to test that.
Sun Feb 26, 2017 12:16 pm
Check permissions on lightdm-language-fix (755?), I had a problem using cp.