AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-49592

Michael A's questions

Martin Hope
Michael A
Asked: 2024-10-17 05:57:53 +0800 CST

与 Debian 12 系统的远程桌面连接 (xrdp) 在连接后立即崩溃

  • 5

我有一个运行 xrdp 的 Debian 12 系统,我正尝试从 Windows 11 系统通过远程桌面连接到它。Debian 12 系统运行 Cinnamon 作为桌面环境。我已经安装了 xrdp、启动了服务、将 xrdp 用户添加到 ssl-cert 组、允许通过 ufw 的默认端口等。

sudo apt install xrdp
sudo adduser xrdp ssl-cert
sudo ufw allow 3389
sudo systemctl restart xrdp
<rebooted>

当我通过 Windows 远程桌面连接到 Debian 系统时,它在连接后立即崩溃/消失。我甚至没有进入 xorg 登录窗口或类似的东西。我的配置文件(如下)有问题吗?


这是我的/etc/xrdp.xrdp.ini:

[Globals]
; xrdp.ini file version number
ini_version=1

; fork a new process for each incoming connection
fork=true

; ports to listen on, number alone means listen on all interfaces
; 0.0.0.0 or :: if ipv6 is configured
; space between multiple occurrences
; ALL specified interfaces must be UP when xrdp starts, otherwise xrdp will fail to start
;
; Examples:
;   port=3389
;   port=unix://./tmp/xrdp.socket
;   port=tcp://.:3389                           127.0.0.1:3389
;   port=tcp://:3389                            *:3389
;   port=tcp://<any ipv4 format addr>:3389      192.168.1.1:3389
;   port=tcp6://.:3389                          ::1:3389
;   port=tcp6://:3389                           *:3389
;   port=tcp6://{<any ipv6 format addr>}:3389   {FC00:0:0:0:0:0:0:1}:3389
;   port=vsock://<cid>:<port>
port=3389

; 'port' above should be connected to with vsock instead of tcp
; use this only with number alone in port above
; prefer use vsock://<cid>:<port> above
use_vsock=false

; regulate if the listening socket use socket option tcp_nodelay
; no buffering will be performed in the TCP stack
tcp_nodelay=true

; regulate if the listening socket use socket option keepalive
; if the network connection disappear without close messages the connection will be closed
tcp_keepalive=true

; set tcp send/recv buffer (for experts)
#tcp_send_buffer_bytes=32768
#tcp_recv_buffer_bytes=32768

; security layer can be 'tls', 'rdp' or 'negotiate'
; for client compatible layer
security_layer=negotiate

; minimum security level allowed for client for classic RDP encryption
; use tls_ciphers to configure TLS encryption
; can be 'none', 'low', 'medium', 'high', 'fips'
crypt_level=high

; X.509 certificate and private key
; openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365
; note this needs the user xrdp to be a member of the ssl-cert group, do with e.g.
;$ sudo adduser xrdp ssl-cert
certificate=
key_file=

; set SSL protocols
; can be comma separated list of 'SSLv3', 'TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3'
ssl_protocols=TLSv1.2, TLSv1.3
; set TLS cipher suites
#tls_ciphers=HIGH

; concats the domain name to the user if set for authentication with the separator
; for example when the server is multi homed with SSSd
#domain_user_separator=@

; The following options will override the keyboard layout settings.
; These options are for DEBUG and are not recommended for regular use.
#xrdp.override_keyboard_type=0x04
#xrdp.override_keyboard_subtype=0x01
#xrdp.override_keylayout=0x00000409

; Section name to use for automatic login if the client sends username
; and password. If empty, the domain name sent by the client is used.
; If empty and no domain name is given, the first suitable section in
; this file will be used.
autorun=

allow_channels=true
allow_multimon=true
bitmap_cache=true
bitmap_compression=true
bulk_compression=true
#hidelogwindow=true
max_bpp=32
new_cursors=true
; fastpath - can be 'input', 'output', 'both', 'none'
use_fastpath=both
; when true, userid/password *must* be passed on cmd line
#require_credentials=true
; when true, the userid will be used to try to authenticate
#enable_token_login=true
; You can set the PAM error text in a gateway setup (MAX 256 chars)
#pamerrortxt=change your password according to policy at http://url

