[GH-ISSUE #828] No Bug. Need command line switches and parameters. Thank you. #657

Closed
opened 2026-05-05 06:51:19 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @ghost on GitHub (Aug 9, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/828

Operating Systems

Server: Linux Mint 20
Client: Linux Mint 20

Barrier Version

2.32

No bug to report. I would like to know what are the command line switches and parameters for barrier.

Thank you for the program.

Originally created by @ghost on GitHub (Aug 9, 2020). Original GitHub issue: https://github.com/debauchee/barrier/issues/828 ### Operating Systems ### Server: Linux Mint 20 Client: Linux Mint 20 ### Barrier Version ### 2.32 No bug to report. I would like to know what are the command line switches and parameters for barrier. Thank you for the program.
Author
Owner

@dithotxgh commented on GitHub (Aug 12, 2020):

On fedora-32 here...

to follow up with a specific question:

how can one specify the server config file? neither '--config' nor '-c' seem to have any effect.

<!-- gh-comment-id:673086936 --> @dithotxgh commented on GitHub (Aug 12, 2020): On fedora-32 here... to follow up with a specific question: how can one specify the server config file? neither **'--config'** nor **'-c'** seem to have any effect.
Author
Owner

@shymega commented on GitHub (Aug 12, 2020):

I can't see any code in the server/client main function that would facilitate switches or parameters. That is very irritating.. wonder why Symless didn't add that. I can only presume that the location of the configuration file that Barrier needs is hardcoded. In fact, I think it is..

Sorry to be the bearer of bad news.

<!-- gh-comment-id:673105730 --> @shymega commented on GitHub (Aug 12, 2020): I can't see any code in the server/client `main` function that would facilitate switches *or* parameters. That is very irritating.. wonder why Symless didn't add that. I can only presume that the location of the configuration file that Barrier needs is hardcoded. In fact, I think it is.. Sorry to be the bearer of bad news.
Author
Owner

@albertony commented on GitHub (Dec 6, 2020):

Are you trying the command-line versions (barrierc and barriers), as documented here?

<!-- gh-comment-id:739583980 --> @albertony commented on GitHub (Dec 6, 2020): Are you trying the command-line versions (barrier**c** and barrier**s**), as documented [here](https://github.com/debauchee/barrier/wiki/Command-Line)?
Author
Owner

@dithotxgh commented on GitHub (Dec 7, 2020):

On Sun, 2020-12-06 at 15:27 -0800, albertony wrote:

Are you trying the command-line versions (barrierc and
barriers), as documented here?

That stuff works fine from the command line, it's the way I did it
before flatpak.
The flatpak install won't allow it. To invoke barrier requires a
$flatpak run com.github.debauchee.barrier "$@"
and none of combos of flags or paths succeeded.

<!-- gh-comment-id:739605304 --> @dithotxgh commented on GitHub (Dec 7, 2020): On Sun, 2020-12-06 at 15:27 -0800, albertony wrote: > Are you trying the command-line versions (barrier**c** and > barrier**s**), as documented [here]( > https://github.com/debauchee/barrier/wiki/Command-Line)? > That stuff works fine from the command line, it's the way I did it before flatpak. The flatpak install won't allow it. To invoke barrier requires a $flatpak run com.github.debauchee.barrier "$@" and none of combos of flags or paths succeeded.
Author
Owner

@shymega commented on GitHub (Dec 7, 2020):

There's a solution for this.

flatpak run --command=barrierc com.github.debauchee.barrier for barrierc
and
flatpak run --command=barriers com.github.debauchee.barrier for barrierc

<!-- gh-comment-id:739949227 --> @shymega commented on GitHub (Dec 7, 2020): There's a solution for this. `flatpak run --command=barrierc com.github.debauchee.barrier` for `barrierc` _and_ `flatpak run --command=barriers com.github.debauchee.barrier` for `barrierc`
Author
Owner

@albertony commented on GitHub (Dec 7, 2020):

Nice.

I documented your findings in a pull request I already have for the command line wiki, here: https://github.com/albertony/barrier-wiki/blob/local_config/Command-Line.md#linux

<!-- gh-comment-id:739960074 --> @albertony commented on GitHub (Dec 7, 2020): Nice. I documented your findings in a pull request I already have for the command line wiki, here: https://github.com/albertony/barrier-wiki/blob/local_config/Command-Line.md#linux
Author
Owner

@shymega commented on GitHub (Dec 7, 2020):

OK, closing now - this issue has been solved, and now documented in the wiki.

<!-- gh-comment-id:740055611 --> @shymega commented on GitHub (Dec 7, 2020): OK, closing now - this issue has been solved, and now documented in the wiki.
Author
Owner

@dithotxgh commented on GitHub (Dec 7, 2020):

On Mon, 2020-12-07 at 06:23 -0800, Dom Rodriguez wrote:

There's a solution for this.

flatpak run --command=barrierc com.github.debauchee.barrier for barrierc
and
flatpak run --command=barriers com.github.debauchee.barrier for barrierc

Yes, this is the way to fire up the given "flavor" with flatpak.

However, without being able to provide a config file path,
you still have to use the gui to select a config file, unless you want the defaults,
which IMO us useless.

What is needed is a way to set, without going through the gui, the path to the config file.

That part is eesy peezy without flatpak.

<!-- gh-comment-id:740080719 --> @dithotxgh commented on GitHub (Dec 7, 2020): On Mon, 2020-12-07 at 06:23 -0800, Dom Rodriguez wrote: > There's a solution for this. > > `flatpak run --command=barrierc com.github.debauchee.barrier` for `barrierc` > _and_ > `flatpak run --command=barriers com.github.debauchee.barrier` for `barrierc` > Yes, this is the way to fire up the given "flavor" with flatpak. However, without being able to provide a config file path, you still have to use the gui to select a config file, unless you want the defaults, which IMO us useless. What is needed is a way to set, without going through the gui, the path to the config file. That part is eesy peezy without flatpak.
Author
Owner

@shymega commented on GitHub (Dec 7, 2020):

You can then pass arguments to Flatpak by appending arguments after com.github.debauchee.barrier

Example:
flatpak run --command="barrierc" com.github.debauchee.barrier "--no-tray --debug INFO --name pc1"

<!-- gh-comment-id:740084221 --> @shymega commented on GitHub (Dec 7, 2020): You can then pass arguments to Flatpak by appending arguments _after_ `com.github.debauchee.barrier` Example: `flatpak run --command="barrierc" com.github.debauchee.barrier "--no-tray --debug INFO --name pc1"`
Author
Owner

@dithotxgh commented on GitHub (Dec 8, 2020):

On Mon, 2020-12-07 at 10:04 -0800, Dom Rodriguez wrote:

You can then pass arguments to Flatpak by appending arguments after
com.github.debauchee.barrier
Example:flatpak run --command="barrierc" com.github.debauchee.barrier "--no-tray --debug INFO --name pc1"

This probably works for the client, but the point is, this instance
needs to be running as the server.
It's a trap for young players.
To run as the SERVER, you have to supply the config file to provide the
layout to know who is on first.
As it stands, using your example of quoting all the args produces the
error message: ----barriers: unrecognized option --debug WARNING --log $HOME/log/barrier.log -c $HOME/barriers.conf --address '[$myhost]:24800''Try barriers --help' for more information.---
Allowing the args to be presented as single items (standard arguments
on a command line), produces the message
$ flatpak run --command=barriers com.github.debauchee.barrier --debug
WARNING --log $HOME/log/barriers.log -c $HOME/barriers.conf --address
'[10.41.86.232]:24800'produces the error message:barriers: no
configuration available
From HOME: ls -l barriers.conf-rw-r-----. 1 me me 1256 Nov 6 02:22
barriers.conf

When starting barrier with no other flags:
flatpak run com.github.debauchee.barrier
it pops up the main dialog, and if I select Server>"use existing
configuration:", I then have to select "Browse", which allows me to
select the ~/barriers.conf, then press "Reload" and it starts.
But, when I look at the running command with 'ps', I see path to the
config file as something like "-c",
"/run/user/1000/doc/385207c7/barriers.conf",
Everything else looks like what I wanted, but something copies the file
I referenced to $XDG_RUNTIME/blahblah/barriers.conf, then references
that file.
I tried to work around the file copying by pre-copying the file there,
but it gets blown away during the barrier start up.
So I have to slog through the annoying generic startup every time,
which is not that big of a deal, only need to do it on reboot.
But there should be a way to run barriers from from the command line,
and be able to provide a path to the desired config file.

<!-- gh-comment-id:740377168 --> @dithotxgh commented on GitHub (Dec 8, 2020): On Mon, 2020-12-07 at 10:04 -0800, Dom Rodriguez wrote: > You can then pass arguments to Flatpak by appending arguments _after_ > `com.github.debauchee.barrier` > Example:`flatpak run --command="barrierc" > com.github.debauchee.barrier "--no-tray --debug INFO --name pc1"` This probably works for the client, but the point is, this instance needs to be running as the *server*. It's a trap for young players. To run as the SERVER, you have to supply the config file to provide the layout to know who is on first. As it stands, using your example of quoting all the args produces the error message: ----barriers: unrecognized option `--debug WARNING --log $HOME/log/barrier.log -c $HOME/barriers.conf --address '[$myhost]:24800''Try `barriers --help' for more information.--- Allowing the args to be presented as single items (standard arguments on a command line), produces the message $ flatpak run --command=barriers com.github.debauchee.barrier --debug WARNING --log $HOME/log/barriers.log -c $HOME/barriers.conf --address '[10.41.86.232]:24800'produces the error message:barriers: no configuration available From $HOME:$ ls -l barriers.conf-rw-r-----. 1 me me 1256 Nov 6 02:22 barriers.conf --- When starting barrier with no other flags: flatpak run com.github.debauchee.barrier it pops up the main dialog, and if I select Server>"use existing configuration:", I then have to select "Browse", which allows me to select the ~/barriers.conf, then press "Reload" and it starts. But, when I look at the running command with 'ps', I see path to the config file as something like "-c", "/run/user/1000/doc/385207c7/barriers.conf", Everything else looks like what I wanted, but something copies the file I referenced to $XDG_RUNTIME/blahblah/barriers.conf, then references that file. I tried to work around the file copying by pre-copying the file there, but it gets blown away during the barrier start up. So I have to slog through the annoying generic startup every time, which is not that big of a deal, only need to do it on reboot. But there should be a way to run barriers from from the command line, and be able to provide a path to the desired config file.
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#657
No description provided.