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-277898

jave.web's questions

Martin Hope
jave.web
Asked: 2023-11-01 17:42:31 +0800 CST

xrandr - 笔记本电脑显示屏始终为“eDP-1”

  • 5

我想自己编写一些针对笔记本电脑显示器的帮助脚本,并且希望使其通用。

我注意到,在 3 台装有 Ubuntu 22 的不同笔记本电脑上,笔记本电脑显示屏始终标记为xrandr“ eDP-1 ”。

情况总是如此吗?

如果不是 - 影响此生成的显示名称的条件是什么?

我在某处发现 eDP 应该意味着“嵌入式显示端口”,因此我假设如果笔记本电脑没有更多嵌入式显示端口,它将始终标记为eDP-1. 但后来我发现这个问题 - eDP-1-1 到 eDP-1 - 对于 Ubuntu 20 和这个存档https://lists.x.org/archives/xorg/2017-March/058634.html提到“eDP-1 -1”在初始状态 - 这让我有点担心。我也未能找到描述 eDP 含义和规则的文档。

22.04
  • 1 个回答
  • 21 Views
Martin Hope
jave.web
Asked: 2021-12-09 07:03:28 +0800 CST

如何仅在第一级的两个文件夹中找到相同的子文件夹?

  • 2

设想:

  • 2个主文件夹,可能有同名的子文件夹(我不知道哪些名称可能重复,这就是我想要找到的)
  • 子文件夹有许多其他文件和子文件夹,因此具有自动递归的工具并不是真正的选择
  • 我只关心两个主文件夹的第一级重复的子文件夹名称
  • 子文件夹的内容无关紧要
  • 文件的内容无关紧要

我尝试使用meldGUI,但完成这些结构需要无穷无尽的时间。

我尝试使用diff --brief --report-identical-files folder1 folder2,但它基本上报告了所有内容,它甚至不包括文件夹,所以我什至不能| grep identical。

我是否使用了错误的工具?还是有一些我没有从中得到的技巧diff --help?还是我做错了什么?

谢谢

command-line
  • 2 个回答
  • 389 Views
Martin Hope
jave.web
Asked: 2021-06-22 02:34:42 +0800 CST

如何自动将交换移回 RAM?

  • 3

我最初对 swap(piness) 的问题是它交换得太频繁了(即使是swappiness=1! )。

我还认为 0 会关闭 swappiness - 这是一个误解,
即使你设置了 Swap 仍然有效sudo sysctl -w vm.swappiness=0!:-)
(要永久设置,编辑/etc/sysctl.conf和添加/更新vm.swappiness = 0- 对于 GUI 文本编辑器,我推荐一个“linux notepad”“gedit”,然后你可以这样做sudo gedit /etc/sysctl.conf)

只有在交换0时,它才开始表现得更像人们所期望的那样(从大约 98% 的 RAM 满时开始交换),但是我仍然遇到另一个问题 - 当实际上再次释放足够的 RAM 时,交换不会自动返回到 RAM,甚至随着时间的推移。

当然,您可以手动执行sudo swapoff -a; sudo swapon -a每次关闭交换,最终强制交换被清空到 RAM,然后交换再次开始。

然而,这并不方便,原因有两个 a) 交换会暂时关闭 b) 这是手动的额外检查/运行

有没有办法自动以某种方式实现这一点,最好是“本地” ?

20.04
  • 2 个回答
  • 865 Views
Martin Hope
jave.web
Asked: 2020-12-22 09:12:56 +0800 CST

Wine (wine32) 需要不会安装的依赖项 Ubuntu 20.04

  • 3

因此,当我尝试安装时,wine它没有问题,但是它显然没有安装我要运行的应用程序所需的 wine32。

我已经加了sudo dpkg --add-architecture i386

但是,当我尝试sudo apt install wine32遇到这些错误时:

Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libavcodec58 : Breaks: libavcodec58:i386 (!= 7:4.2.4-1ubuntu0.1)
 libavcodec58:i386 : Depends: libaom0:i386 (>= 1.0.0) but it is not going to be installed
                     Depends: libavutil56:i386 (= 7:4.3.1-5) but it is not going to be installed
                     Depends: libcairo2:i386 (>= 1.2.4) but it is not going to be installed
                     Depends: libcodec2-0.9:i386 (>= 0.9.2) but it is not going to be installed
                     Depends: libdav1d4:i386 (>= 0.2.1) but it is not installable
                     Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed
                     Depends: libgsm1:i386 (>= 1.0.18) but it is not going to be installed
                     Depends: libmp3lame0:i386 (>= 3.100) but it is not going to be installed
                     Depends: libopenjp2-7:i386 (>= 2.0.0) but it is not going to be installed
                     Depends: libopus0:i386 (>= 1.1) but it is not going to be installed
                     Depends: librsvg2-2:i386 (>= 2.14.4) but it is not going to be installed
                     Depends: libshine3:i386 (>= 3.1.0) but it is not going to be installed
                     Depends: libsnappy1v5:i386 (>= 1.1.8) but it is not going to be installed
                     Depends: libspeex1:i386 (>= 1.2~beta3-1) but it is not going to be installed
                     Depends: libswresample3:i386 (= 7:4.3.1-5) but it is not going to be installed
                     Depends: libtheora0:i386 (>= 1.0) but it is not going to be installed
                     Depends: libtwolame0:i386 (>= 0.3.10) but it is not going to be installed
                     Depends: libva2:i386 (>= 2.2.0) but it is not going to be installed
                     Depends: libvorbis0a:i386 (>= 1.1.2) but it is not going to be installed
                     Depends: libvorbisenc2:i386 (>= 1.1.2) but it is not going to be installed
                     Depends: libvpx6:i386 (>= 1.6.0) but it is not going to be installed
                     Depends: libwavpack1:i386 (>= 4.40.0) but it is not going to be installed
                     Depends: libwebp6:i386 (>= 0.5.1) but it is not going to be installed
                     Depends: libwebpmux3:i386 (>= 0.6.1-2+b1) but it is not going to be installed
                     Depends: libx264-160:i386 (>= 2:0.160.3011+gitcde9a93) but it is not installable
                     Depends: libx265-192:i386 (>= 3.2) but it is not installable
                     Depends: libxvidcore4:i386 (>= 1.2.2) but it is not going to be installed
                     Depends: libzvbi0:i386 (>= 0.2.35) but it is not going to be installed
                     Breaks: libavcodec58 (!= 7:4.3.1-5)
 wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages

经过深入研究,似乎有两个问题:

1)一些依赖关系“打破”对方

2) 在 Ubuntu 20.04 中不可用的版本中需要许多依赖项

我可以以某种方式强制 wine32 install 安装所需版本的依赖项吗?

旁注:从 Ubuntu 18.04 升级到 20.04 后,wine 坏了,在 18.04 上,我不知何故使用 add architecture 和 winehq 存储库让它工作得很好......

编辑

存储库
当前禁用(在我尝试调试时启用)
https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/(常规和源)
当前启用
https://dl .winehq.org/wine-builds/ubuntu/(常规和源代码)

的输出apt-cache policy wine32

wine32:i386:
  Installed: (none)
  Candidate: 5.0-3ubuntu1
  Version table:
     5.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages

的输出grep -ir ^deb /etc/apt/ --include=*.list

/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu/ focal-security restricted universe multiverse main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal-updates restricted universe multiverse main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal-backports restricted universe multiverse main
/etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
/etc/apt/sources.list:deb-src https://dl.winehq.org/wine-builds/ubuntu/ focal main

当我禁用所有这些存储库并清除所有葡萄酒并运行 autoremove 和 clean 和 autoclean 和 apt update 时,然后尝试sudo apt install wine32输出现在:

The following packages have unmet dependencies:
 wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

删除的存储库减少了输出apt-cache policy wine32保持不变的输出。grep -ir ^deb /etc/apt/ --include=*.list

编辑2:

apt-cache policy libwine:i386
libwine:i386:
  Installed: (none)
  Candidate: 5.0-3ubuntu1
  Version table:
     5.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages

dpkg -l | grep -i wine=> 没有结果

sudo apt-get install libwine:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libwine:i386 : Depends: libfaudio0:i386 (>= 19.06.07) but it is not going to be installed
                Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed
                Depends: libgphoto2-6:i386 (>= 2.5.10) but it is not going to be installed
                Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed
                Depends: libgstreamer1.0-0:i386 (>= 1.4.0) but it is not going to be installed
                Depends: libxml2:i386 (>= 2.9.0) but it is not going to be installed
                Recommends: libcups2:i386 (>= 1.4.0) but it is not going to be installed
                Recommends: libgssapi-krb5-2:i386 (>= 1.6.dfsg.2) but it is not going to be installed
                Recommends: libkrb5-3:i386 (>= 1.6.dfsg.2) but it is not going to be installed
                Recommends: libsane:i386 (>= 1.0.24) but it is not going to be installed
                Recommends: libxslt1.1:i386 (>= 1.1.25) but it is not going to be installed
                Recommends: gstreamer1.0-plugins-good:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
wine dependencies apt 32-bit 20.04
  • 1 个回答
  • 2004 Views
Martin Hope
jave.web
Asked: 2018-02-03 09:19:31 +0800 CST

在[重复]之前将根分区调整为未分配空间

  • 1
这个问题在这里已经有了答案:
如何扩展我的根 (/) 分区? (3 个回答)
4年前关闭。

我在运行 Ubuntu 17(使用 Xfce 会话)的根分区上需要更多空间。
我之前确实有很多未分配的空间。
但是,当我尝试调整根分区的大小 -/dev/sdb2时,我无法添加/删除 MiB ...

这甚至可能吗?

如果是这样,是否可以通过实时系统以某种方式完成,还是我必须使用实时 CD/USB?

在此处输入图像描述

实际上只有 Ubuntu 和 Xcfe 会话,LUBUNTU_SYSTEM 只是一个旧标签 :)

partitioning ext4 gparted unallocated
  • 1 个回答
  • 7506 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