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
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[automatic](ubuntu)

Martin Hope
math3r0se
Asked: 2020-08-21 23:32:18 +0800 CST

预置 txt.cfg

  • 0

我需要你的帮助:

我正在制作一个 ubuntu 自定义的 iso,一切都在一个细节上完美运行:如果不在启动时打开菜单,我就无法启动安装。

我按照互联网上的教程修改了 txt.cfg 文件,但没有任何效果,我找到了这个菜单。

有没有人有解决方案让我完全绕过它?

我的 txt.cfg :

default live-install
label live-install
        menu label ^Install Ubuntu
        kernel /casper/vmlinuz
        append preseed/file=/cdrom/custom.preseed auto=true priority=critical debian-installer/locale=fr_FR keyboard-configuration/layoutcode=fr ubiquity/reboot=true languagechooser/language-name=French countrychooser/shortlist=FR localechooser/supported-locales=fr_FR.UTF-8 boot=casper automatic-ubiquity initrd=/casper/initrd quiet splash noprompt noshell ---
system-installation preseed automatic
  • 1 个回答
  • 649 Views
Martin Hope
zarej
Asked: 2020-05-05 23:16:54 +0800 CST

服务器自动安装:如何自定义存储部分?

  • 6

按照这里的说明https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls#Running_a_truly_automatic_autoinstall 当我用于存储时:

storage:
  layout:
    name: lvm

它创建 4GB 的根分区并且不创建交换。当我使用直接布局时

storage:
  layout:
    name: direct

它在磁盘上创建具有完整可用空间的根分区,并创建交换。有没有办法直接查看它是如何配置布局并修改该配置以调整我的需求?我的意思是这里记录了基于操作的配置:https ://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference#storage

我的意思是这样的:

storage:
  grub:
    install_devices:
      - esp-partition   
  swap:
    filename: swap.img
    size: 4GB
  config:
    - type: disk
      id: disk0
      ptable: gpt
      wipe: superblock
      grub_device: true
      match:
        size: largest

    - id: esp-partition # create partitions on disk (like sda1)
      type: partition
      device: disk0
      size: 512MB
      flag: boot # EFI system partition needs boot flag
    - type: partition
      id: boot-partition
      device: disk0
      size: 1GB
    - type: partition
      device: disk0
      id: root-partition
      size: -1

    - id: esp-partition-fs # format partitions on disk
      type: format
      volume: esp-partition
      fstype: fat32
      label: ESP
    - id: boot-partition-fs
      type: format
      fstype: ext4
      volume: boot-partition
    - id: root-partition-fs
      type: format
      fstype: ext4
      volume: root-partition

    - id: esp-partition-fs-mount # mount partitions
      type: mount
      device: esp-partition-fs
      path: /boot/efi
    - id: root-partition-fs-mount
      type: mount
      path: /
      device: root-partition-fs
    - id: boot-partition-fs-mount
      type: mount
      path: /boot
      device: boot-partition-fs

以上配置成功通过了 FileSystem 步骤,但在 cloud-init 配置的 initramfs 步骤上失败。就像在屏幕截图上一样, 在此处输入图像描述 我想知道直接布局的存储配置,以便我可以调整上面的配置,或者如果有人知道如何修复上面的配置,那么步骤 initramfs 是否通过?

server cloud-init automatic 20.04
  • 1 个回答
  • 7291 Views
Martin Hope
jfacemyer
Asked: 2020-03-05 08:41:20 +0800 CST

自动粘贴到 GUI 文本编辑器/框中

  • 3

我正在尝试创建一个脚本,该脚本处理来自 gui 的选定文本(任意数量的应用程序,如浏览器、文本编辑器等),然后使用一个键盘命令自动将选定的文本替换为处理后的文本。

我可以让 xsel 替换剪贴板或主缓冲区,但如果可能的话,我不想用另一个键盘快捷键粘贴。

工作流程:

  • 选择文本
  • 击键命令
  • Bash 脚本处理文本
  • Bash 脚本将文本粘贴到 gui 编辑器中,替换选择(<-- 这是我想不通的)
  • 鳍

我读过 xsel 允许粘贴,但据我所知,它只允许将文本输出到 cli(不是真正的粘贴)或重定向到其他内容。这可能是我需要的,但我不明白该怎么做(即,我将输出重定向到什么以使其自动替换 gui 中的选定文本?)

谢谢!

更多信息:

  • 我正在使用 Xubuntu 19.10
  • 我只想用简单的文本替换(例如将小写更改为大写)
  • 让我们保持简单 - 我如何(使用键命令)从 bash 脚本中获取文本并将其粘贴到光标当前所在的 gui 文本编辑器/区域中,如果有的话,替换选定的文本?
gui paste automatic
  • 3 个回答
  • 619 Views
