-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically start Barrier on boot in Raspbian Buster #508
Comments
I don't believe that Debian Buster uses #36 would have fulfilled this requirement, and I will make a PR soon to provide these units for a systemd user service, and possibly a systemd system service, but I'm not really convinced we need a systemd system service. Could you confirm that Raspbian Buster uses systemd or sysvinit? You can check for systemd by running Thanks for the report! |
@shymega, wouldn't a systemd system service allow users to use barrier for accessing client computers' display manager/login? |
@candeira Not sure. It could potentially work, but it wouldn't be per-user, and only for the root user, I'd imagine - so you'd need two Barrier configs.. on the same system. At least, that's how I understand it. I'd personally stick with a user service, but I can see the appeal of Barrier being available on the DM. |
My personal situation is a PC where I don't have physical keyboards attached, and in come cases I find myself having to switch to TTY. |
My solution for this is a set of scripts used on my Raspberry Pi 4 and couple another Linux boxes that I revision control in a gist over here: https://gist.github.com/dayne/e3a7f31f0624bf299faf9fadfe510322 I see I have a note about fixing up my bash script stuff to make it work correctly in a mac... I'll loop back to that in the future but what I've linked above works for me on my RPi. |
Before I go off and try to configure this from scratch, what is the expected way to initiate a Barrier connection with a headless client? |
Adding:-
to the end of /home/pi/.profile was enough to get it running automatically upon boot up into desktop mode for me |
@rebroad In this context, "at boot" means before logging in. |
@lornix This will start Barrier on login, not on boot. This issue is about starting Barrier before any user is logged in, so that on multi-user systems someone can enter credentials at the login screen. |
@simons-public Amazing! I left a review comment, I hope you don't mind me jumping in. |
I am sorry, but could someone please explain to me how I am supposed to do this? I am completely starting from scratch with my Raspberry Pi and I want to connect my keyboard and mouse first. I don't have any other users but the main one so I don't need to log on. I just need to run Barrier on startup so I don't have to plug in my keyboard first. Can somebody please help me? Thanks in forward. |
If you visit the /home/pi folder in the file explorer and in the drop down menu beside the address bar select to show hidden files, you'll see the ".profile" file. You just need to add "barrier &" to the end of that. EDIT: This is working for me now. |
Thank you! adding |
Thank you! Was forever changing dongle to boot Barrier - worked perfectly |
I've added "barrier & to the end of my " .profile" file |
@LRC32901 You may be able to change the line to |
This is working for me:
The script (change barrier_host to the correct ip address for your barrier server, i.e., the one with the keyboard and mouse): #!/bin/bash |
Hi guys, here is my solution to have the client automatically running on my raspberry pi: edit file The standard user "pi" is automatically loged in, this means that on the monitor already the desktop is visible. As soon as I start barrier server on my Laptop with Ubuntu 20.04, the connection establishes within seconds. Maybe this helps someone! |
This worked like a charm for me, thanks! |
If you use Dynamic DNS providers like No-IP, DuckDNS or similar, you can replace the IP address in the command with the your DDNS hostname (eg. |
@DanielGlaas, I cam looking for exactly this - worked like a charm! Thanks for saving hours of digging. |
Thank you! Spent at least 2-3 hours just going through GitHub and google search results trying to find a way to automate it and tried like 5-6 different solutions, and this is the only one that worked. Once again, thanks! |
now everyone is posting solutions here is mine because yaall`s didn't work for me lmao I installed Putty.org and made 2 scripts one for the pi and 1 for windows to ssh and run the script onto the pi " plink -ssh [email protected] -pw Password -m C:\barrier.sh " < Turn this into a .bat file in windows and put the barrier.sh in your C:\ Barrier.sh script: " barrierc --name raspberrypi --no-restart --no-daemon 192.168.X.X " now you got yourself a button on your windows machine to ssh into your pi and launch barrier on your pi use the IP address of your keyboard and mouse host |
Thanks, works for me, Raspberry 3B. Shows some errors after loging via SSH, but barrier works. |
Operating Systems
Server: Windows 10
Client: Raspbian Buster
Barrier Version
Server: 2.3.2-snapshot-210c2b70
Client: 2.3.2-snapshot-36ed253e
Problem
I would like to make Barrier automatically start on boot on my Raspberry Pi 4 running Raspbian Buster. Currently, I have to connect a second mouse/keyboard pair to my Raspberry Pi in order to start up Barrier, which kind of defeats the purpose. 🙃 Is this possible? I tried adding
barrier &
toetc/rc.local
and rebooting the Pi, but that didn't work.The text was updated successfully, but these errors were encountered: