
{"id":34016,"date":"2021-06-21T16:09:00","date_gmt":"2021-06-21T16:09:00","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=34016"},"modified":"2023-12-12T06:46:39","modified_gmt":"2023-12-12T06:46:39","slug":"setup-barrier-share-mouse-keyboard-between-computers","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/06\/setup-barrier-share-mouse-keyboard-between-computers\/","title":{"rendered":"Install \/ Setup Barrier to Share Mouse &#038; Keyboard Between Your Computers"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-44897\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><b>Working with multiple computers at your desk? To make it clean, you can use single mouse and keyboard to control all the machines via Barrier.<\/b><\/p>\n<p>Barrier is a <i>free<\/i> and <i>open-source<\/i> solution forked from Synergy. It makes it easy to share mouse &amp; keyboard, over local network, between machines running Windows, Linux, Mac OS, FreeBSD. Either wired, wireless, or laptop&#8217;s built-in keyboard and touchpad can be shared with the software.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34017\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines-600x335.jpg\" alt=\"\" width=\"600\" height=\"335\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines-600x335.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines-300x168.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines-768x429.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/multi-machines.jpg 1100w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>NOTE: This tutorial is tested in following machines:<\/b><\/p>\n<ul>\n<li>Two Windows 10 machines, both wired network &#8211; working so far so good!<\/li>\n<li>Ubuntu 22.04 (server, wireless network), and Windows PC (wired network) &#8211; sometimes works, sometimes NOT<\/li>\n<\/ul>\n<h3>1. How to Install Barrier<\/h3>\n<p>Barrier is a popular software that most Linux Distros have it in the main repositories. So you can install it in Linux either via system package manager or Distro&#8217;s own command line installer (e.g., <code>apt install<\/code>, <code>dnf install<\/code>, and <code>pacman -S<\/code>)<\/p>\n<p>For <b>Ubuntu 20.04\/22.04<\/b> &amp; higher, <b>Linux Mint 20\/21<\/b>, and current Debian releases, open <code>terminal<\/code> and run command to install it:<\/p>\n<pre style=\"border: none;\">sudo apt install barrier<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/apt-barrier.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34019\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/apt-barrier-600x203.jpg\" alt=\"\" width=\"600\" height=\"203\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/apt-barrier-600x203.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/apt-barrier-300x101.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/apt-barrier.jpg 711w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Since Ubuntu 20.04 has version 2.3.2, you can alternatively install most recent version using the <a href=\"https:\/\/flathub.org\/apps\/details\/com.github.debauchee.barrier\" target=\"_blank\" rel=\"noopener\">Flatpak<\/a> or <a href=\"https:\/\/snapcraft.io\/barrier\" target=\"_blank\" rel=\"noopener\">Snap package<\/a>.<\/p>\n<p>For <b>Windows<\/b> and <b>Mac OS<\/b>, the latest packages are available to download at the link below:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/github.com\/debauchee\/barrier\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">Download Barrier<\/a><\/div>\n<\/div>\n<h3>2. Setup Barrier server and client.<\/h3>\n<p><b><i>After installed Barrier in all the machines,<\/i><\/b>\u00a0launch it, choose your language and then select either <i>Server<\/i> or <i>Client<\/i>.<\/p>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 50%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-34016 gallery-columns-2 gallery-size-medium'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/ubuntuhandbook.org\/index.php\/2021\/06\/setup-barrier-share-mouse-keyboard-between-computers\/barrier-setup1\/'><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"224\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup1-300x224.jpg\" class=\"attachment-medium size-medium\" alt=\"\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup1-300x224.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup1.jpg 596w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/ubuntuhandbook.org\/index.php\/2021\/06\/setup-barrier-share-mouse-keyboard-between-computers\/barrier-setup2\/'><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"224\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup2-300x224.jpg\" class=\"attachment-medium size-medium\" alt=\"\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup2-300x224.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup2.jpg 596w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p>Select &#8220;<strong><i>Server<\/i><\/strong>&#8221; on the machine that connected with the mouse and keyboard. And all others set to &#8220;Client&#8221;.<\/p>\n<h4>Setup the server.<\/h4>\n<p>On the server computer, click on &#8220;Configure Server&#8230;&#8221; button.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-44894\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server.webp\" alt=\"\" width=\"433\" height=\"483\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server.webp 433w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-269x300.webp 269w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/a><\/p>\n<p>In the screen configuration page, you have to <i><u>drag and drop small &#8220;computer&#8221; icon into the grid<\/u><\/i> to add clients.<\/p>\n<ul>\n<li>The center one is the current server screen.<\/li>\n<li>Drag &amp; drop &#8216;computer&#8217; icon to create client screens.<\/li>\n<li>Double-click to <b>rename client screen name<\/b> (according to the name show in Barrier app in client machines).<\/li>\n<li>Move client screens around the server (left, right, top, bottom) as you prefer.<\/li>\n<\/ul>\n<p>In the case (as picture shows), when I move the mouse cursor to the left screen edge in server, the mouse &amp; keyboard will take control of &#8220;fedora&#8221; machine. In &#8220;fedora&#8221;, move to the right screen edge will go back to server machine.<\/p>\n<p>As well, move the cursor to the right edge in server will go to &#8220;Desktop-PC&#8221;.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34023\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config-600x416.jpg\" alt=\"\" width=\"600\" height=\"416\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config-600x416.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config-300x208.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config-768x532.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-server-config.jpg 840w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>In the &#8220;Hotkeys&#8221; tab, you can configure keyboard shortcut to switch screens.<\/p>\n<ul>\n<li>First click &#8216;New&#8217; and create a shortcut key.<\/li>\n<li>Second highlight the key you created.<\/li>\n<li>Click &#8216;New&#8217; in right to specify an action to perform.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34028\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut-600x411.jpg\" alt=\"\" width=\"600\" height=\"411\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut-600x411.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut-300x206.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut-768x526.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-shortcut.jpg 937w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>And you can get optional settings in the &#8216;Advanced server settings&#8217; page. They include:<\/p>\n<ul>\n<li>switch time delay.<\/li>\n<li>dead corners.<\/li>\n<li>transfer and share files between machines.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-44896\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced-600x387.webp\" alt=\"\" width=\"600\" height=\"387\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced-600x387.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced-768x496.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-config-advanced.webp 902w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h4>Setup the client.<\/h4>\n<p>It&#8217;s easy to configure the clients since it supports &#8216;auto config&#8217;. Just click start, it will automatically connect to the server if available, and prompt you to trust the fingerprint if SSL enabled.<\/p>\n<p>By disabling &#8216;Auto config&#8217;, you can type server IP manually. And a dialog will pop-up indicates you connected successfully.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34029\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup3-600x408.jpg\" alt=\"\" width=\"600\" height=\"408\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup3-600x408.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup3-300x204.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-setup3.jpg 720w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>For connecting issues<\/b>, check the log from menu. As well, you can change the listening port, toggle SSL via settings menu.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-menu.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34027\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-menu.jpg\" alt=\"\" width=\"395\" height=\"254\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-menu.jpg 395w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/barrier-menu-300x193.jpg 300w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/a><\/p>\n<p>NOTE: for better working, try <strong>disable &#8220;Enable SSL&#8221;<\/strong> in both server and clients machines.<\/p>\n<h3>3. Start Sharing<\/h3>\n<p>After setup both server and clients, click &#8216;Start&#8217; button in both machines. Then, try moving mouse cursor to screen edge to switch machine, or use the keyboard shortcut you set.<\/p>","protected":false},"excerpt":{"rendered":"<p>&nbsp; Working with multiple computers at your desk? To make it clean, you can use single mouse and keyboard to control all the machines via Barrier. Barrier is a free and open-source solution forked from Synergy. It makes it easy to share mouse &amp; keyboard, over local network, between machines running Windows, Linux, Mac OS, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34017,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2043],"class_list":["post-34016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-share-mouse-keyboard"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=34016"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34016\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34017"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=34016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=34016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=34016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}