Barrier: auto start when installed via flatpak

Created on 24 Sep 2019  路  10Comments  路  Source: debauchee/barrier

Operating Systems

Server: Windows 10

Client: Ubuntu 18.04

Barrier Version

2.3.1

Question

If I installed Barrier via flatpak on the client side (linux), how do I make the client auto start? This is because the client is installed on a server to which I have no easy access to the keyboard/mouse, only to its display output, and since I frequently need to reboot the machine, it would be useful if I could promptly start using the keyboard/mouse of the server instead of having to start the Barrier software manually after each restart. Also, the client machine has auto-login enabled, so my user session is started immediately, and I do not require Barrier to run as root.

Thank you for your time. Regards,
Alexandre Vieira

All 10 comments

If I installed Barrier via flatpak on the client side (linux), how do I make the client auto start?

I guess through your desktop-environments auto-start mechanism, you could try to add flatpak run com.github.debauchee.barrier.

I guess through your desktop-environments auto-start mechanism, you could try to add flatpak run com.github.debauchee.barrier.

Thank you for your reply! This however does not configure the client to point to the correct server IP, how should I do this?

Oh, hrm, let me get back to you on that! :)

Every time I booted Linux I too had to re-input the server IP. Seems to be a wider issue in play; "Barrier client not necessarily retaining server IP across Linux executions." Plus a really good question: "How is it meant to do so!"
Anyway, it's now remembering the IP address! I don't know why but one thing I did was go through the motions of the (client-side) 'Save Configuration'.
To get autostart working I did the following ...
(1) Copy the flatpak desktop to /etc/xdg/autostart/
sudo cp /var/lib/flatpak/app/com.github.debauchee.barrier/current/active/files/share/applications/com.github.debauchee.barrier.desktop /etc/xdg/autostart/
(2) Edit the 'Exec' directive
Exec=flatpak run com.github.debauchee.barrier
NB: This was on a Debian setup.

"Exec=flatpak run com.github.debauchee.barrier"

This did not work on a fresh install of MX-18.3 with an error output of "bash: run: command not found". I had thought that since MX is also based on Debian that your Exec directive edit command would have worked here too. But nope, lol. Probably going to take me a long time to figure out how to auto start Barrier today.

It seems that bash thought you wanted to execute run instead of flatpak run.

Haha, wow you replied in like a minute after I posted that above. Lol, you must have been sitting waiting for me, haha. J/K

EDIT: Got it working by simply using the built in Auto start in "Session and Startup" manager. Just put that "flatpak run com.github.debauchee.barrier" in the command section and rebooted. It remembered the settings just fine. Thanks for the quick reply.

No problem, I had just gotten out of bed.

Got it working by simply using the built in Auto start in "Session and Startup" manager. Just put that "flatpak run com.github.debauchee.barrier" in the command section and rebooted. It remembered the settings just fine. Thanks for the quick reply.

I too solved my problem using "Session and Startup" manager, but using the Barrier installed from the "Ubuntu Software" app installer, since I figured out it was available through there, and thus uninstalled the flatpack version.

Thank you for all your replies.

Every time I booted Linux I too had to re-input the server IP. Seems to be a wider issue in play; "Barrier client not necessarily retaining server IP across Linux executions." Plus a really good question: "How is it meant to do so!"
Anyway, it's now remembering the IP address! I don't know why but one thing I did was go through the motions of the (client-side) 'Save Configuration'.
To get autostart working I did the following ...
(1) Copy the flatpak desktop to /etc/xdg/autostart/
sudo cp /var/lib/flatpak/app/com.github.debauchee.barrier/current/active/files/share/applications/com.github.debauchee.barrier.desktop /etc/xdg/autostart/
(2) Edit the 'Exec' directive
Exec=flatpak run com.github.debauchee.barrier
NB: This was on a Debian setup.

How to specify server address while running flatpak run on "startup and sessions" in ubuntu

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PlatinumDragon picture PlatinumDragon  路  5Comments

geraldvillorente picture geraldvillorente  路  4Comments

enricodetoma picture enricodetoma  路  4Comments

graingert picture graingert  路  4Comments

TheCire picture TheCire  路  4Comments