-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add freebsd support #51
Add freebsd support #51
Conversation
7e71839
to
d3c20c9
Compare
@@ -64,7 +64,7 @@ Ergo looks for a `.ergo` file inside the current directory. It must contain the | |||
Ergo comes with a setup command that can configure it for you. The current systems supported are: | |||
|
|||
- osx | |||
- linux-gnome | |||
- gnome (tested on Linux and FreeBSD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about just leaving gnome
cause it isn't actually an "OS" hehe we will be lying on the description. Can we try to guess if the system uses gnome
at its network manager? I think we can go for something like this.
We will have the linux
and freebsd
options and we try to guess its network manager. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. It would be awkward to use gnome for some operating systems and osx or windows for others (GUI vs OS).
I think we should try and see if it is possible to guess the window manager like you suggested.
One option (although maybe not the best) would be to just look for gsettings. If the program finds gsettings, then it just considers gnome. This would of course not be ok on the systems that have several window managers.
On the other hand, for windows and osx it is somewhat redundant to append the OS to the setup command:
ergo setup osx
(since you can already be sure that you run it on osx).
So, perhaps running ergo setup
(without a parameter) would be ok, and then, if the system sees that it is running on linux or freebsd, it can check for gsettings.
So the flow would be::
ergo setup
results in the systems checking the OS. If it is windows or osx, then it just goes ahead and it runs the setup for osx or windows. If the OS is linux or freebsd, ergo can try to find the command gsettings (or better guess the present window manager) and run the setup for it.
This also opens for more features latter (like KDE or XFCE window manager support) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option (although maybe not the best) would be to just look for gsettings. If the program finds gsettings, then it just considers gnome. This would of course not be ok on the systems that have several window managers.
I think it could be an option. Also would be simpler to add other managers.
On the other hand, for windows and osx it is somewhat redundant to append the OS to the setup command:
Yeah! The command setup
wouldn't need the arg system
anymore, cause since we will try to guess the manager for linux/freebsd. We will need just get the current system on runtime.GOOS
. Need to test if it can be changed by passing the GOOS
env var though and if by changing it could cause some bug for ergo setup
I think we can try this approach :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could for example have both Gnome and KDE installed. If, when using ergo, we are using KDE, we could try to start ergo for gnome (with gsettings) just because gsettings is found. I believe that using the env var DESKTOP_SESSION would be a better option (but then we have to take in consideration that there are also Mate distributions or Cinnamon an both of them are gnome). I believe we can try something like:
- if the system is linux or bsd, check for the flag that defines window manager (for osx and windows there is no need to do it)
- if no flag is passed, then try to find it out, else just start the setup for the passed window manager
- if the window manager can be guessed, start the setup for it, else inform the user that ergo cannot guess the window manager and tell it what window managers we know off.
This should clear the problems, but would raise new issues if we decide to go for a service. What happens when you install the service and the window manager is not recognised?
241550f
to
c108708
Compare
fbb1c4e
to
fe26fa6
Compare
53d2aed
to
f7a8f63
Compare
f7a8f63
to
10e6f01
Compare
This is just a proposition to add support for FreeBSD.
This extends the #49 PR.
This solves #50