Martin Hope
Zivko Stoimcev
Asked: 2020-01-31 08:06:36 +0800 CST

自动关闭 Ubuntu

  • 0

是否可以设置某种脚本在特定时间(例如晚上 10 点)自动关闭计算机。我正在运行 Ubuntu 18.04

shutdown automatic
  • 3 个回答
  • 118 Views
Martin Hope
jibbers42
Asked: 2018-12-09 10:58:39 +0800 CST

修复或重置 XPS 9570 笔记本电脑上 Ubuntu 18.10 中的“自动日期和时间”

  • 1

当我在“设置”中使用“自动日期和时间”来设置来自 Internet 的时间时,我遇到了日期和时间设置错误的问题。我附上了屏幕截图,以显示启用该功能时会发生什么。

这与双启动时时钟时间关闭不同,因为:

  • 我不需要启动到 Windows 来查看问题,我只需要在 Ubuntu 中启用 Internet 日期/时间。
  • 偏移量不是时区差异,它似乎是相当随机的,年份是未来几十年。随附的屏幕截图将我的日期从 2018 年 12 月 8 日下午 1:44 更改为 2039 年 11 月 29 日上午 7:45。我想时区可以解释 6 小时的时间差异(即使我的偏移量是以太 4 或 5,取决于一年中的时间),但不是月/日/年的差异。

我已经从 Live USB 启动并启用了该功能,它运行良好。

我意识到我不小心为 Live 测试下载了 LTS (18.04)。当我在 18.10 中尝试它时,当我单击详细信息时,设置应用程序会冻结。所以,我不确定如何使用日期/时间设置来测试它,但仍然可能值得注意的是它在 18.04 Live 环境中运行良好。

我使用的是戴尔 XPS 9570 笔记本电脑。

我怎样才能解决这个问题?或者,此功能涉及哪些应用程序和配置,我如何查看它们是否已损坏或只是将软件包和配置文件重新安装为默认值?

自动日期和时间关闭 自动日期和时间关闭

自动开启日期和时间 自动开启日期和时间

time date automatic
  • 1 个回答
  • 301 Views
Martin Hope
Paulo Marcel Coelho Aragão
Asked: 2018-05-22 02:34:28 +0800 CST

在 Xubuntu 18.04 上从挂起恢复时自动注销

  • 6

当我的 Xubuntu 18.04 笔记本电脑从挂起状态恢复时,如果笔记本电脑已挂起超过几个小时,systemd-logind 会自动注销当前会话。如果挂起和恢复之间的间隔很短,则不会注销。我还没有发现这个间隔需要多长时间才能导致注销。

我在 systemd-logind.service 上启用了调试,创建文件/etc/systemd/system/systemd-logind.service.d/10-debug.conf:

[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

这会导致 systemd-logind 记录它处理的所有 D-Bus 消息,但无法发现可能导致注销的任何内容。

在 systemd-logind 开始终止当前会话之前,我扫描了所有 systemd 日志消息 ( journalctl),调查了所有看起来可疑但找不到可能影响自动注销的任何内容。以下是一些让我觉得可疑的消息(它们不是连续的,而是来自不同的场合):

upowerd[1600]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0
polkitd(authority=local)[840]: Unregistered Authentication Agent for unix-session:c2 (system bus name :1.46, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
wpa_supplicant[811]: dbus: fill_dict_with_properties dbus_interface=fi.w1.wpa_supplicant1.Interface dbus_property=Stations getter failed
wpa_supplicant[811]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
at-spi-bus-launcher[7031]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
at-spi-bus-launcher[7031]:       after 30333 requests (30333 known processed) with 0 events remaining.
systemd-logind[779]: Inhibitor xfce4-power-manager (xfce4-power-manager handles these events) pid=8611 uid=1000 mode=block stopped
systemd-logind[779]: Electing new display for user paulo
systemd-logind[779]: Ignoring session c8

logind config 没有任何可能导致此问题的内容:

paulo:~$ loginctl show-session
EnableWallMessages=no
NAutoVTs=6
KillUserProcesses=no
RebootToFirmwareSetup=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
BlockInhibited=handle-power-key:handle-suspend-key:handle-hibernate-key
DelayInhibited=sleep
InhibitDelayMaxUSec=5s
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
HoldoffTimeoutUSec=30s
IdleAction=ignore
IdleActionUSec=30min
PreparingForShutdown=no
PreparingForSleep=no
Docked=no
RemoveIPC=yes
RuntimeDirectorySize=615313408
InhibitorsMax=8192
NCurrentInhibitors=5
SessionsMax=8192
NCurrentSessions=1
UserTasksMax=10813

我找不到任何可能导致一段时间后自动注销的东西。我真的很难过。

xubuntu logout systemd-logind 18.04 automatic
  • 4 个回答
  • 2447 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve