[已解决]dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

最大的社区版本,Ubuntu的发源地
回复
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

[已解决]dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#1

帖子 科学之子 » 2017-05-04 6:09

dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

Fri May 5 20:17:35 CST 2017补充:
https://askubuntu.com/questions/776831/ ... om-magenta

代码: 全选

NEWT_COLORS='root=,black roottext=,black' dpkg-reconfigure tzdata
Mon Jul 16 04:58:00 CST 2018补充:
根据vickycq的提示用这个关键词再次搜出,当初具体用什么关键词搜出来的忘记了,不过估计也是同样的关键词
https://duckduckgo.com/?q=whiptail+color&t=ffsb&ia=web
上次由 科学之子 在 2018-07-16 4:58,总共编辑 2 次。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#2

帖子 vickycq » 2017-05-04 10:33

确定“对话框”程序用的是 whiptail 还是 dialog,再相应设置。也可以 dpkg-reconfigure debconf 使用 Readline 界面替代“对话框”。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#3

帖子 科学之子 » 2017-05-05 12:42

vickycq 写了:确定“对话框”程序用的是 whiptail 还是 dialog,再相应设置。也可以 dpkg-reconfigure debconf 使用 Readline 界面替代“对话框”。
试过用mount -B把Ubuntu的目录绑定到debian的目录上,但dpkg-reconfigure颜色还是没变化,猜测和这些文件无关?

代码: 全选

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=216647,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=407228k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=21,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /home/username/tmp type tmpfs (rw,relatime,size=3145728k)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,noexec,relatime,user)
tmpfs on /run/user/107 type tmpfs (rw,nosuid,nodev,relatime,size=203616k,mode=700,uid=107,gid=113)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=203616k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda5 on /media/username/283d8731-afc9-43f8-b111-43307d8080dd type ext4 (rw,relatime,data=ordered,uhelper=udisks2)
/dev/mapper/vbox on /media/username/76c52093-f54e-48a7-b4b2-994c0adf7706 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sda5 on /usr/share/perl5/Debconf type ext4 (rw,relatime,data=ordered)
/dev/sda6 on /usr/sbin/dpkg-reconfigure type ext4 (rw,relatime,data=ordered)
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#4

帖子 vickycq » 2017-05-05 15:03

科学之子 写了: /dev/sda5 on /usr/share/perl5/Debconf type ext4 (rw,relatime,data=ordered)
/dev/sda6 on /usr/sbin/dpkg-reconfigure type ext4 (rw,relatime,data=ordered)
我这里默认用的是 whiptail,不过如何修改 whiptail 的背景色还没搞清楚。您可以通过环境变量
DEBCONF_FORCE_DIALOG=1 使用 dialog 替代 whiptail,并通过 /etc/dialogrc 配置 dialog 的背景色。您可以使用 dialog --create-rc /etc/dialogrc 生成默认配置,再修改其中的值
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#5

帖子 科学之子 » 2017-05-05 16:24

vickycq 写了:
科学之子 写了: /dev/sda5 on /usr/share/perl5/Debconf type ext4 (rw,relatime,data=ordered)
/dev/sda6 on /usr/sbin/dpkg-reconfigure type ext4 (rw,relatime,data=ordered)
我这里默认用的是 whiptail,不过如何修改 whiptail 的背景色还没搞清楚。您可以通过环境变量
DEBCONF_FORCE_DIALOG=1 使用 dialog 替代 whiptail,并通过 /etc/dialogrc 配置 dialog 的背景色。您可以使用 dialog --create-rc /etc/dialogrc 生成默认配置,再修改其中的值
我这里默认用的是 whiptail
您是如何判断出默认使用的是"whiptail"?
Fri May 5 16:27:15 CST 2017补充:
这样跟踪出来了:

代码: 全选

sudo strace -o ./strace_out -f -e trace=process dpkg-reconfigure tzdata
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: dpkg-reconfigure询问时的背景颜色如何设置?纯蓝感觉很刺眼

#6

帖子 vickycq » 2017-05-05 16:32

科学之子 写了:您是如何判断出默认使用的是"whiptail"?
您可以运行 dpkg-reconfigure,同时使用 pstree 找出它的子进程。由于之前并没有设置过,推测这是默认行为
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
回复