我正在运行 ubuntu 20.04。我刚买了一台分辨率很高(3840x2400)的新笔记本电脑,所以我的 xterm 窗口默认很小。我可以增加字体大小来补偿微小的问题,但滚动条仍然很窄。有人可以告诉我如何扩大它吗?
我对此没有寄予厚望,但我想做的是创建一个桌面快捷方式,单击该快捷方式会打开一个终端(最好是 mate-terminal,但我不挑剔),运行一个命令,然后在交互式会话中使终端保持打开状态。理想情况下,我可以在新窗口中向上箭头以重新运行命令。
我尝试过的事情:
mate-terminal --command "bash -c 'ls;$SHELL'"
:我看不到运行了什么命令,也无法向上箭头重新运行该命令。Changing the MATE terminal preferences to Keep Open
:它使窗口保持打开状态,但不是交互式的。我能做的就是关闭它。xterm -hold -e 'bash -c "ls"&&$SHELL'
:我看不到运行了什么命令,也无法向上箭头重新运行该命令。
我要做的是为命令行应用程序创建一个快捷方式,该应用程序打开一个终端并运行whatevertool -h
,然后等待用户做他们需要做的事情。我想要的可能吗?
所以我正在尝试使用这些命令在终端上安装 PlayOnLinux。
$ wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
OK
$ sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
--2020-04-21 21:48:13-- http://deb.playonlinux.com/playonlinux_bionic.list
Resolving deb.playonlinux.com (deb.playonlinux.com)... 51.254.83.230, 2001:41d0:2:37ca::1e
Connecting to deb.playonlinux.com (deb.playonlinux.com)|51.254.83.230|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44
Saving to: ‘/etc/apt/sources.list.d/playonlinux.list’
/etc/apt/sources.li 100%[===================>] 44 --.-KB/s in 0s
2020-04-21 21:48:13 (4.60 MB/s) - ‘/etc/apt/sources.list.d/playonlinux.list’ saved [44/44]
$ sudo apt-get update
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://ppa.launchpad.net/lutris-team/lutris/ubuntu bionic InRelease
Hit:3 http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04 ./ InRelease
Hit:4 http://deb.playonlinux.com bionic InRelease
Hit:5 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:68 and /etc/apt/sources.list:74
$ sudo apt-get install xterm playonlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xterm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'xterm' has no installation candidate
我对 Ubuntu 比较陌生,所以我希望能在这个问题上提供一些逐步的帮助。
我在我的 .bashrc 文件中为程序创建了一个别名,如下所示:
alias foxitreader="/home/username/opt/foxitsoftware/foxitreader/FoxitReader"
我在我的步枪.conf 文件中为 pdf 阅读器的列表顶部添加了以下条目:
ext pdf, has foxitreader, X, flag f = foxitreader "$@"
尽管如此,pdf 文件不是通过 Foxit 而是通过 Okular 打开的。但是,如果我在终端中键入以下内容,则文件会毫无问题地打开:
foxitreader myfile.pdf
请告知我如何才能达到预期的结果。
我在 Ubuntu 18.04.2 上并使用 XTerm 终端。
所以,我的问题是,经过一系列问题(我将在下面描述)我有一个损坏的 xterm 包,现在在安装新包、更新等时总是显示错误。
这一切都始于我的 root 空间不足,dpkg 损坏,然后是 GUI 无法启动。我通过 GRUB 通过 root shell 通过释放一些空间来修复它。现在我可以登录系统并很好地使用它,除非我想安装一些软件包,最后我得到这个错误:
dpkg: error processing package xterm (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
xterm
(sometimes followed by this) E: Sub-process /usr/bin/dpkg returned an error code (1)
我试过安装、重装、卸载,但总是说包损坏,你不能这样那样,只要它损坏了。
那么我该如何解决呢?据我所知,我不需要 xterm,所以如果最安全的解决方案是杀死它,那么我不会错过,告诉我怎么做。
提前致谢!
我刚刚在笔记本电脑上安装了来自 Packages ( ) 的Ubuntu 17.10 和Mininet 2.2.2。sudo apt-get install mininet
本机,即真实机器上的真实操作系统,没有任何类型的虚拟机。笔记本电脑是 2017 款 MacBook Pro 13",不带触摸栏 (MacBookPro14,1),Ubuntu 在快速 USB 密钥上运行;只是为了完整性而写,我认为这无关紧要。
我需要对要创建的每个 Mininet 主机进行 CLI 访问,以便运行自定义测试并观察每个节点中通过的流量。
在我以前的笔记本电脑上,我有类似的设置,但使用的是旧版本的 Ubuntu,可能还有 Mininet,我设法能够xterm
从我想要的每个 Mininet 主机生成 s。问题是,我根本不记得我是怎么做到的=)。
echo $DISPLAY
返回:0
我是在常规 shell 还是在 Mininet 主机中运行它,但在常规 shell 中会xterm
打开一个 xterm 窗口。假设h1
是我的 Mininet 主机。我启动 Mininetsudo mn
并得到:
h1 echo $DISPLAY
-->:0
xterm h1
--> 什么都没有,什么也没有发生h1 xterm &
--> 什么都没有,什么也没有发生h1 xterm
-->No protocol specified. Warning: This program is an suid-root program or is being run by the root user. The full text of the error or warning message cannot be safely formatted in this environment. You may get a more descriptive message by running the program as a non-root user or by removing the suid bit on the executable. xterm: Xt error: Can't open display: %s
我能找到的所有信息都与使用 ssh 进行 X11 转发有关,而我尝试过的一切都失败了。
任何想法?
在我在这里编辑语言环境文件后,gnome-terminal 没有打开,/etc/default/locale
而且我没有安装 xterm 或任何其他终端应用程序来查看它是否运行。
我只需要编辑语言环境文件,一切都会恢复正常,或者在这种情况下,删除我在/usr/share/i18n/locales/en_US_custom
使用本指南中创建的自定义文件,以更改 Ubuntu 上的一周开始日期。
我厌倦了寻找在没有终端的情况下获得提升特权的方法——但无济于事。
就像没有 linux 上的终端,你什么都做不了,我被卡住了,我无法安装任何东西,无法 sudo 运行任何应用程序......