;
; colors used by windows in RGB format
;
blue=009cb5
grey=dedede
#black=000000
#dark_grey=808080
#blue=08246b
#dark_blue=08246b
#white=ffffff
#red=ff0000
#green=00ff00
#background=626c72

;
; configure login screen
;

; Login Screen Window Title
#ls_title=My Login Title

; top level window background color in RGB format
ls_top_window_bg_color=009cb5

; width and height of login screen
;
; The default height allows for about 5 fields to be comfortably displayed
; above the buttons at the bottom. To display more fields, make <ls_height>
; larger, and also increase <ls_btn_ok_y_pos> and <ls_btn_cancel_y_pos>
; below
;
ls_width=350
ls_height=430

; login screen background color in RGB format
ls_bg_color=dedede

; optional background image filename. BMP format is always supported,
; but other formats will be supported if xrdp is build with imlib2
; The transform can be one of the following:-
;     none  : No transformation. Image is placed in bottom-right corner
;             of the screen.
;     scale : Image is scaled to the screen size. The image aspect
;             ratio is not preserved.
;     zoom  : Image is scaled to the screen size. The image aspect
;             ratio is preserved by clipping the image.
#ls_background_image=
#ls_background_transform=none

; logo
; full path to file or file in shared folder. BMP format is always supported,
; but other formats will be supported if xrdp is build with imlib2
; For transform values, see 'ls_background_transform'. The logo width and
; logo height are ignored for a transform of 'none'.
ls_logo_filename=
#ls_logo_transform=none
#ls_logo_width=240
#ls_logo_height=140
ls_logo_x_pos=55
ls_logo_y_pos=50

; for positioning labels such as username, password etc
ls_label_x_pos=30
ls_label_width=65

; for positioning text and combo boxes next to above labels
ls_input_x_pos=110
ls_input_width=210

; y pos for first label and combo box
ls_input_y_pos=220

; OK button
ls_btn_ok_x_pos=142
ls_btn_ok_y_pos=370
ls_btn_ok_width=85
ls_btn_ok_height=30

; Cancel button
ls_btn_cancel_x_pos=237
ls_btn_cancel_y_pos=370
ls_btn_cancel_width=85
ls_btn_cancel_height=30

[Logging]
; Note: Log levels can be any of: core, error, warning, info, debug, or trace
LogFile=xrdp.log
LogLevel=INFO
EnableSyslog=true
#SyslogLevel=INFO
#EnableConsole=false
#ConsoleLevel=INFO
#EnableProcessId=false

[LoggingPerLogger]
; Note: per logger configuration is only used if xrdp is built with
; --enable-devel-logging
#xrdp.c=INFO
#main()=INFO

[Channels]
; Channel names not listed here will be blocked by XRDP.
; You can block any channel by setting its value to false.
; IMPORTANT! All channels are not supported in all use
; cases even if you set all values to true.
; You can override these settings on each session type
; These settings are only used if allow_channels=true
rdpdr=true
rdpsnd=true
drdynvc=true
cliprdr=true
rail=true
xrdpvr=true
tcutils=true

; for debugging xrdp, in section xrdp1, change port=-1 to this:
#port=/tmp/.xrdp/xrdp_display_10


;
; Session types
;

