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 / 问题

全部问题(ubuntu)

Martin Hope
Andreas G
Asked: 2024-11-26 11:25:12 +0800 CST

bash:将日期时间转换为秒数,然后再转换回日期时间

  • 5

在将时间戳转换为秒数、添加一些秒数并将结果转换回时间戳的 bash 脚本中,我从 date 命令中获得了错误的结果。原因如下:

$ dt=$(date '+%s' -u --date="2024-11-25 20:31:00")
$ echo $dt
1732566660
$ date '+%F %T' -u --date="$dt seconds"
2079-10-21 22:33:33

我做错什么了?

command-line
  • 1 个回答
  • 24 Views
Martin Hope
kidkicker
Asked: 2024-11-26 04:15:37 +0800 CST

我正在尝试拆分文件以适合我的 FAT32 闪存驱动器,但我一直被告知拆分:额外的操作数,然后是文件名的一部分

  • 5

我对这一切都不熟悉,了解不多,但使用的代码是split -b 4GB Super Smash Bros Brawl [RSBE01],它说split: extra operand "Bros",我多次更改代码,通过添加 -、更改大小、删除它说的单词,以及添加/删除文件类型 (wbfs),但我总是得到这个,不知道该怎么做。有人知道如何解决这个问题吗?我花了两天时间在网上寻求帮助。我只是想在我的 Wii 上玩它。更新:我删除了文件名中的所有空格,现在它说Split: cannot open 'SuperSmashBrosBrawl' for reading. No such file exists or directory.更新 2:问题解决了。谢谢你们的帮助

split
  • 1 个回答
  • 31 Views
Martin Hope
KronosOne
Asked: 2024-11-25 23:13:13 +0800 CST

窗口控制 GNOME

  • 6

我正在使用带有 GNOME 桌面环境的 Ubuntu 22.04。

另外,我可以在登录时选择桌面环境/Windows 管理器的其他组合:

  1. GNOME 经典
  2. X11 上的 GNOME
  3. Ubuntu
  4. X11 上的 Ubuntu

除了安装 GNOME 扩展之外,我也喜欢 GNOME,但我注意到在该桌面环境中,我看不到右上角的图标来最小化和最大化窗口。

如果我选择选项 3 或 4,我可以看到图标,但 GNOME 没有最小/最大功能。我该如何解决这个问题?

desktop-environments
  • 1 个回答
  • 17 Views
Martin Hope
garrettlynchirl
Asked: 2024-11-25 01:52:28 +0800 CST

无法从 IOS 使用 Samba 访问 Ubuntu

  • 5

我正在尝试从 IOS iPad 连接到 Ubuntu 计算机。按照此处的说明(您可以将 iPhone 连接到 Ubuntu 媒体共享吗?)我已经共享了我的用户文档文件夹并连接到它,但当我尝试打开它时,我收到“内容不可用”消息(见屏幕截图)。我在网上读到了一些建议,删除 IOS 上的文件应用程序并再次下载,重新启动 iPad - 但这些都没有改变。有什么想法可能是什么问题吗?

IOS 未显示 Ubuntu

更新 1:

以下是文件内容/etc/samba/smb.conf。我使用的是 Ubuntu 22.04。我也尝试过从 OSX 连接到 Ubuntu 计算机 - 同样的问题,连接但不显示内容。

# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
   logging = file

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<[email protected]> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = classic
# primary domain controller', 'server role = classic backup domain controller'
# or 'domain logons' is set 
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 means that usershare is disabled.
#   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
;   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
;   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

更新2:

以下输出net usershare info --long:

$ net usershare info --long
[Documents]
path=/home/garrett/Documents
comment=
usershare_acl=Everyone:F,
guest_ok=n
22.04
  • 1 个回答
  • 42 Views
Martin Hope
Ouroborus
Asked: 2024-11-24 17:26:10 +0800 CST

单个 NIC 上有多个具有不同配置的接口

  • 5

我有一张网卡,我想将两个接口连接到它。一个接口是 DHCP 和mtu: 1500。另一个接口是静态 IP 和mtu: 9000。

我该如何通过 进行配置netplan,或者,如果不可能的话,在 中systemd-networkd?

server
  • 1 个回答
  • 49 Views
Martin Hope
Joe
Asked: 2024-11-24 12:29:06 +0800 CST

CUPS - 给定多个文件时 lp 不会打印

  • 7

我有一台 Brother HLL2390DW 一体式打印机,通过 USB 连接到我的 Kubuntu 22.04 笔记本电脑,使用brother-HLL2390DW-cups-en.ppd他们的网站。

如果我发出一个,lp file1.pdf它可以正常工作,但如果我发出一个lp file1.pdf file2.pdf,打印机会唤醒,但不会打印任何内容。

/var/log/cups/error_log显示:

W [23/Nov/2024:00:00:28 -0500] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
W [23/Nov/2024:02:05:49 -0500] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
W [23/Nov/2024:05:17:30 -0500] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [23/Nov/2024:18:22:58 -0500] [Job 66] Unable to add document to print job.
E [23/Nov/2024:18:46:36 -0500] [Job 67] Unable to add document to print job.
E [23/Nov/2024:18:59:48 -0500] [Job 69] Print job canceled at printer.
W [23/Nov/2024:18:59:48 -0500] [Job 69] Backend returned status 5 (cancel job)
E [23/Nov/2024:19:04:23 -0500] [Job 70] Unable to add document to print job.
E [23/Nov/2024:19:04:31 -0500] [Job 70] Print job canceled at printer.
W [23/Nov/2024:19:04:31 -0500] [Job 70] Backend returned status 5 (cancel job)
$ lpstat -a
Brother_HL_L2390DW_USB not accepting requests since Sat 23 Nov 2024 05:36:03 PM EST -
        Rejecting Jobs
BrotherHLL2390D not accepting requests since Sat 02 Nov 2024 08:10:19 PM EDT -
        Rejecting Jobs
HLL2390DW accepting requests since Sat 23 Nov 2024 07:12:01 PM EST

另外两个实例来自之前尝试使用以太网转 USB 打印服务器适配器等将打印机连接为网络打印机的情况。(一旦成功,我会就此提出一个单独的问题。)我手动禁用了它们。

drivers
  • 1 个回答
  • 107 Views
Martin Hope
Shobhit Verma
Asked: 2024-11-24 02:57:18 +0800 CST

如何在 ubuntu 核心机器上播放视频?

  • 5

我在我的 ubuntu 核心机器上使用 ffmpeg snap 从 ip 摄像机接收视频包并将其作为 mp4 视频文件保存在我的 ubuntu 核心机器上,但是当我尝试使用 ffmpeg 播放视频时,我无法做到这一点,那么在 ubuntu 核心机器上显示视频的正确方法是什么。

我已经尝试过:

  1. Mpv 连接到 ubuntu-frame
  2. ffmpeg 连接到 ubuntu-frame

是的,我的 ubuntu 核心使用 wayland 与 wpe-kit-kiosk 配合得很好。提前致谢。

video
  • 1 个回答
  • 33 Views
Martin Hope
Shivansh P
Asked: 2024-11-24 00:17:49 +0800 CST

Ubuntu 24.04 安装程序无法运行

  • 5

我正在尝试在我的 PC 上双启动 Windows 10 和 Ubuntu。我在 UEFI 模式下使用 Rufus 制作了 Ubuntu 24.04 安装介质。Windows 位于 GPT 分区上,安全启动和快速启动被禁用,SATA 配置设置为 AHCI 和 UEFI,但 Ubuntu 安装程序仍然没有读取分区。我为 Ubuntu 安装添加了 55GB 未分配空间。

在此处输入图片描述

Ubuntu 安装程序也显示分区表错误,但磁盘可以读取和访问所有分区。有人能告诉我我遗漏了什么吗?

终端中的磁盘命令还显示 MBP 受到保护且 GPT 存在。Bitlocker 已关闭

dual-boot
  • 2 个回答
  • 157 Views
Martin Hope
dudanho
Asked: 2024-11-23 22:40:16 +0800 CST

在新操作系统上无需提示即可连接公共 WiFi

  • 6

我在个人笔记本电脑上安装了 Ubuntu,并连接到酒店 wifi,我之前在同一台电脑上使用 Windows。这个网络是标准的酒店 wifi,您需要以客人身份输入凭据才能访问,但它直接连接,没有任何提示,就像绕过了路由器提示一样。

我的问题是它是如何做到的?它是否检测到了我笔记本电脑的 MAC 地址,然后就认为是我?

wireless
  • 1 个回答
  • 37 Views
Martin Hope
el_grezeq
Asked: 2024-11-23 21:26:56 +0800 CST

将软件从源代码编译成应用程序

  • 6

我有一台安装了 Ubuntu 24.04 LTS 的笔记本电脑,我正在尝试用最新版本(3.4.8,根据我在互联网上找到的信息,官方 PPA 中不久后将不再提供)替换默认的 Rhythmbox(版本 3.4.7)。我暂时不想使用 Flatpak,而且我也有兴趣学习一次“香肠是如何制作的”。

我已成功完成Rhythmbox GitLab的安装过程。现在我可以使用以下命令从安装目录启动 Rhythmbox:

$ export GSETTINGS_SCHEMA_DIR=$PWD/_install/share/glib-2.0/schemas
$ _install/bin/rhythmbox

我的问题是:如何才能将其转变为标准行为应用程序?基本上,我希望它的行为像 Rhythmbox 的默认版本一样,带有启动器等。

我的猜测(未经证实)是:

  1. 将编译结果移动到默认应用程序位置(类似于usr/bin)
  2. 制作启动脚本(见上面两行)
  3. 创建一个带有快捷方式的启动器(类似于此)

正确的做法是什么?

gnome
  • 1 个回答
  • 35 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