[GH-ISSUE #191] Sending Ctrl+Alt+Fn from linux client #155

Open
opened 2026-05-05 05:26:21 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @Ashark on GitHub (Dec 4, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/191

Operating Systems

Server: Linux
Client: Unimportant, but linux in mind

Barrier Version

2.1.0 built from aur (ArchLinux)

Description

Sometimes you want to switch to tty on a client. You cannot press ctrl+alt+f2 via barrier client, because your server switches to tty2.

It is easy to implement this. Just need to run a command when mouse leaving server and another command when it returns back.
There is a command setxkbmap -option srvrkeys:none that tells xserver to stop interpret ctrl+alt+fx as a special shortcut. Then it is possible to send such keystrokes to client.
After return to client, run setxkbmap -option to be able to switch your server to tty.

I have found two problems however:
I could not switch client back to X via barrier for some reason.
Switching layout shortcut gets lost on a server after running setxkbmap -option, so I needed to run setxkbmap -option grp:alt_shift_toggle to restore it.

Originally created by @Ashark on GitHub (Dec 4, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/191 ### Operating Systems ### Server: Linux Client: Unimportant, but linux in mind ### Barrier Version ### 2.1.0 built from aur (ArchLinux) ### Description ### Sometimes you want to switch to tty on a client. You cannot press ctrl+alt+f2 via barrier client, because your server switches to tty2. It is easy to implement this. Just need to run a command when mouse leaving server and another command when it returns back. There is a command `setxkbmap -option srvrkeys:none` that tells xserver to stop interpret ctrl+alt+fx as a special shortcut. Then it is possible to send such keystrokes to client. After return to client, run `setxkbmap -option` to be able to switch your server to tty. I have found two problems however: I could not switch client back to X via barrier for some reason. Switching layout shortcut gets lost on a server after running `setxkbmap -option`, so I needed to run `setxkbmap -option grp:alt_shift_toggle` to restore it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#155
No description provided.