; Some session types such as Xorg, X11rdp and Xvnc start a display server.
; Startup command-line parameters for the display server are configured
; in sesman.ini. See and configure also sesman.ini.
[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20

[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
#xserverbpp=24
#delay_ms=2000
; Disable requested encodings to support buggy VNC servers
; (1 = ExtendedDesktopSize)
#disabled_encodings_mask=0
; Use this to connect to a chansrv instance created outside of sesman
; (e.g. as part of an x11vnc console session). Replace '0' with the
; display number of the session
#chansrvport=DISPLAY(0)

; Generic VNC Proxy
; Tailor this to specific hosts and VNC instances by specifying an ip
; and port and setting a suitable name.
[vnc-any]
name=vnc-any
lib=libvnc.so
ip=ask
port=ask5900
username=na
password=ask
#pamusername=asksame
#pampassword=asksame
#pamsessionmng=127.0.0.1
#delay_ms=2000

; Generic RDP proxy using NeutrinoRDP
; Tailor this to specific hosts by specifying an ip and port and setting
; a suitable name.
[neutrinordp-any]
name=neutrinordp-any
; To use this section, you should build xrdp with configure option
; --enable-neutrinordp.
lib=libxrdpneutrinordp.so
ip=ask
port=ask3389
username=ask
password=ask
; Uncomment the following lines to enable PAM authentication for proxy
; connections.
#pamusername=ask
#pampassword=ask
#pamsessionmng=127.0.0.1
; Currently NeutrinoRDP doesn't support dynamic resizing. Uncomment
; this line if you're using a client which does.
#enable_dynamic_resizing=false
; By default, performance settings requested by the RDP client are ignored
; and chosen by NeutrinoRDP. Uncomment this line to allow the user to
; select performance settings in the RDP client.
#perf.allow_client_experiencesettings=true
; Override any experience setting by uncommenting one or more of the
; following lines.
#perf.wallpaper=false
#perf.font_smoothing=false
#perf.desktop_composition=false
#perf.full_window_drag=false
#perf.menu_anims=false
#perf.themes=false
#perf.cursor_blink=false
; By default NeutrinoRDP supports cursor shadows. If this is giving
; you problems (e.g. cursor is a black rectangle) try disabling cursor
; shadows by uncommenting the following line.
#perf.cursor_shadow=false
; By default, NeutrinoRDP uses the keyboard layout of the remote RDP Server.
; If you want to tell the remote the keyboard layout of the RDP Client,
; by uncommenting the following line.
#neutrinordp.allow_client_keyboardLayout=true
; The following options will override the remote keyboard layout settings.
; These options are for DEBUG and are not recommended for regular use.
#neutrinordp.override_keyboardLayout_mask=0x0000FFFF
#neutrinordp.override_kbd_type=0x04
#neutrinordp.override_kbd_subtype=0x01
#neutrinordp.override_kbd_fn_keys=12
#neutrinordp.override_kbd_layout=0x00000409

; You can override the common channel settings for each session type
#channel.rdpdr=true
#channel.rdpsnd=true
#channel.drdynvc=true
#channel.cliprdr=true
#channel.rail=true
#channel.xrdpvr=true

我的~/.xsession文件:

cinnamon-session-cinnamon

我的/etc/xrdp/startwm.sh文件:

#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
cinnamon-session-cinnamon
debian
  • 1 个回答
  • 27 Views
Martin Hope
Michael A
Asked: 2023-11-09 23:30:14 +0800 CST

在 Debian 12 (bookworm) 64 位上安装 libpng12 64 位在安装 Stata 16 时会出现多架构支持预依赖错误

  • 5

我正在尝试在 Debian 12“书虫”上安装Stata 16。Stata 需要libpng12,不幸的是,libpng存储库(版本 16)中的 不满足依赖性。我已经下载了 libpng12 deb 软件包,但是当我尝试安装它时,收到有关多架构支持的错误消息

dpkg: regarding libpng12-0_1.2.50-2+deb8u3_amd64.deb containing libpng12-0:amd64, pre-dependency problem:
 libpng12-0 pre-depends on multiarch-support
  multiarch-support is not installed.

dpkg: error processing archive libpng12-0_1.2.50-2+deb8u3_amd64.deb (--install):
 pre-dependency problem - not installing libpng12-0:amd64
Errors were encountered while processing:
 libpng12-0_1.2.50-2+deb8u3_amd64.deb

我的操作系统和软件包都是 64 位的,所以我不确定为什么这里需要多架构支持。我跑了dpkg --print-architecture一下,上面写着 amd64。我认为当前版本的 dpkg已经有了多架构支持。

我如何安装这个软件包?

debian
  • 1 个回答
  • 23 Views
Martin Hope
Michael A
Asked: 2020-01-26 07:14:33 +0800 CST

为什么 fwupd 不安装任何固件更新,即使它显示许多可用更新?

  • 1

TLDR:我安装fwupd,检查更新,告诉它安装更新,然后重新启动。之后,检查更新只会再次显示所有相同的更新,就好像它们没有安装一样。


我在 Lenovo Thinkpad X1 Carbon 4th gen 上运行 Debian 10 Buster x64。可能无关紧要,但型号是 20FBCTO1WW。我正在尝试使用fwupd来安装固件更新。我安装它并启动服务:

sudo apt-get install fwupd
sudo service fwupd start

列出所有有更新的设备:

root@london:~# fwupdmgr get-devices

20FBCTO1WW System Firmware
  DeviceId:             c66f3753f0a35b3874d65546d4b7b10896d44ce2
  Guid:                 81cba30b-c2d4-4e66-bcf3-69d81ba890b0
  Plugin:               uefi
  Flags:                internal|updatable|require-ac|supported|registered|needs-reboot
  Version:              0.1.8
  VersionLowest:        0.1.8
  Icon:                 computer
  Created:              2020-01-25

UEFI Device Firmware
  DeviceId:             6f92d954409bb3c145828fbbc0346c3ca12f2a9a
  Guid:                 cb3c1682-5386-4591-bd29-7c1f441b7ccb
  Plugin:               uefi
  Flags:                internal|updatable|require-ac|supported|registered|needs-reboot
  Version:              176.0.1202
  VersionLowest:        176.0.1202
  Icon:                 audio-card
  Created:              2020-01-25

SAMSUNG MZVKV512HAJH-000L1
  DeviceId:             310f45f1f223064b5c16bf6dff31146755a64480
  Guid:                 cce2386f-6d68-5f85-9f3f-ebead9288696 <- NVME\VEN_144D&DEV_A802&REV_01
  Guid:                 77bb4022-9503-586c-99b7-c8a64502da30 <- NVME\VEN_144D&DEV_A802
  Guid:                 8fd4ca73-d0ae-52e8-8977-461435c6f4cf <- NVME\VEN_144D
  Guid:                 e339432d-beab-53b2-9a9f-e0787a1ecb8b <- SAMSUNG MZVKV512HAJH-000L1
  Serial:               bla
  Summary:              NVM Express Solid State Drive
  Plugin:               nvme
  Flags:                internal|updatable|require-ac|registered|needs-reboot
  Vendor:               Samsung Electronics Co Ltd
  VendorId:             NVME:0x144D
  Version:              6L0QBXX7
  Icon:                 drive-harddisk
  Created:              2020-01-25

列出所有更新也显示了很多(我省略了以节省空间):

root@london:~# fwupdmgr refresh

Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading…             [***************************************]
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc




root@london:~# fwupdmgr get-updates

20FBCTO1WW System Firmware has firmware updates:
GUID:                    81cba30b-c2d4-4e66-bcf3-69d81ba890b0
ID:                      com.lenovo.ThinkPadN1FET.firmware
Update Version:          0.1.42
Update Name:             ThinkPad X1 Carbon 4th / X1 Yoga 1st System Update
Update Summary:          Lenovo ThinkPad X1 Carbon 4th / X1 Yoga 1st System Firmware
Update Remote ID:        lvfs
Update Checksum:         SHA1(efb007a2bda94c96d60c349a6f24cc80d51d7322)
Update Location:         https://fwupd.org/downloads/a06bbb48aa46c90497459ac6e98157f2acfe1778-Lenovo-ThinkPad-X1Carbon4th-X1Yoga1st-SystemFirmware-1.42.cab
Update Description:      Lenovo ThinkPad X1 Carbon 4th / X1 Yoga 1st System Firmware Version 1.42

我运行更新:

root@london:~# fwupdmgr update -v

Downloading 0.1.42 for 20FBCTO1WW System Firmware...
(fwupdmgr:2813): FuCommon-DEBUG: 09:11:45.120: creating path /root/.cache/fwupd
(fwupdmgr:2813): FuMain-DEBUG: 09:11:45.132: skpping download as file already exists
(fwupdmgr:2813): Fwupd-DEBUG: 09:11:45.134: Emitting ::status-changed() [decompressing]
Decompressing…           [-                                      ](fwupdmgr:2813): Fwupd-DEBUG: 09:11:45.162: Emitting ::status-changed() [idle]
Decompressing…           [***************************************]
(fwupdmgr:2813): Fwupd-DEBUG: 09:11:45.162: Emitting ::status-changed() [waiting-for-auth]
Authenticating…          [ -                                     ](fwupdmgr:2813): Fwupd-DEBUG: 09:11:45.162: Emitting ::status-changed() [idle]
Authenticating…          [***************************************]
Could not check for auth: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files

我不明白关于等待授权的错误,因为我以 root 身份运行它。重新启动后,fwupdmgr仍然显示“没有更新历史记录”。即使我直接安装 .cab 固件文件,它似乎仍然没有更新:

fwupdmgr install --allow-reinstall /root/.cache/fwupd/a06bbb48aa46c90497459ac6e98157f2acfe1778-Lenovo-ThinkPad-X1Carbon4th-X1Yoga1st-SystemFirmware-1.42.cab

我究竟做错了什么?

debian upgrade
  • 1 个回答
  • 2282 Views
Martin Hope
Michael A
Asked: 2020-01-04 10:51:29 +0800 CST

为什么这个 PAM 代码会阻止所有登录到 Debian 系统?

  • 3

为什么将此行添加到/etc/pam.d/common-auth:

auth        required      pam_tally2.so deny=4 unlock_time=1200 even_deny_root

并将这一行添加到/etc/pam.d/common-account:

account     required      pam_tally2.so

阻止所有登录到我的 Debian 10 系统?我的所有其他pam配置文件(login、common-session和common-password与默认值相比没有变化,但如有必要,我也可以发布这些文件)。

我已经看到了其他几个讨论的问题pam_tally,例如this one,this one和this one,但他们要么没有特定的答案,pam_tally要么根本没有任何答案。

(作为背景,我正在尝试为 Debian 系统调整此更新指南)

编辑:libpam-modules软件包已安装。

来自common-auth:

auth    [success=1 default=ignore]  pam_unix.so nullok_secure
auth    required      pam_tally2.so deny=4 unlock_time=1200 even_deny_root
auth    requisite     pam_deny.so
auth    required      pam_permit.so

来自common-account:

account required      pam_tally2.so
account [success=1 new_authtok_reqd=done default=ignore]    pam_unix.so 
account requisite     pam_deny.so
account required      pam_permit.so
debian pam
  • 1 个回答
  • 1319 Views
Martin Hope
Michael A
Asked: 2019-12-29 13:36:18 +0800 CST

我如何实际编写检测耳机何时插入的 acpid 事件脚本?

  • 1

我acpid用来检测我的耳机何时插入。根据acpid_listen,相关事件是

jack/headphone HEADPHONE unplug
jack/headphone HEADPHONE plug

我创建了/etc/acpi/events/headphone_jack这样的文件:

event=jack/headphone.*
action=/etc/acpi/actions/headphone.sh "%e"

如果我改用,该事件仍然不会触发jack[ /]headphone。脚本/etc/acpi/actions/headphone.sh如下所示:

amixer set Master off

换句话说,每次插入或拔出耳机时,音量都会被静音。此amixer命令在终端中有效。我用 重新启动了acpid服务sudo /etc/init.d/acpid reload,但事件仍然没有触发。

我究竟做错了什么?我在 Thinkpad X1 Carbon 第 4 代上使用 Debian 10(“buster”)x64。

debian acpi
  • 1 个回答
  • 416 Views
Martin Hope
Michael A
Asked: 2019-12-11 11:50:52 +0800 CST

使用 -curses 选项运行 qemu 时出现内核恐慌?

  • 1

我有一个没有桌面环境的 Debian 10(“buster”)的原始 qemu 磁盘映像,我试图在带有-curses标志的主机(也是 Debian 10)的终端中运行它。如果我qemu-system-x86_64只使用-curses标志运行,我只会得到一个空白屏幕,所以在这个问题之后我添加了-vga std选项。不幸的是,这让我在控制台中出现内核恐慌,并且我永远无法到达访客的登录屏幕。输出如下所示:

[    3.021788]  xwrite+0x29/0x5a
[    3.021845]  do_copy+0x9b/0xc8
[    3.021878]  write_buffer+0x27/0x37
[    3.021912]  flush_buffer+0x34/0x8b
[    3.021947]  __gunzip+0x26e/0x315
[    3.021982]  ? bunzip2+0x397/0x397
[    3.022016]  ? initrd_load+0x5e/0x5e
[    3.022048]  ? __gunzip+0x315/0x315
[    3.022080]  gunzip+0xe/0x11
[    3.022112]  ? initrd_load+0x5e/0x5e
[    3.022143]  unpack_to_rootfs+0x182/0x2c6
[    3.022177]  ? initrd_load+0x5e/0x5e
[    3.022210]  ? unpack_to_rootfs+0x2c6/0x2c6
[    3.022243]  ? do_early_param+0x8e/0x8e
[    3.022275]  populate_rootfs+0x59/0x106
[    3.022311]  do_one_initcall+0x46/0x1c3
[    3.022350]  ? do_early_param+0x8e/0x8e
[    3.022382]  kernel_init_freeable+0x189/0x218
[    3.022419]  ? rest_init+0xaa/0xaa
[    3.022453]  kernel_init+0xa/0x10d
[    3.022487]  ret_from_fork+0x35/0x40
[    3.023243] ---[ end Kernel panic - not syncing: System is deadlocked on memo
ry
[    3.023243]  ]---

我正在使用 QEMU 模拟器版本 3.1.0 (Debian 1:3.1+dfsg-8+deb10u3)。我的终端是st 0.8.2,我的桌面环境/窗口管理器是 dwm,如果这些细节相关的话。但是,如果我使用 xterm,我会遇到同样的内核恐慌。

我正在使用这个 qemu 命令启动映像:

qemu-system-x86_64 -curses -vga std -m 1024 -drive format=raw,file=disk.img

我已经尝试了这个问题中 qemu 标志的其他各种组合,但它们要么不存在于我的 qemu 版本(例如-noframe选项),要么抛出其他错误(例如-append需要-kernel选项),或者只是给我一个空白屏幕(-curses通过它自己)。

这样做的全部目的是避免启动 VNC 查看器来访问仅是命令行的来宾。

debian qemu
  • 1 个回答
  • 553 Views
Martin Hope
Michael A
Asked: 2019-12-10 12:05:16 +0800 CST

如何使用 Debian 预置文件在 /etc/apt/sources.list 中设置镜像?

  • 3

我正在使用preseeding构建 Debian 10 stable(“buster”)的自定义 ISO 映像,并且我的自定义preseed.cfg文件可以完美运行,除了一件事:我希望它/etc/apt/sources.list使用我选择的存储库进行配置,这样我就不必每次安装新系统时手动执行。

目标是/etc/apt/sources.list这样的(这里必须使用 https):

deb https://deb.debian.org/debian buster main contrib non-free
deb-src https://deb.debian.org/debian buster main contrib non-free

deb https://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src https://deb.debian.org/debian-security/ buster/updates main contrib non-free

deb https://deb.debian.org/debian buster-updates main contrib non-free
deb-src https://deb.debian.org/debian buster-updates main contrib non-free

我的preseed.cfg文件如下所示:

#### Contents of the preconfiguration file (for buster)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US

# Keyboard selection.
d-i keyboard-configuration/xkb-keymap select us
# d-i keyboard-configuration/toggle select No toggling

### Network configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/hostname string vienna1-preseed

d-i netcfg/wireless_wep string

### Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

### Account setup
d-i passwd/root-login boolean false

# To create a normal user account.
d-i passwd/user-fullname string theusername
d-i passwd/username string theusername
d-i passwd/user-password-crypted password $6$qVk198UWGPxpW$tzMYxQyiOrI4ClDJdDGALsyYq1j1IbXWbpem3JevFT9Krqdmt4wKdvtiY8ry3PRh277V6GHzSKP3zSI7jt04Y/

### Clock and time zone setup
d-i clock-setup/utc boolean true
d-i time/zone string US/Eastern

d-i clock-setup/ntp boolean true

### Partitioning
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/choose_recipe select atomic

d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true


# https://serverfault.com/a/622818
d-i apt-setup/use_mirror boolean false
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false

### Base system installation
# Configure APT to not install recommended packages by default. Use of this
# option can result in an incomplete system and should only be used by very
# experienced users.
#d-i base-installer/install-recommends boolean false

### Apt setup
# You can choose to install non-free and contrib software.
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true

### Package selection
tasksel tasksel/first multiselect standard
d-i pkgsel/upgrade select full-upgrade
popularity-contest popularity-contest/participate boolean false

### Boot loader installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev  string default

d-i finish-install/reboot_in_progress note
d-i debian-installer/exit/poweroff boolean true
debian apt
  • 2 个回答
  • 2650 Views
Martin Hope
Michael A
Asked: 2019-06-20 12:17:49 +0800 CST

如何将时区调整包装到字符串中的日期命令?

  • 1

我正在尝试在 bash shell 脚本中输出不同时区的日期和时间。在这个问题之后,我这样做了:

#!/usr/bin/env bash

IL=":Asia/Jerusalem" date "+%a %b %d %R"
echo "Israel:    $IL"

输出这个:

Wed Jun 19 15:12
Israel:

不仅该时区的时间不正确,而且输出错误地显示在两行上。

我希望它输出这个:

Israel: Wed Jun 19 23:12

在其他脚本中,默认时区很好(例如,在我.xinitrc显示当前系统时间),我已经完成了:

date_str="$(date +"%a %b %d %R")";
topbar="Time: $date_str";
xsetroot -name "$top_bar";

这次我做错了什么?

shell-script date
  • 1 个回答
  • 129 Views
Martin Hope
Michael A
Asked: 2019-03-03 07:48:32 +0800 CST

不使用桌面环境时,如何在 Linux 中键入德语或西班牙语字符?

  • 1

我正在使用 Debian 9 x64 和dwm窗口管理器。我不使用 Gnome、KDE、Xfce或任何其他桌面环境;它只是窗口管理器。

我将键盘布局配置为使用通用 105 键国际键盘。我试过AltGr(正确的 Alt 键)加上各种 alt 代码,但无济于事。我也试过AltGrand then " uor u ",结果同样令人失望。

理想情况下,我可以在任何地方输入这些字符,包括文本编辑器(我的都支持 Unicode)、网络浏览器等。我不使用 LibreOffice,所以我发现的一些特定于 LibreOffice 的解决方案还不够。

keyboard locale
  • 2 个回答
  • 1163 Views
Martin Hope
Michael A
Asked: 2018-11-14 07:39:37 +0800 CST

“没有输出具有背光属性”,但配置了 xorg.conf 并安装了 xbacklight

  • 7

我正在使用带有英特尔视频驱动程序的联想笔记本电脑,并且正在尝试控制亮度。我安装了xbacklight和xserver-xorg-video-intel包,将这些行添加到/etc/X11/xorg.conf:

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
EndSection

我验证了该/sys/class/backlight/intel_backlight/目录确实存在。当我运行时xbacklight,我收到错误:

No outputs have backlight property

如何配置背光?我使用的是 Debian 9 x64,系统是最新的。

编辑:我可以通过提升我的权限sudo并写入brightness文件来手动更改亮度:

echo 500 > /sys/class/backlight/intel_backlight/brightness

编辑:如果我xbacklight以 root 身份运行或使用sudo.

debian backlight
  • 3 个回答
  • 13726 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve