[GH-ISSUE #230] Confusion about default barrier.conf on Arch Linux #184

Open
opened 2026-05-05 05:33:29 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @alesandar on GitHub (Jan 18, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/230

Operating Systems

Server: Arch Linux
Client: Arch Linux

Barrier Version

2.2.0

Steps to reproduce bug

On both of my systems, if I try to start the server, without explicitly specifying a path to the configuration file, it fails with barriers: no configuration available. The man page clearly says:

If no configuration file pathname is provided then the first of the following to load successfully sets the configuration:
$HOME/.local/share/barrier/barrier.conf /etc/barrier.conf

The user-specific file exists. The latter one (system-wide) does not, but that does not really matter.
In fact, everything passes fine if I copy that configuration file path from the manual page and start the server with barriers -c $HOME/.local/share/barrier/barrier.conf .

Investigating further, I've started barriers with -d DEBUG2 option. Here's a partial output:

...opening configuration "/home/user/.local/share/barrier/.barrier.conf"
...cannot open configuration "/home/user/.local/share/barrier/.barrier.conf"

It is looking in the right directory, but for a hidden .barrier.conf file?
What do you think, is this a bad documentation or a wrong path?
Once I've made the file hidden, barriers has been initialized normally, but I do not think that it makes any sense to keep a hidden file inside a hidden directory. Imagine all your dotfiles in $HOME/.config being nested inside other hidden directories.

By the way, it seems like my synergys version prefers $HOME/.synergy.conf as a user-specific configuration file (or at least that's what their manual page says), but in my opinion it's better if we follow the XDG specifications.

Originally created by @alesandar on GitHub (Jan 18, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/230 ### Operating Systems ### Server: Arch Linux Client: Arch Linux ### Barrier Version ### 2.2.0 ### Steps to reproduce bug ### On both of my systems, if I try to start the server, without explicitly specifying a path to the configuration file, it fails with `barriers: no configuration available`. The `man` page clearly says: ``` If no configuration file pathname is provided then the first of the following to load successfully sets the configuration: $HOME/.local/share/barrier/barrier.conf /etc/barrier.conf ``` The user-specific file exists. The latter one (system-wide) does not, but that does not really matter. In fact, everything passes fine if I copy that configuration file path from the manual page and start the server with `barriers -c $HOME/.local/share/barrier/barrier.conf `. Investigating further, I've started barriers with `-d DEBUG2` option. Here's a partial output: ``` ...opening configuration "/home/user/.local/share/barrier/.barrier.conf" ...cannot open configuration "/home/user/.local/share/barrier/.barrier.conf" ``` It is looking in the right directory, but for a hidden `.barrier.conf` file? What do you think, is this a bad documentation or a wrong path? Once I've made the file hidden, barriers has been initialized normally, but I do not think that it makes any sense to keep a hidden file inside a hidden directory. Imagine all your dotfiles in `$HOME/.config` being nested inside other hidden directories. By the way, it seems like my synergys version prefers `$HOME/.synergy.conf` as a user-specific configuration file (or at least that's what their manual page says), but in my opinion it's better if we follow the XDG specifications.
gitea-mirror added the
bug
label 2026-05-05 05:33:29 -06:00
Author
Owner

@AdrianKoshka commented on GitHub (Jan 18, 2019):

I'm not 100%, but I think we look in $xdg_config_home, which should be ~/.config/barrier. Maybe the manpages haven't been updated to reflect this?

<!-- gh-comment-id:455605261 --> @AdrianKoshka commented on GitHub (Jan 18, 2019): I'm not 100%, but I think we look in `$xdg_config_home`, which should be `~/.config/barrier`. Maybe the manpages haven't been updated to reflect this?
Author
Owner

@tedder commented on GitHub (Feb 6, 2019):

fwiw barriers --help lists the correct location for Ubuntu (~/.local/share/barrier/.barrier.conf, note it is .barrier.conf). However the man page lists barrier.conf.

$ barriers --version
barriers 2.2.0-Release
Protocol version 1.6

It kinda makes sense, because the SSL files are in that folder. But the .barrier vs barrier thing is strange to me.

<!-- gh-comment-id:461002529 --> @tedder commented on GitHub (Feb 6, 2019): fwiw `barriers --help` lists the correct location for Ubuntu (`~/.local/share/barrier/.barrier.conf`, note it is `.barrier.conf`). However the man page lists `barrier.conf`. ``` $ barriers --version barriers 2.2.0-Release Protocol version 1.6 ``` It kinda makes sense, because the SSL files are in that folder. But the .barrier vs barrier thing is strange to me.
Author
Owner

@AdrianKoshka commented on GitHub (Feb 6, 2019):

Hrmm, I wonder if this was a typo made when I had barrier switch over to XDG spec.

<!-- gh-comment-id:461088642 --> @AdrianKoshka commented on GitHub (Feb 6, 2019): Hrmm, I wonder if this was a typo made when I had barrier switch over to XDG spec.
Author
Owner

@AdrianKoshka commented on GitHub (Feb 6, 2019):

Looking at the commit, I don't right off see a reason that the file should be hidden? I'll try to look into it later. 642eb33446

<!-- gh-comment-id:461090288 --> @AdrianKoshka commented on GitHub (Feb 6, 2019): Looking at the commit, I don't right off see a reason that the file should be hidden? I'll try to look into it later. 642eb334462f9d0433f9f7028c8b054c22dffe1a
Author
Owner

@makesitgood commented on GitHub (Nov 19, 2019):

[2019-11-19T08:46:50] DEBUG: opening configuration "/home/alex/snap/barrier/83/.local/share/barrier/.barrier.conf"
[2019-11-19T08:46:50] DEBUG: cannot open configuration "/home/alex/snap/barrier/83/.local/share/barrier/.barrier.conf"
[2019-11-19T08:46:50] DEBUG: opening configuration "/etc/barrier.conf"
[2019-11-19T08:46:50] DEBUG: cannot open configuration "/etc/barrier.conf"
barriers: no configuration available
alex@cooper:~$ cat /etc/barrier.conf
# Conf file lol
#

section: screens
    cooper:
    peregrine:
end

section: links

    peregrine:
        right = cooper

    cooper:
        left = peregrine

end
<!-- gh-comment-id:555540907 --> @makesitgood commented on GitHub (Nov 19, 2019): ```alex@cooper:~$ barrier.barriers -d DEBUG2 -a 10.233.30.71 [2019-11-19T08:46:50] DEBUG: opening configuration "/home/alex/snap/barrier/83/.local/share/barrier/.barrier.conf" [2019-11-19T08:46:50] DEBUG: cannot open configuration "/home/alex/snap/barrier/83/.local/share/barrier/.barrier.conf" [2019-11-19T08:46:50] DEBUG: opening configuration "/etc/barrier.conf" [2019-11-19T08:46:50] DEBUG: cannot open configuration "/etc/barrier.conf" barriers: no configuration available alex@cooper:~$ cat /etc/barrier.conf # Conf file lol # section: screens cooper: peregrine: end section: links peregrine: right = cooper cooper: left = peregrine end
Author
Owner

@hanatokitsu commented on GitHub (May 8, 2020):

I think @AdrianKoshka is right; the config file should live in $XDG_CONFIG_HOME since this is explicitly a user defined configuration file, not $XDG_DATA_HOME for application data.

<!-- gh-comment-id:625962701 --> @hanatokitsu commented on GitHub (May 8, 2020): I think @AdrianKoshka is right; the config file should live in $XDG_CONFIG_HOME since this is explicitly a user defined configuration file, not $XDG_DATA_HOME for application data.
Author
Owner

@simons-public commented on GitHub (May 9, 2020):

@expl0ratory What are the permissions on those files and what user is the barriers process running under?

[2019-11-19T08:46:50] DEBUG: cannot open configuration "/etc/barrier.conf"

Also is this installed with snap? It may not have access to the real /etc or be looking in the actual $HOME directory if it is.

You might try installing from AUR with barrier or barrier-git and see if you still have the issue.

<!-- gh-comment-id:626080538 --> @simons-public commented on GitHub (May 9, 2020): @expl0ratory What are the permissions on those files and what user is the `barriers` process running under? > `[2019-11-19T08:46:50] DEBUG: cannot open configuration "/etc/barrier.conf"` Also is this installed with snap? It may not have access to the real `/etc` or be looking in the actual `$HOME` directory if it is. You might try installing from AUR with [barrier](https://aur.archlinux.org/packages/barrier/) or [barrier-git](https://aur.archlinux.org/packages/barrier-git/) and see if you still have the issue.
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#184
No description provided.