# [Solved] I miss preconfigured packages like of Linux



## giahung1997 (May 3, 2018)

If you're a experienced user or ready to spend hours to figure out how to do it, it's not a problem for you. As a non-experienced user and not ready to invest (please don't blame me), I'd love to have something like preconfigured packages like of Linux. I miss it so much. Don't you think it's evil to have xfce4 installed but can't shutdown or reboot because some silly consolekit rules need to be write, I wonder?  The settings are printed on the screen and you already know I will copy it as is, no customizations, why don't you did it for me?  If it's about your conservative philosophies why don't make something like xfce4-preconfigured (only contains the config files) and it will overwrite the vanilla ones installed by xfce4, so made the life of people like me easier?


----------



## rigoletto@ (May 3, 2018)

Making it very short, it is easier to enable what you need/want than disable everything you do not need/want. Plus, currently there are +34K ports to be maintained by a few hundreds of FreeBSD @ports people (working at their free time) and the community.


----------



## phoenix (May 3, 2018)

Give a man a fish, and he'll be fed for a day.

Teach a man to fish, and he'll be fed for a lifetime.


----------



## rigoletto@ (May 3, 2018)

Also, on FreeBSD everyone can (proxy) maintain a port. So, unless there is actual reason, no one will hold you to create and maintain xfce4-preconfigured port. 

In other words, everyone are (more or less) by it's own.

If you desire, you should start reading the FreeBSD Porter's Handbook.


----------



## ralphbsz (May 3, 2018)

phoenix said:


> Teach a man to fish, and he'll be fed for a lifetime.


No, he'll spend all his money on boats and fishing gear, and spend all weekend on the lake drinking beer.

Seriously: Why did the xfce4 maintainer do that?  Either it was an honest mistake.  Maybe they are terribly overworked, and overlooked it, because they were busy jumping to the next volunteer task.  Remember, unlike Linux (which has thousands of people who get a paycheck for maintaining it, RedHat alone has over 10K employees, although most are not developers but support and G&A), most FreeBSD work is done by unpaid volunteers.  Or perhaps the xfce4 maintainers thought that not performing the customization for you is a good choice, perhaps because doing it automatically might be too dangerous.

Why don't you send them a polite e-mail and ask?  And perhaps first look at the port, and see how much work it would take to automatically perform the preconfigured customization, and offer them patches, in case they like those?


----------



## Phishfry (May 3, 2018)

giahung1997 said:


> xfce4 installed but can't shutdown or reboot


This symptom is what happens when I run xfce4 without dbus.
Are you sure you have`dbus_enable="YES"` in your /etc/rc.conf ?

You mentioned consolekit. How are you starting Xfce4 ?
They use a default script and no files need modification at all.
`pkg install xorg xfce4 xf86-video-xxxxx`
Thats it.
`service dbus onestart
startxfce4`
You do need to either run dbus in a one-start mode or run it full time from /etc/rc.conf for your shutdown menu to work.


----------



## Crivens (May 3, 2018)

Wouldn't that be a project for you? A tool that checks all installed ports for these messages and tries to parse them, then offering to apply that?


----------



## drhowarddrfine (May 3, 2018)

giahung1997 Apparently your complaint is about one package. FreeBSD packages, overall, come pre-configured "just like Linux".


----------



## Phishfry (May 3, 2018)

giahung1997 said:


> the settings are printed on the screen and you already know I will copy it as is, no customizations, why don't you did it for me?


You should see a big install like Zoneminder. There are 4 configuration files to deal with. They too are printed on screen.
Why does FreeBSD not do them automatically.

Well the answer is imagine if you already had mySQL installed and you go stomping on it with a Zoneminder install.
So the FreeBSD approach is "learn how to set it up yourself".
That way you know what's going on.


----------



## Phishfry (May 3, 2018)

The reason I ask how you start Xfce4 is some instructions online show using an .xinitrc file with exec startxfce4 and some people wrongly add consolekit options in it. But if you look at the actual startxfce4 script it runs consolekit for you. So you can end up trying to runing console kit twice and end up with lots of consolekit problems that way. So just a heads up there.
No .xinitrc needed for Xfce4. Just run startxfce4.


----------



## giahung1997 (May 15, 2018)

lebarondemerde said:


> Making it very short, it is easier to enable what you need/want than disable everything you do not need/want. Plus, currently there are +34K ports to be maintained by a few hundreds of FreeBSD @ports people (working at their free time) and the community.


This is nonsense but appear again and again. Many small hobbyist Linux distro even smaller, but they can. Why don't give the user what usable despite being minimal/the part they always need? It's OK for the extra stuffs to be delegated to the user to prevent bloat and ease of own tastes/customizations.

For Example: I hear again and again on this forums that i3 on this OS generated a broken config file that users had to copy from a previous Linux ones if they want it functional. But, if the user was a Windows user not Linux, so don't have the config file already?


----------



## giahung1997 (May 15, 2018)

lebarondemerde said:


> Also, on FreeBSD everyone can (proxy) maintain a port. So, unless there is actual reason, no one will hold you to create and maintain xfce4-preconfigured port.
> 
> In other words, everyone are (more or less) by it's own.
> 
> If you desire, you should start reading the FreeBSD Porter's Handbook.


So in short: We offered this broken crap by default to prove what Linux has, we have despite it's functional or not or it worth spending hours to got the most basic/essentials working. If it doesn't work for you, try with your own effort. If you success, please consider commit back. Done.


----------



## giahung1997 (May 15, 2018)

ralphbsz said:


> No, he'll spend all his money on boats and fishing gear, and spend all weekend on the lake drinking beer.
> 
> Seriously: Why did the xfce4 maintainer do that?  Either it was an honest mistake.  Maybe they are terribly overworked, and overlooked it, because they were busy jumping to the next volunteer task.  Remember, unlike Linux (which has thousands of people who get a paycheck for maintaining it, RedHat alone has over 10K employees, although most are not developers but support and G&A), most FreeBSD work is done by unpaid volunteers.  Or perhaps the xfce4 maintainers thought that not performing the customization for you is a good choice, perhaps because doing it automatically might be too dangerous.
> 
> Why don't you send them a polite e-mail and ask?  And perhaps first look at the port, and see how much work it would take to automatically perform the preconfigured customization, and offer them patches, in case they like those?


You're polite, sir. All of you misunderstanded me. I don't want you to do the full customization to me, making it like on the Linuxes look bloated with full of deviantart icons and wallpapers. No, I want the most basic like Shutdown/Reboot via Logout by default, mount/umount via Thunar, other thing I will build according to my own taste since, gtk themes are crossplatform.


----------



## giahung1997 (May 15, 2018)

Crivens said:


> Wouldn't that be a project for you? A tool that checks all installed ports for these messages and tries to parse them, then offering to apply that?


On NetBSD I do have a copy of someone's script to do exactly like that.


----------



## giahung1997 (May 15, 2018)

Phishfry said:


> You should see a big install like Zoneminder. There are 4 configuration files to deal with. They too are printed on screen.
> Why does FreeBSD not do them automatically.
> 
> Well the answer is imagine if you already had mySQL installed and you go stomping on it with a Zoneminder install.
> ...


I know, sir. It's bad for server usage of preconfigured, it's inflexible. But for desktop user, it's a hell. Average user, sir. Not someone willing to masturbate with i3, xmonad...


----------



## zirias@ (May 15, 2018)

Please don't request such things. There's a serious flaw in your argumentation: you just _assume_ other people would want this as well. But many decide for FreeBSD _because_ it is the way it is, people seeing the benefit to stay in control of their system's configuration.

Sure you could say it's a philosophical choice. A package on FreeBSD attempts to deliver software as close as possible to the original upstream version, as long as it's able to run. This means e.g. depend on other packages that are absolutely needed, install default/example configuration files, in case of services install init scripts and, if necessary, create system users. But a package *should never mess with existing configuration*. This includes /etc/rc.conf. If a service must be enabled or some other system configuration must be changed for using some common feature of the software, the package should just tell you in its install message.

The main reason is _stability and reliability_ of your system. Keep in mind FreeBSD has a focus on reliable servers, although you can install a nice desktop as well. A sysadmin installing a package doesn't want to be surprised by sudden configuration changes that might just break something else in a subtle way. FreeBSD is not (like) a "Linux Distro" for good reasons.


----------



## giahung1997 (May 15, 2018)

Zirias said:


> Please don't request such things. There's a serious flaw in your argumentation: you just _assume_ other people would want this as well. But many decide for FreeBSD _because_ it is the way it is, people seeing the benefit to stay in control of their system's configuration.
> 
> Sure you could say it's a philosophical choice. A package on FreeBSD attempts to deliver software as close as possible to the original upstream version, as long as it's able to run. This means e.g. depend on other packages that are absolutely needed, install default/example configuration files, in case of services install init scripts and, if necessary, create system users. But a package *should never mess with existing configuration*. ThIs includes /etc/rc.conf. If a service must be enabled or some other system configuration must be changed for using some common feature of the software, the package should just tell you in its install message.
> 
> The main reason is _stability and reliability_ of your system. Keep in mind FreeBSD has a focus on reliable servers, although you can install a nice desktop as well. A sysadmin installing a package doesn't want to be surprised by sudden configuration changes that might just break something else in a subtle way. FreeBSD is not (like) a "Linux Distro" for good reasons.


Thank you. This is what I expect to hear. Not the nonsense lack of manpowers and do it yourself. And I expect many people will hate me after this, too.


----------



## SirDice (May 15, 2018)

I'm surprised it hasn't come up yet but if you're looking for a FreeBSD system that's mostly pre-configured "out of the box" you might want to have a look at TrueOS.


----------



## ShelLuser (May 15, 2018)

First time I saw this thread and although I know it has been marked solved I still couldn't resist sharing my opinion as well...

I think the most important aspect to consider is that in most cases software packages are installed "as is". In other words: _just as the author(s) have intended it_, and in most cases that means that you'll get an example configuration at most but the port won't be (fully) configured for you, so not even the basic aspects.

A good example of this (IMO anyway) is a port I'm currently seriously messing around with to try and revive it (adopt it): irc/unreal.  If you install this through the ports collection then you'll notice this:


```
Unreal-3.2.10.7:
        /usr/local/etc/Unreal/ircd.motd
        /usr/local/etc/Unreal/ircd.rules
        /usr/local/etc/rc.d/unrealircd
```
(which is actually a little bad because this would mean that your rules and message of the day could get overwritten every time you upgrade, but that's what I'm trying to solve).

But if you look at the config directory itself:


```
root@psi:/usr/local/etc/Unreal # ls
aliases                 badwords.quit.conf      ircd.rules
badwords.channel.conf   help.conf               spamfilter.conf
badwords.message.conf   ircd.motd               unrealircd.conf
```
Several config files are present but this isn't a working IRC server, these are all defaults.

And guess what?


```
peter@unicron:/home/peter/unrealircd/conf $ ls
aliases/                help/                   spamfilter.conf
badwords.conf           modules.default.conf    ssl/
dccallow.conf           modules.optional.conf
examples/               operclass.default.conf
```
As you can see it's not that much different from how things look when you install from the main source tree.

My point here is that you shouldn't be pointing fingers at FreeBSD but the author(s) of those software packages instead. All the port maintainers generally do is to provide the port as-is. And the authors usually do not provide a "working out of the box" program (though exceptions obviously exist, games like games/nethack36 obviously do work right after being installed).


----------



## rigoletto@ (May 15, 2018)

ShelLuser said:


> A good example of this (IMO anyway) is a port I'm currently seriously messing around with to try and revive it (adopt it): irc/unreal.  If you install this through the ports collection then you'll notice this:
> 
> 
> ```
> ...



You can install them as @sample files.


----------



## rsronin (May 15, 2018)

Zirias said:


> If a service must be enabled or some other system configuration must be changed for using some common feature of the software, the package should just tell you in its install message.



Is there a way or command to look at those install messages again?


----------



## zirias@ (May 15, 2018)

giahung1997 said:


> Not the nonsense lack of manpowers and do it yourself.


Well, that isn't nonsense and in fact, ports can be broken as well. I just described the ideal that FreeBSD ports/packages are aiming for: give you software as close to upstream as possible and don't mess with your existing configuration. If a port/package doesn't work as expected, even after following advice from the pkg message and docs, that's a different topic and of course, port maintainers should try and fix these problems. As this is a lot of work for the huge ports collection, it's always nice to see someone help here...

But BTT, I'd second SirDice's remark: If you're looking for a FreeBSD based desktop with a fair amount of "system configuration automation", you might be happier with TrueOS.



rsronin said:


> Is there a way or command to look at those install messages again?


Well, I don't know whether there's a command available ... but these messages are in the port's directory, named pkg-message, so you can read them from your local ports tree or via svnweb, like for example here for www/chromium.


----------



## ldgc (May 15, 2018)

Zirias said:


> Well, I don't know whether there's a command available


Yes there is 
Executing `pkg info -D [I]package_name[/I]` will give the same output of pkg-message.


----------



## SirDice (May 16, 2018)

If you can't remember the exact options you can create an alias for it. At the bottom of /usr/local/etc/pkg.conf you can add, for example:

```
message: info -D
```
Make sure it's _inside_ the brackets and take note of commas. You can then use it like this:

```
# pkg message mysql57-server
mysql57-server-5.7.22:
Always:
*****************************************************************************

Remember to run mysql_upgrade the first time you start the MySQL server
after an upgrade from an earlier version.

Initial password for first time use of MySQL is saved in $HOME/.mysql_secret
ie. when you want to use "mysql -u root -p" first you should see password
in /root/.mysql_secret

MySQL57 has a default %%ETCDIR%%/my.cnf,
remember to replace it wit your own
or set `mysql_optfile="$YOUR_CNF_FILE` in rc.conf.

*****************************************************************************
```
Much easier to remember


----------

