You are not logged in.
I've spend some hours on getting boot messages in the plymouth screen (why? i don't know
)
You can find a howto for Ubuntu here, but this doesn't work for #!.
You can use the plymouth theme as described, but to get the boot messages you have to edit /lib/lsb/init-functions What i did was add the lines below to every echo command in the file and replaced the "#@" with the same options as the echo command.
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fiSo now my bootscreen is a 'decruftification services' wallpaper with scrolling boot messages on the left...
To change the color of the messages, you have to edit /usr/share/plymouth/themes/simple/simple.script and change this line:
// Create the image for the latest message
lines[i] = Image.Text(text, 0, 0, 0);Tuna
Last edited by Tunafish (2011-01-23 23:55:01)
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
Nice tip, thank you for sharing! 
Offline
Nice tip, thank you for sharing!
Thanks, but well... it doesn't look all nice and shiny yet. I can only change the color of the font. And every piece of output gets its own line:
Setting kernel variables...
Done
But this could be a start to have plymouth display warnings and errors.
Am i right /lib/lsb/init-functions is the file responsible for output?
(and not /usr/share/initramfs-tools/scripts/functions, which is in ubuntu).
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
I much prefer this type of output. Staring at a static screen with a line on it after you've been tinkering is too nerve-wracking!
Offline
I've been trying to get this working but I'm kinda confused. Part of the problem is that I can't really test out if it's working or not without completely restarting my system because when I try and preview the splash screen via terminal it just full screens it and I have to blindly pull up a console and type in init 0 to restart and get back into a window manager. Anyone know why this happens? It's only like that on my laptop.
Offline
I've been trying to get this working but I'm kinda confused. Part of the problem is that I can't really test out if it's working or not without completely restarting my system because when I try and preview the splash screen via terminal it just full screens it and I have to blindly pull up a console and type in init 0 to restart and get back into a window manager. Anyone know why this happens? It's only like that on my laptop.
To quit 'plymouth --show-splash', you have to enter the 'plymouth --quit' command. But when you're watching the splash screen you can't enter any command, so you have to do it in advance:
sudo plymouth --show-splash && sleep 5s && sudo plymouth --quit &I made a small script to test the 'simple' theme:
#! /bin/bash
sudo plymouthd
sudo plymouth-set-default-theme simple
sudo plymouth --show-splash
sudo plymouth update --status='first sentence'
sleep 1s
sudo plymouth update --status='i'
sudo plymouth update --status='hope'
sudo plymouth update --status='this'
sudo plymouth update --status='works'
sudo plymouth update --status='i'
sudo plymouth update --status='hope'
sudo plymouth update --status='this'
sudo plymouth update --status='works'
sleep 2s
sudo plymouth update --status='i'
sudo plymouth update --status='hope'
sudo plymouth update --status='this'
sudo plymouth update --status='works'
sudo plymouth update --status='last sentence'
sleep 2s
sudo plymouth --quitThere's a bug in this testing mode: it sometimes gives two small screens instead of the full screen. Don't worry, it's not in the final boot screen.
Tuna
Last edited by Tunafish (2011-01-25 16:18:48)
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
I made another plymouth theme: http://crunchbanglinux.org/forums/post/104847/
sed 's/stress/relaxation/g'
Privacy & Security on #!
Offline
Help I am in trouble. I misunderstood the instruction. Now I can't get back into the system.
I used alt key and F2 key to get tty2. Here is what it display:
CrunchBang Linux staler (none) tty2
(none) login:
My localhost name should be x61!! but now it call itself (none) or can't resolve it's own name.
I tried to remove the changes in the file. But I only got only read-only file system access.
how can I edit that file? I don't want to reinstall #! again. I have installed and configure so much already.
Please help
Last edited by kowloonboy (2011-10-20 14:57:28)
"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee
Offline
Hi kowloonboy: you could try booting your system in a "live session". Did you install Crunchbang from a CD or USB stick? Start up your computer with that inserted and choose "live session" from the boot menu. When the live Crunchbang is running you can open a terminal, temporarily mount your hard disk and edit the files you modified. (If you have backup copies of the original files it will be easier.)
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Can you explain how exactly you ended up in that situation. Perhaps the somebody can help.
bootinfoscript - emacs primer - I ♥ #!
Offline
Hi kowloonboy: you could try booting your system in a "live session". Did you install Crunchbang from a CD or USB stick? Start up your computer with that inserted and choose "live session" from the boot menu. When the live Crunchbang is running you can open a terminal, temporarily mount your hard disk and edit the files you modified. (If you have backup copies of the original files it will be easier.)
Thanks, I will give it a try when I get home. When you said when the live crunchbang is running, I can open terminal. Do you mean that when the #! Is booting, or finish booting? When I try using the terminal?
"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee
Offline
when live #! is running. can you launch stuff while the system is booting? that would be pretty impressive, right? so after it finishes booting, and the system is loaded, you can open a terminal.
Offline
johnraff: Thanks I got my #! system back.
Can you explain how exactly you ended up in that situation. Perhaps the somebody can help.
I edited the -> /lib/lsb/init-functions
start_daemon () {
local force nice pidfile exec args
force=""
nice=0
pidfile=/dev/null
OPTIND=1
while getopts fn:p: opt ; do
case "$opt" in
f) force="force";;
n) nice="$OPTARG";;
p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
if [ "$1" = '--' ]; then
shift
fi
exec="$1"; shift
args="--start --nicelevel $nice --quiet --oknodo"
if [ "$force" ]; then
/sbin/start-stop-daemon $args \
--chdir "$PWD" --startas $exec --pidfile /dev/null -- "$@"
elif [ $pidfile ]; then
/sbin/start-stop-daemon $args \
--chdir "$PWD" --exec $exec --oknodo --pidfile "$pidfile" -- "$@"
else
/sbin/start-stop-daemon $args --chdir "$PWD" --exec $exec -- "$@"
fi
}
pidofproc () {
local pidfile line status specified pid
pidfile=
specified=
OPTIND=1
while getopts p: opt ; do
case "$opt" in
p) pidfile="$OPTARG"
specified="specified"
;;
esac
done
shift $(($OPTIND - 1))
base=${1##*/}
if [ ! "$specified" ]; then
pidfile="/var/run/$base.pid"
fi
if [ -n "${pidfile:-}" ] && [ -r "$pidfile" ]; then
read pid < "$pidfile"
if [ -n "${pid:-}" ]; then
if $(kill -0 "${pid:-}" 2> /dev/null); then
echo "$pid"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
return 0
elif ps "${pid:-}" >/dev/null 2>&1; then
echo "$pid"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
return 0 # program is running, but not owned by this user
else
return 1 # program is dead and /var/run pid file exists
fi
fi
fi
if [ -x /bin/pidof ] && [ ! "$specified" ]; then
status="0"
/bin/pidof -o %PPID -x $1 || status="$?"
if [ "$status" = 1 ]; then
return 3 # program is not running
fi
return 0
fi
if [ "$specified" ]; then
return 3 # almost certain it's not running
fi
return 4 # Unable to determine status
}
# start-stop-daemon uses the same algorithm as "pidofproc" above.
killproc () {
local pidfile sig status base name_param is_term_sig
pidfile=
name_param=
is_term_sig=
OPTIND=1
while getopts p: opt ; do
case "$opt" in
p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
base=${1##*/}
if [ ! $pidfile ]; then
name_param="--name $base --pidfile /var/run/$base.pid"
else
name_param="--pidfile $pidfile"
fi
sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/')
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
if [ -z "$sig" ] || [ "$sig" = 15 ] || [ "$sig" = TERM ]; then
is_term_sig="terminate_signal"
fi
status=0
if [ ! "$is_term_sig" ]; then
if [ -n "$sig" ]; then
/sbin/start-stop-daemon --stop --signal "$sig" \
--quiet $name_param || status="$?"
else
/sbin/start-stop-daemon --stop \
--quiet $name_param || status="$?"
fi
else
/sbin/start-stop-daemon --stop --quiet \
--oknodo $name_param || status="$?"
fi
if [ "$status" = 1 ]; then
if [ -n "$sig" ]; then
return 0
fi
return 3 # program is not running
fi
if [ "$status" = 0 ] && [ "$is_term_sig" ] && [ "$pidfile" ]; then
pidofproc -p "$pidfile" "$1" >/dev/null || rm -f "$pidfile"
fi
return 0
}
# Return LSB status
status_of_proc () {
local pidfile daemon name status
pidfile=
OPTIND=1
while getopts p: opt ; do
case "$opt" in
p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
if [ -n "$pidfile" ]; then
pidfile="-p $pidfile"
fi
daemon="$1"
name="$2"
status="0"
pidofproc $pidfile $daemon >/dev/null || status="$?"
if [ "$status" = 0 ]; then
log_success_msg "$name is running"
return 0
elif [ "$status" = 4 ]; then
log_failure_msg "could not access PID file for $name"
return $status
else
log_failure_msg "$name is not running"
return $status
fi
}
log_use_fancy_output () {
TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -t 1 ] &&
[ "x${TERM:-}" != "x" ] &&
[ "x${TERM:-}" != "xdumb" ] &&
[ -x $TPUT ] && [ -x $EXPR ] &&
$TPUT hpa 60 >/dev/null 2>&1 &&
$TPUT setaf 1 >/dev/null 2>&1
then
[ -z $FANCYTTY ] && FANCYTTY=1 || true
else
FANCYTTY=0
fi
case "$FANCYTTY" in
1|Y|yes|true) true;;
*) false;;
esac
}
log_success_msg () {
if [ -n "${1:-}" ]; then
log_begin_msg $@
fi
log_end_msg 0
}
log_failure_msg () {
if [ -n "${1:-}" ]; then
log_begin_msg $@ "..."
fi
log_end_msg 1 || true
}
log_warning_msg () {
if [ -n "${1:-}" ]; then
log_begin_msg $@ "..."
fi
log_end_msg 255 || true
}
#
# NON-LSB HELPER FUNCTIONS
#
# int get_lsb_header_val (char *scriptpathname, char *key)
get_lsb_header_val () {
if [ ! -f "$1" ] || [ -z "${2:-}" ]; then
return 1
fi
LSB_S="### BEGIN INIT INFO"
LSB_E="### END INIT INFO"
sed -n "/$LSB_S/,/$LSB_E/ s/# $2: \(.*\)/\1/p" $1
}
# int log_begin_message (char *message)
log_begin_msg () {
if [ -z "${1:-}" ]; then
return 1
fi
/bin/echo -n "$@"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
}
# Sample usage:
# log_daemon_msg "Starting GNOME Login Manager" "gdm"
#
# On Debian, would output "Starting GNOME Login Manager: gdm"
# On Ubuntu, would output " * Starting GNOME Login Manager..."
#
# If the second argument is omitted, logging suitable for use with
# log_progress_msg() is used:
#
# log_daemon_msg "Starting remote filesystem services"
#
# On Debian, would output "Starting remote filesystem services:"
# On Ubuntu, would output " * Starting remote filesystem services..."
log_daemon_msg () {
if [ -z "${1:-}" ]; then
return 1
fi
log_daemon_msg_pre "$@"
if [ -z "${2:-}" ]; then
/bin/echo -n "$1:"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
return
fi
/bin/echo -n "$1: $2"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
log_daemon_msg_post "$@"
}
# #319739
#
# Per policy docs:
#
# log_daemon_msg "Starting remote file system services"
# log_progress_msg "nfsd"; start-stop-daemon --start --quiet nfsd
# log_progress_msg "mountd"; start-stop-daemon --start --quiet mountd
# log_progress_msg "ugidd"; start-stop-daemon --start --quiet ugidd
# log_end_msg 0
#
# You could also do something fancy with log_end_msg here based on the
# return values of start-stop-daemon; this is left as an exercise for
# the reader...
#
# On Ubuntu, one would expect log_progress_msg to be a no-op.
log_progress_msg () {
if [ -z "${1:-}" ]; then
return 1
fi
/bin/echo -n " $@"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
}
# int log_end_message (int exitstatus)
log_end_msg () {
# If no arguments were passed, return
if [ -z "${1:-}" ]; then
return 1
fi
local retval
retval=$1
log_end_msg_pre "$@"
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
if log_use_fancy_output; then
RED=$( $TPUT setaf 1)
YELLOW=$( $TPUT setaf 3)
NORMAL=$( $TPUT op)
else
RED=''
YELLOW=''
NORMAL=''
fi
if [ $1 -eq 0 ]; then
echo "."
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
elif [ $1 -eq 255 ]; then
/bin/echo -e " ${YELLOW}(warning).${NORMAL}"if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
else
/bin/echo -e " ${RED}failed!${NORMAL}"if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
fi
log_end_msg_post "$@"
return $retval
}
log_action_msg () {
echo "$@."
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
}
log_action_begin_msg () {
/bin/echo -n "$@..."
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
}
log_action_cont_msg () {
/bin/echo -n "$@..."
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
}
log_action_end_msg () {
local end
log_action_end_msg_pre "$@"
if [ -z "${2:-}" ]; then
end="."
else
end=" ($2)."
fi
if [ $1 -eq 0 ]; then
echo "done${end}"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
else
if log_use_fancy_output; then
RED=$( $TPUT setaf 1)
NORMAL=$( $TPUT op)
/bin/echo -e "${RED}failed${end}${NORMAL}"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
else
echo "failed${end}"
if [ -x /bin/plymouth ]; then
/bin/plymouth update --status="$@"
fi
fi
fi
log_action_end_msg_post "$@"
}
# Hooks for /etc/lsb-base-logging.sh
log_daemon_msg_pre () { :; }
log_daemon_msg_post () { :; }
log_end_msg_pre () { :; }
log_end_msg_post () { :; }
log_action_end_msg_pre () { :; }
log_action_end_msg_post () { :; }
FANCYTTY=
[ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || trueI still love to get it to work, where did I go wrong?
Last edited by kowloonboy (2011-10-20 16:38:07)
"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.