this answer で述べたように、/etc/default/saned
でRUN
をyes
に設定したい。
ファイルのスニペットは次のとおりです。
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=no
# Set to the user saned should run as
RUN_AS_USER=saned
Tty1ターミナル内からsanedファイルを編集するにはどうすればよいですか?
Tty1に切り替えます Ctrl+Alt+F1 そしてログイン。
でファイルを編集します
Sudo nano /etc/default/saned
Ctrl+O 保存して Ctrl+X エディターを終了します。
または、以下の短いコマンドを使用してください…
OK、@ heemaylにはsed
バージョンがあるため、Perlバージョンも必要です=)
Sudo Perl -i -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
例
開始状況
% cat /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=no
# Set to the user saned should run as
RUN_AS_USER=saned
aboettger-VirtualBox% Perl -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=no
# Set to the user saned should run as
RUN_AS_USER=saned
ドライラン
% Sudo Perl -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=yes
# Set to the user saned should run as
RUN_AS_USER=saned
aboettger-VirtualBox% Perl -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=yes
# Set to the user saned should run as
RUN_AS_USER=saned
交換
% Sudo Perl -i -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
最後の状況
% cat /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=yes
# Set to the user saned should run as
RUN_AS_USER=saned
aboettger-VirtualBox% Perl -pe 's/(^RUN=)no/$1yes/' /etc/default/saned
# Defaults for the saned initscript, from sane-utils
# Set to yes to start saned
RUN=yes
# Set to the user saned should run as
RUN_AS_USER=saned