LoginSignup
6
6

More than 5 years have passed since last update.

rc.localでスタートアップ設定やtty1に自動ログインなど

Last updated at Posted at 2013-08-12

CUI派向け。

スタートアップ設定方法

OS起動後に実行したいプログラムを記載するには

/etc/rc.local
chvt 1  # tty1に切り替え
exit 0

自動ログイン

/etc/init/tty1.conf
respawn
#exec /sbin/getty -8 38400 tty1
exec /sbin/agetty -a <username> tty1

ログインとともにfbtermを実行

参考

CURRENT_TTY=$(tty)
if [ ${CURRENT_TTY/0-9/} = /dev/tty ]; then
    fbterm
fi

[fbterm]can’t change kernel keymap table, ...

  • can’t change kernel keymap table, all shortcuts will NOT work, see SECURITY NOTES section of man page for solution. と表示された時の対応
$ chmod u+s /usr/bin/fbterm

topやtailを流すにはこちらを参考

dircolors

$ dircolors -p > $HOME/.dir_colors
$ sed -i -e 's/DIR 01;34/DIR 01;33/'  $HOME/.dir_colors 
$ eval $($HOME/.dir_colors)
$ ls -al

ログインとともにXを起動

.bashrc
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
    startx
fi
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6