安装 Ubuntu 19.04 后,ALT+TAB不再将窗口分组到同一应用程序下。相反,无论它属于哪个应用程序,它都会在所有窗口中循环。在 Ubuntu 18.10 中,它的工作方式不同(在我看来更好),这样ALT+TAB在应用程序之间切换,ALT+ |(上面的键TAB)在同一应用程序的窗口之间切换。如何在 19.04 中实现此设置?
注意: ALT +|仍然在同一个应用程序的窗口中循环,但我不能先使用ALT+TAB从较短的应用程序列表中选择应用程序(与窗口列表相比),因此如果您有许多窗口,ALT+ 将TAB失去大部分功能打开。
从 Ubuntu 14.10 升级到 15.10 后,似乎不再支持gnome-terminal
使用更改首选项gconftool-2
。我猜这个问题与Gconf 与 GSettings 迁移有关。
现在,我想更改我的一些旧脚本(因为它们在 Ubuntu 15.10 中已损坏)以使用dconf
/gesettings
而不是gconftool-2
.
例如,在 Ubuntu 14.10(gnome-terminal
版本 3.6.2)上,我可以使用以下方法设置Default
配置文件中的列数:
$ gconftool-2 --set /apps/gnome-terminal/profiles/Default/default_size_columns \
--type=int 140
$ gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_custom_default_size \
--type=bool true
Run Code Online (Sandbox Code Playgroud)
现在,在 Ubuntu 15.10 中,输入:
$ dconf list /org/gnome/terminal/legacy/
Run Code Online (Sandbox Code Playgroud)
给
profiles:/
schema-version
Run Code Online (Sandbox Code Playgroud)
然而
$ gsettings list-relocatable-schemas | grep Terminal
Run Code Online (Sandbox Code Playgroud)
给
org.gnome.Terminal.SettingsList
org.gnome.Terminal.Legacy.Profile
org.gnome.Terminal.Legacy.Keybindings
Run Code Online (Sandbox Code Playgroud)
上面的输出让我感到困惑:
/org/gnome/terminal/legacy/profiles:/
路径dconf
但没有org.gnome.Terminal.Legacy.Profiles
(注意尾随s
)模式 ID …根据TeX Live 网站, TeX Live 2014 于一周前(2014 年 6 月 14 日)发布。如何在 Ubuntu 14.04 上从 TeX Live 2013 升级到 TeX Live 2014?
从 Ubuntu 17.04 升级到 17.10 后,从命令行-e
启动时,我收到有关该选项已弃用的警告gnome-terminal
。例如,假设我想打开一个带有两个选项卡的 gnome 终端,并在每个选项卡中运行单独的命令:
$ gnome-terminal --tab --active -e 'bash -c "echo Hello; exec bash"' --tab -e 'bash -c "echo Hello2; exec bash"'
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate the options and put the command line to execute after it.
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate …
Run Code Online (Sandbox Code Playgroud) 以下命令在 Ubuntu 15.10 上运行良好:
sudo apt-get build-dep emacs24
Run Code Online (Sandbox Code Playgroud)
但是,在 Ubuntu 16.04 上运行时出现以下错误:
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
Run Code Online (Sandbox Code Playgroud)
在15.10所有行(在数量约10)与deb-src
在/etc/apt/sources.list
其中取消注释,而在16.04相应线,其中注释。例如,这是我当前的 4 行sources.list
:
## Major bug fix updates produced after the final release of the
## distribution.
deb http://no.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://no.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
Run Code Online (Sandbox Code Playgroud)
这种变化的原因是什么?
接下来,我想避免/etc/apt/sources.list
每次重新安装 Ubuntu 时都进行手动编辑。这(取消注释deb-src
行)如何自动完成?
在 Ubuntu 17.04 中,我可以使用wmctrl
给定的窗口 ID 切换到 gnome-terminal 窗口:
wmctrl -ia $gnome_term_winid
Run Code Online (Sandbox Code Playgroud)
gnome-terminal
也可以通过键入以下内容从终端显示给定的窗口 ID :
echo $WINDOWID
Run Code Online (Sandbox Code Playgroud)
升级到 Ubuntu 17.10 后,情况不再如此。首先,echo $WINDOWID
什么也不给,wmctrl -lx
也不显示任何gnome-terminal
窗口。
升级到 Ubuntu 17.10 后,多个实例okular
将不再组合在桌面 Dock 中的单个图标下。
我在 X.org 下运行 17.10,如果重要的话:我正在查看带有okular
. 我测试过的所有其他应用程序都可以正常工作。例如,多个实例gnome-terminal
和emacs
将在桌面停靠栏的单个项目下分组。okular
在 17.04 中分组没有问题。
为什么将它们分组很重要?它使人们能够使用键盘快捷键在相同类型 ( Alt+ |) 的应用程序之间切换。它还可以更轻松地在不同的应用程序 ( Alt+ Tab)之间切换,因为要循环的实例更少。
如何okular
在 17.10 中正确分组实例?
我将 Ubuntu 14.04 与 Python 2.7.6 一起使用。我已经安装matplotlib
了 Python 2。现在,我刚刚使用pyenv install 3.4.2
. 然后我跑去pip install matplotlib
安装matplotlib
Python 3。后来我发现了python3-matplotlib
Ubuntu 14.04的包。我想知道:我应该sudo apt-get install python3-matplotlib
改用吗?matplotlib
与 Python 2 并行安装Python 3的首选方式是什么matplotlib
?
我正在尝试编译此示例https://learnopengl.com/Getting-started/Hello-Window:
#include <glad/glad.h>
#include <GLFW/glfw3.h>
// ...
Run Code Online (Sandbox Code Playgroud)
我已经安装了libglfw3-dev
,但是还是缺少glad.h
头文件。在packages.ubuntu.com上搜索没有结果。有一个github 页面,但据我所知,glad
它没有提供。glad.h
我正在关注如何在 Docker 容器中运行 X11 应用程序的示例。我使用的是 Ubuntu 20.04 并使用 X11:
$ echo $XDG_SESSION_TYPE
x11
Run Code Online (Sandbox Code Playgroud)
我的Dockerfile
:
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y x11-apps
ARG user=hakon
ARG home=/home/$user
RUN groupadd -g 1000 $user
RUN useradd -d $home -s /bin/bash -m $user -u 1000 -g 1000 \
&& echo $user:ubuntu | chpasswd \
&& adduser $user sudo
WORKDIR $home
USER $user
ENV HOME $home
COPY entrypoint.sh .
ENTRYPOINT ["./entrypoint.sh"]
Run Code Online (Sandbox Code Playgroud)
哪里entrypoint.sh
:
echo "DISPLAY=$DISPLAY"
xclock # <-- …
Run Code Online (Sandbox Code Playgroud)