How to use the program Jail in terminal?

Hello

I am trying to use a program called "jail" in my terminal, its a program which is made to lock my pointer cursor to a specific monitor

When i run the program by typing "Jail X1 Y1 X2 Y2" in the konsole, the cursor locks to the left corner of my second monitor and the output tells me that:

Jail X1 Y1 X2 Y2
Opening display :0
thisScreen: 0 -- otherScreen: 1

I guess this means I'm in some sort of config mode? How do i configure this program? When I am at this point I have to press ctrl+c to shut down the program because I don't know how to do anything

I guess this is a general skill I have to learn in order to use software from the AUR? Could someone point me in the right direction? Search results online are all horrible

garuda-inxi
System:
Kernel: 6.1.11-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=ac3db51d-0458-4e6e-a36e-12defe2236f9 rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASUSTeK model: PRIME A320I-K v: Rev X.0x
serial: <superuser required> UEFI: American Megatrends v: 2203
date: 07/28/2020
CPU:
Info: model: AMD Ryzen 5 2600 bits: 64 type: MT MCP arch: Zen+ gen: 2
level: v3 note: check built: 2018-21 process: GF 12nm family: 0x17 (23)
model-id: 8 stepping: 2 microcode: 0x800820D
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
L3: 16 MiB desc: 2x8 MiB
Speed (MHz): avg: 1957 high: 3763 min/max: 1550/3400 boost: enabled
scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2797 2: 1551
3: 1310 4: 1407 5: 2571 6: 1489 7: 3763 8: 1267 9: 1269 10: 1534 11: 2982
12: 1547 bogomips: 81437
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Sapphire Nitro+ driver: amdgpu v: kernel arch: GCN-4
code: Arctic Islands process: GF 14nm built: 2016-20 pcie: gen: 3
speed: 8 GT/s lanes: 16 ports: active: DP-2,DVI-D-1
empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 07:00.0 chip-ID: 1002:67df
class-ID: 0300 temp: 47.0 C
Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8
compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 4033x1080 s-dpi: 96 s-size: 1064x285mm (41.89x11.22")
s-diag: 1102mm (43.37")
Monitor-1: DVI-D-1 mapped: DVI-D-0 pos: left model: BenQ XL2411Z
serial: <filter> built: 2016 res: 1920x1080 dpi: 92 gamma: 1.2
size: 531x298mm (20.91x11.73") diag: 609mm (24") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
Monitor-2: DP-2 mapped: DisplayPort-1 pos: primary,right model: VG259QM
serial: <filter> built: 2021 res: 1920x1080 dpi: 90 gamma: 1.2
size: 544x303mm (21.42x11.93") diag: 623mm (24.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: OpenGL v: 4.6 Mesa 22.3.4 renderer: AMD Radeon RX 570 Series
(polaris10 LLVM 15.0.7 DRM 3.49 6.1.11-zen1-1-zen) direct-render: Yes
Audio:
Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
vendor: Sapphire driver: snd_hda_intel v: kernel bus-ID: 3-2:3
chip-ID: 041e:3256 pcie: gen: 3 class-ID: 0300 serial: <filter>
speed: 8 GT/s lanes: 16 bus-ID: 07:00.1 chip-ID: 1002:aaf0 class-ID: 0403
Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 09:00.3
chip-ID: 1022:1457 class-ID: 0403
Device-3: Creative Sound BlasterX G6 type: USB
driver: hid-generic,snd-usb-audio,usbhid
Sound API: ALSA v: k6.1.11-zen1-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.65 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 10ec:8168
class-ID: 0200
IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A
mac: <filter>
IF-ID-2: proton0 state: unknown speed: 10 Mbps duplex: full mac: N/A
Drives:
Local Storage: total: 4.08 TiB used: 39.41 GiB (0.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SUV400S37480G
size: 447.13 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: 56R8 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Seagate
model: Expansion HDD size: 3.64 TiB block-size: physical: 4096 B
logical: 512 B type: N/A serial: <filter> rev: 1901 scheme: GPT
Partition:
ID-1: / raw-size: 446.83 GiB size: 446.83 GiB (100.00%)
used: 39.41 GiB (8.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 608 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 446.83 GiB size: 446.83 GiB (100.00%)
used: 39.41 GiB (8.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 446.83 GiB size: 446.83 GiB (100.00%)
used: 39.41 GiB (8.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 446.83 GiB size: 446.83 GiB (100.00%)
used: 39.41 GiB (8.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.55 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 32.1 C mobo: N/A gpu: amdgpu temp: 47.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 747
Info:
Processes: 407 Uptime: 41m wakeups: 0 Memory: 15.55 GiB
used: 5.85 GiB (37.6%) Init: systemd v: 252 default: graphical
tool: systemctl Compilers: gcc: 12.2.1 Packages: pm: pacman pkgs: 1411
libs: 436 tools: octopi,paru Shell: fish v: 3.6.0 default: Bash v: 5.1.16
running-in: konsole inxi: 3.3.25
Garuda (2.6.14-1):
System install date:     2023-02-13
Last full system update: 2023-02-16 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager mkinitcpio
Windows dual boot:       No/Undetected
Failed units:

Hi,
edit your text please, for the terminal output use
~~~
Terminal text
~~~
then others can easily expand or copy the text.

terminal text
then others can easily expand or copy the text in the view. Move the mouse pointer over it in the upper right corner.

Move the mouse pointer over it in the upper right corner.

Did you try with &?

Jail X1 Y1 X2 Y2 &
2 Likes

Most commandline programs will have a manual, or at least help pages, available. the command to read the manual is man, so you could try man jail and see if anything comes up. If not, jail -h or jail --help could have some info.

1 Like

How do I edit my post?

I can add an emoji, share link, flag it, bookmark it, delete it (dont have permission), reply to it

it says the post was edited once on feb 18

Do i only get 1 edit per post or what?

On the topic of the terminal program:

Running:
Jail X1 Y1 X2 Y2 &

Also caused the same problem, but this time ctrl+c didn't shut down the program, so I had to run:
Kill Jail

Sorry for being annoying sir

Just done for you.

Seems new user have fewer permissions :slight_smile:

That’s the way “&” work.

BTW, IDK Jail or jail, time for you to ask the developer or open issue in Git …

1 Like

Running Jail -h and Jail --help both brought up this
Usage: Jail X1 Y1 X2 Y2

Which leaves me a bit confused

Thanks anyway, didn't know about the manual thing

Ok thanks. I will remember the tripple tilda thing for next post

1 Like

X1 ... are vars, you must use the coordinates.

How do you install jail?

1 Like

I installed it by cloning this https://aur.archlinux.org/jail.git

and then building and upgrading

I wonder if the program means i should set coordinates to my monitor resolution, gonna try that, its stuck in left corner because x and y are 1 ? maybe

Thats your “screen” , now set the values you need.

The gentoo wiki fails.

But I’m sure it must be jail not Jail. And try also

man jail

in terminal

1 Like

man jail
No manual entry for jail

The gentoo .ru side is not reachable for me, so ...

Summary

Not secure

1 Like

I think im making progress..

Im running

Jail X1 1920x1080 Y1 X2 1920x1080 Y2

And I get the return

Opening display :0
thisScreen: 0 -- otherScreen: 1

Here I am locked though, got any ideas? How do i proceed the setup?

The progress being that i think i figured out that this program has a maximum of 4 monitors and that i want to configure X1 and X2 because my monitors are stacked horizontally..

yea... took a while to figure that one out

I am not familiar with the tool, but my guess would be the X’s and Y’s are referring to the traditional axes of a graph.

Definition of X Axis

If that’s right, each X would have one value and each Y would have one value and you would describe the boundaries of the jail that way (i.e. X1 and Y1 would be 0, X2 would be 1920, and Y2 would be 1080. Or something like that :wink:).

Yep i tried that some days ago but with no good result

I'm using a program called xpointerbarrier at the moment and works as far as locking down the cursor goes..