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

LeGEC's questions

Martin Hope
LeGEC
Asked: 2019-01-10 01:05:57 +0800 CST

gnome:我的键盘输入在哪里?

  • 0

我运行 Ubuntu 16.04,终端使用gnome-terminal和bashshell。

有时,我的一个终端变得无响应:当我在终端聚焦时按下键盘上的键时,它没有任何反应,但系统的其余部分工作正常(其他程序正确响应,系统范围的快捷方式就像Ctrl+Shift+T打开一个新终端工作等...)

大多数情况下,当我使用 编辑文件时会发生这种情况vi,也许它实际上链接到vi而不是gnome-terminalor bash,但我也看到(虽然很少见)我的一些终端卡在 bash 命令行上。

我不知道如何调试这个问题。

问题 :

  • 调试:如何查看哪个进程具有当前焦点窗口?也许查看它对什么事件做出反应?
  • Ubuntu / gnome 用法:是否有人知道某些键盘快捷键或某些相当标准的程序,它们会以某种方式将键盘输入重定向到未显示的内容?

我目前的盲目猜测是:有一些捷径,可能在键入vi命令时更容易触发,它启动了一些重定向我输入的东西。

gnome gnome-terminal bash 16.04 vi
  • 1 个回答
  • 261 Views
Martin Hope
LeGEC
Asked: 2017-12-16 01:18:19 +0800 CST

SSH:配置文件未按预期使用

  • 2

我最近从 Trusty (14.04) 更新到 Xenial (16.04),现在我在使用 ssh 和我的.ssh/config文件时有不同的行为。

以前:在配置文件中,当第一条规则将应用于主机a以将目标Hostname从更改a为b,并且另一条规则将应用于 时b,将应用第二条规则。

现在:仅应用第一个规则,忽略第二个规则。

以下是这种新行为的示例:

# I added two extra names for "127.0.0.1" :
legec@Workstation[.ssh]$ head -2 /etc/hosts
127.0.0.1   localhost
127.0.0.1   foo foo.homesweethome.com

# config file :
legec@Workstation[.ssh]$ cat ~/.ssh/config
# this rule expands "foo" to "foo.homesweethome.com"
Host foo
    Hostname foo.homesweethome.com

# this rule sets default port and user for "foo.homesweethome.com" :
Host foo.homesweethome.com
    Port 2222
    User foobar

# when running ssh :    
legec@Workstation[.ssh]$ ssh -v foo
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016
  # as you can see in the following two lines,
  # the first config rule is applied
debug1: Reading configuration data /home/legec/.ssh/config
debug1: /home/legec/.ssh/config line 1: Applying options for foo
  # the second rule is skipped
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to foo.homesweethome.com [127.0.0.1] port 22.
debug1: Connection established.

  [.. extra debug messages about possible keys to present, protocol setup ... ]

debug1: Next authentication method: password
# I was hoping to see a connection on port 2222,
# and asking the password for user foobar :
[email protected]'s password: 

我的 ssh lib 的当前版本是:

legec@Workstation[.ssh]$ ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016

[编辑]:正如fkraeim提醒我的那样,OpenSSHin Trusty (14.04) 的版本是 6.6 。

问题

  • ssh 的行为发生了什么变化?
  • 如何在上面的示例中同时应用这两个规则?

注意:对于更完整的上下文,在我的真实配置文件中,配置如下所示:

Host bar baz
    Hostname %h.homesweethome.com

Host foo
    Hostname foo.homesweethome.com

Host *.homesweethome.com
    User foobar
    Port 2222
16.04
  • 2 个回答
  • 1512 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