# New to BSD



## rX (Apr 13, 2011)

Hay folks, how are you all doing?

Just completed my first install of FreeBSD, testing with gnome at moment, but thinking about going to xfce 4.8. All I can say is FreeBSD is solid. I've been playing around with it now for a few hours and not broke it yet.

I like how you can compile everything from the ground up. I was a new guy to linux just a few months back, decided on a change, and I think BSD will be my full time machine.

So folks, what great stuff can be done under the hood of BSD, tweaks and stuff let me know.

To all the Devs out there in BSD land: I congratulate you all on the fine work ï¿½e

./rX/.


----------



## vermaden (Apr 13, 2011)

Do not compile unless it's necessary, use [cmd=]pkg_add -r NAME[/cmd] to add needed packages.

Also this is covered in the *FreeBSD Handbook*: http://freebsd.org/handbook


----------



## nakal (Apr 13, 2011)

Ignore this "Senior Member" please. 

Almost everyone uses FreeBSD ports instead of packages on FreeBSD.


----------



## rX (Apr 13, 2011)

Yeah, I like the ports on FreeBSD, really great tool.


----------



## vermaden (Apr 13, 2011)

nakal said:
			
		

> Ignore this "Senior Member" please.
> 
> Almost everyone uses FreeBSD ports instead of packages on FreeBSD.



LOL, You made my day kid 

Have you done a survey to confirm that?


----------



## nekoexmachina (Apr 13, 2011)

> Almost everyone uses FreeBSD ports instead of packages on FreeBSD.



At least I do not, if I do not need some special features (or, well, if I do not need features presented in pkg, like HAL in X.Org )


----------



## da1 (Apr 13, 2011)

@nakal: bad thing to say man .... really bad considering vermaden's ancientness 

@rX: put it this way: packages are made for systems with less resources (they do not require compilation and they use less disk space). The downside to this is that you cannot choose which options the package will have when you install it because it will be installed with the options the "creator" designed it to have. 
On the other hand, the ports system is designed to give you full liberty over options in each port but you need to compile it (not good for old pc's (ex: one of my FreeBSD box is a P II @ 200MHZ) and it also takes more hdd space while requiring a bit more knowledge about the system and it's design.

In short, this is the difference. Now, it's up to you to make the final decision.


----------



## UNIXgod (Apr 14, 2011)

rX said:
			
		

> So folks, what great stuff can be done under the hood of BSD, tweaks and stuff let me know.



- look at _jails_ for system level virtualization and security (also light weight)
- _pf_ is an excellent firewall comes free with nat and traffic shaping. (also security)
- build a custom thin kernel with a simple text editor and make command (security security security)
- enjoy the logical file structured hierarchy ( non base third party software and confs in _/usr/local_)
- as well as the most complete and comprehensive _man_ pages ever.
- base is mainly bsd based licensed software in contrast to gnu bloatware( i.e. Kernighan's one true _awk_ vs _gawk_, almquist's 
- bourne shell(ash) vs _bash_, _nvi_ vs _vim_)

Some programs I enjoy using from the ports are:
- postfix/qmail (alternatives to sendmail (also mailer.conf rocks!)
- mutt (gotta read that mail)
- portupgrade (for port maintenance portmaster is also popular and lighter weight)
- zsh (it's really a great modern shell)
- gnuls (I like the coloring better than bsd ls colors)
- tmux and/or screen( tmux is bsd and screen is gnu... both are great at multiplexing over job control)
- vim (for syntax color:::note Joy's original _vi_ is in the ports if your interested)
- rtorrent (nuff said =))
- mplayer (rtorrent would be worthless without it)
- git (dvcs) for development
- ruby (though pick your language... c,c++,sh,awk are built in. ruby,perl,python,java, and lisp etc. can be installed from ports) _cc_ and _CC_ are correctly wrapped to _gcc_ and _g++_. _man_ pages are complete with the c programming language.
- dvtm (build your own tiled wm directly inside a terminal =))

If you haven't seen kde4 you should try that as well. There are a multitude of slimmer wm style environments that just beg to be hacked and tweaked from the end user. To name a few is fluxbox/blackbox, enlightenment( e16 and 17), windowmaker, {name your favourite tiling wm here =)

With the desktops, if you want eye candy compiz-fusion is neat. I love accessibility options like autofocus/chasing windows and guified animated magnifier. of course the less relevant cube and wobble windows are cool also.

Lastly set up /etc/make.conf for your compiler settings.

Hope some of this info helps you. good luck!


----------



## DutchDaemon (Apr 14, 2011)

UNIXgod said:
			
		

> Lastly set up /etc/make.conf for your compiler settings.



Better yet, take the advice of everyone else on these forums: don't.


----------



## vermaden (Apr 14, 2011)

DutchDaemon said:
			
		

> Better yet, take the advice of everyone else on these forums: don't.



About various /etc/make.conf settings, this one I can recommend for ANY system.

[CMD=""]WRKDIRPREFIX= ${PORTSDIR}/obj[/CMD]

This will change default directory where PORTS are built, instead of mess of /usr/ports/CATEGORY/NAME/work directory all PORTS will be built in the /usr/ports/obj/* directory, if something goes wrong/does not built, just remove that dir and You are 'clean'. A lot faster them searching for *work* directories with find(1) and ten deleting them.


----------



## DutchDaemon (Apr 14, 2011)

I use 
	
	



```
WRKDIRPREFIX=/tmp
```
 where /tmp is a *tmpfs*. Flies! And no clutter 


But seriously: keep your hands off compiler settings and CFLAGS. It's a pain.


----------



## phoenix (Apr 15, 2011)

Third the WRKDIRPREFIX setting.  Mine points to /usr/ports/workdir which is a separate ZFS filesystem.  Where it points doesn't really matter, but it makes it so much nicer having it out of the /usr/ports/<category>/<portname> tree.

Plus, separating it allows you to mount /usr/ports read-only from another system.


----------



## jb_fvwm2 (Apr 15, 2011)

I still diverge from most of those suggestions.  
	
	



```
cp -iv work/.Plist_Fla[tab] ./Plist_Manually && /bin/rm -rf work/portname-#/
```
 ... one can search the Plist_ in the port itself, where did the port put manpages, README's, etc... WRKDIRPREFIX I set to a different gjournal disk, in ports such as firefox that would fill up to 107 percent /usr if it is too full, etc...


----------



## nakal (Apr 15, 2011)

vermaden said:
			
		

> LOL, You made my day kid
> 
> Have you done a survey to confirm that?



I could create one, good idea. I know some people who use FreeBSD and no one really ever recommends to use packages. There are various reasons (differing configuration options, up-to-dateness, reduction of dependency problems, availability, etc).

Do you really want to use applications with English settings (for example OpenOffice)? You don't want to have commercial applications, drivers and other things that are not available as packages? Do you want GTK+ to have CUPS support? Do you want Gnome2 to use PulseAudio, which obviously does not work for many people, including myself? Do you want to have acceleration support with RadeonHD cards?

I cannot work without setting up these things. Most disturbing thing is that everything is tuned to be US-specific and I want a desktop and application settings in German.

Since I don't know how you can be satisfied with packages, you can explain how to get around the problems that I mentioned? Might be, I have overlooked something.


Btw:

My WRKDIRPREFIX is /usr/workdir-ports, because my /usr filesystem is big and /usr/ports is mounted read-only from my server.


----------



## vermaden (Apr 15, 2011)

nakal said:
			
		

> I could create one, good idea. I know some people who use FreeBSD and no one really ever recommends to use packages. There are various reasons (differing configuration options, up-to-dateness, reduction of dependency problems, availability, etc).



I used *-RELEASE packages for most of the time, now I have switched to *-STABLE and I have up to date packages without needles recompilation.




> Do you really want to use applications with English settings (for example OpenOffice)?


Actually I do that, everytime I use computer I use only english settings, menus, localization, man pages, error messages ... it makes A LOT easier to fix anything if You search for sollution in english then in any other local language, its just unpractical. I also use UTF-8 at the same time, so I can type/read any localized charecters.



> You don't want to have commercial applications, drivers and other things that are not available as packages?


Commercial applitacations are mostly provided in BINARY form so You can not compile them, You have a source for nVidia binary drivers? Great! Share the source, X.org developers will be very happy 



> Do you want GTK+ to have CUPS support?


I do not use CUPS ...



> Do you want Gnome2 to use PulseAudio


I stay away from this SH!T as far as possible, and I recommned You also, stay away from any SH!T writtne by Lenart Poettring.



> Do you want to have acceleration support with RadeonHD cards?


It will require to recompile JUST SEVERAL PORTS instead of building all your ports, rebuilding GNOME from source will not help You getting hardware acceleration with RadeonHD cards You know?



> Since I don't know how you can be satisfied with packages, you can explain how to get around the problems that I mentioned? Might be, I have overlooked something.


I use packages for everything as a start, if something is not the way I need, I create a package from PORTS with my needed settings ... and thats it generally, whole idea. I recompile only things that do not fit into my expectations.


----------



## purgatori (Apr 15, 2011)

I never knew that ports vs. packages was such a contentious topic. People really will argue over anything, I guess.

Moving on... I haven't really done a lot of dabbling 'under the hood of FreeBSD' (would that mean, the kernel? :-S ), but if you're new to the world of Unix/BSD you might want to try some or all of the following:


[*] Get elinks and:

[cmd=]$ elinks gopher://gopher.floodgap.com:70/1/[/cmd]


[*] Glob and expand your way to success! 


[*] telnet a BBS. 


[*] [cmd=]$ apropos [keyword] [/cmd] -- and see what you dig up.


[*] Tweet, surf the web, or chat from the shell.


[*]Try out some different window managers. 


[*]Discover the beauty of terminal multiplexing

[*] Browse the web, from within a text editor:

[cmd=]$ cd /usr/ports/www/emacs-3wm && make clean install[/cmd]

[cmd=]$ emacs -f w3m[/cmd]


/END
---------

Oh, and I don't mind if you install any of those applications from ports, or packages


----------



## UNIXgod (Apr 15, 2011)

DutchDaemon said:
			
		

> Better yet, take the advice of everyone else on these forums: don't.



It's less relevant now than maybe it was a decade ago. I am stuck in some old ways =).  I'll avoid suggesting make.conf modification in the future unless it becomes necessary to tell the compiler which cpu your using. llvm/clang maybe?


----------



## _martin (Apr 16, 2011)

Hi, 

I'll put my 2Â¢ to this topic too. 

You've mentioned you're new to FreeBSD; well hardly you can say it's solid by a few tests (not that it's not, just you can't say this after a few hours of using it).  But it could be it made a good impression on you 

DO and DON'Ts are really up to you. Someone likes precompiled packages, someone likes to do it from scratch. That's a beauty of it - you can choose what suits you best. You learn faster when you experiment, but be prepared -- it costs some time.

I personally do a minimal install(+info/man pages) then cvsup and start from scratch. Never had a /bigger/ issue with ports; openoffice is the only package I use from web (that is IMHO overkill to go from scratch  )

good luck and enjoy


----------



## dennylin93 (Apr 17, 2011)

UNIXgod said:
			
		

> - gnuls (I like the coloring better than bsd ls colors)



It's possible to change the colours of ls on FreeBSD: ls().


----------



## vermaden (Apr 17, 2011)

dennylin93 said:
			
		

> It's possible to change the colours of ls on FreeBSD: ls().



... but there are also usability differences where *GNU ls* have some more options:

```
% [color="#0000ff"]gls -sh[/color]
total 100M
1.0K AFTER
 96M BSDLive.iso
3.0K FreeBSD.SETUP
515K RoFBSD.tar.gz

% [color="Blue"]ls -sh[/color]
     1 AFTER
 97610 BSDLive.iso
     3 FreeBSD.SETUP
   515 RoFBSD.tar.gz
```

(like human format -h option (K/M/G) for -s option)


----------



## darkshadow (Apr 17, 2011)

*replacing FreeBSD ports system by pkgsrc*

If I were a decision  maker in FreeBSD and OpenBSD system I would replace ports  system with pkgsrc system .


----------



## kpedersen (Apr 17, 2011)

darkshadow said:
			
		

> If I were a decision  maker in FreeBSD and OpenBSD system I would replace ports  system with pkgsrc system .



There are benefits to this such as making a package without having to install it. It is quite nice however to have a specific package system for FreeBSD.

As an aside, I just tried to install VLC on RedHat Enterprise 6.... What a bloody mess, I needed to add all these hacky third party repositories and even then it just complained saying that libcv or some crap was required. So whatever FreeBSD does... it is miles simpler than rpm/yum 

Also.. for the record, I use both ports and packages. Packages for the fat stuff like Xorg, VirtualBox and Openoffice, but then use ports for quick and easy stuff like bash, gmake, sudo, tmux etc...


----------



## Pushrod (Apr 17, 2011)

vermaden said:
			
		

> About various /etc/make.conf settings, this one I can recommend for ANY system.
> 
> [CMD=""]WRKDIRPREFIX= ${PORTSDIR}/obj[/CMD]
> 
> This will change default directory where PORTS are built, instead of mess of /usr/ports/CATEGORY/NAME/work directory all PORTS will be built in the /usr/ports/obj/* directory, if something goes wrong/does not built, just remove that dir and You are 'clean'. A lot faster them searching for *work* directories with find(1) and ten deleting them.



I set it to /usr/obj which puts everything into /usr/obj/usr/ports/, along with (but not in the way of) the obj stuff from the base system.


----------



## vermaden (Apr 18, 2011)

darkshadow said:
			
		

> If I were a decision  maker in FreeBSD and OpenBSD system I would replace ports  system with pkgsrc system .



Nobody forces You to use *FreeBSD Ports* mate, just install plain FreeBSD's base system, then add *pkgsrc* there, FreeBSD is one of the supported platforms: http://www.netbsd.org/docs/software/packages.html#platforms


----------



## darkshadow (Apr 18, 2011)

*pkgsrc*

Using only one packing system will push forward a unity between these awesome projects and push forward all porting efforts on BSD os'es.


----------



## phoenix (Apr 18, 2011)

darkshadow said:
			
		

> If I were a decision  maker in FreeBSD and OpenBSD system I would replace ports  system with pkgsrc system .



You'd be losing out on something like 1/2 the software.  There's a heck of a lot more stuff available in the ports tree than in pkgsrc.


----------



## darkshadow (Apr 18, 2011)

*pksrc*



> You'd be losing out on something like 1/2 the software. There's a heck of a lot more stuff available in the ports tree than in pkgsrc.


but on another side pkgsrc is a new project and it address many issue on old packaging system (like ports ) and tried to solve it ,


----------



## phoenix (Apr 18, 2011)

Define "new project".  pkgsrc has been around as long as the ports tree has, give or take maybe a year.

As mentioned above, any user is free to use pkgsrc instead of ports on FreeBSD, as FreeBSD is a supported platform for pkgsrc.  However, with all the projects underway to improve the ports tree, it's not going anywhere, and will remain the official method for installing software on FreeBSD.


----------



## kpedersen (Apr 18, 2011)

Plus AIX is a supported platform, and I found many of the ports failed to compile.

FreeBSD ports is tailored to FreeBSD and so the ports are much more likely to work flawlessly.


----------



## nakal (Apr 20, 2011)

vermaden said:
			
		

> I used *-RELEASE packages for most of the time, now I have switched to *-STABLE and I have up to date packages without needles recompilation.



So you recommend to use a development version of FreeBSD world to use latest packages? I'm using -RELEASE with latest software.



> Actually I do that, everytime I use computer I use only english settings, menus, localization, man pages, error messages ... it makes A LOT easier to fix anything if You search for sollution in english then in any other local language, its just unpractical. I also use UTF-8 at the same time, so I can type/read any localized charecters.



Well, you might ask yourself if it's the packages that force you to do this and you simply accepted it. I want my desktop in my language. And you often need to adapt software for it.



> Commercial applitacations are mostly provided in BINARY form so You can not compile them, You have a source for nVidia binary drivers? Great! Share the source, X.org developers will be very happy



But there is no package. Only a port.



> I do not use CUPS ...



And I know why.



> I stay away from this SH!T as far as possible, and I recommned You also, stay away from any SH!T writtne by Lenart Poettring.



Yes and to disable the "SH!T" you need to adjust a knob for many applications.



> It will require to recompile JUST SEVERAL PORTS instead of building all your ports, rebuilding GNOME from source will not help You getting hardware acceleration with RadeonHD cards You know?



Of course, you can partially use packages, but they are old for -RELEASE.



> I use packages for everything as a start, if something is not the way I need, I create a package from PORTS with my needed settings ... and thats it generally, whole idea. I recompile only things that do not fit into my expectations.



I always use ports. I never need packages.


----------



## vermaden (Apr 20, 2011)

nakal said:
			
		

> So you recommend to use a development version of FreeBSD world to use latest packages? I'm using -RELEASE with latest software.



As soon as some 'non-security' serious bugs are discovered *-RELEASE should no longer be considered as 'production system', here is why: http://blog.vx.sk/archives/24-Backported-patches-for-FreeBSD-82-RELEASE.html

These are rather serious issues/bugs but they will not find their way into the 8.2-RELEASE, to have them you need to use 8-STABLE. That is why *-STABLE branch is more suitable for production the *-RELEASE.




> Well, you might ask yourself if it's the packages that force you to do this and you simply accepted it. I want my desktop in my language. And you often need to adapt software for it.



I use these English settings everywhere mate, even on the cell phone, GPS navigation ... everywhere, I just can't stand 'technology' in my local language, also because of sometimes REALLY stupid translations; English systems are more readeable/understandable.



> But there is no package. Only a port.



If some software is available only in binary form, then its no matter if its port or a package, even typing make install at ports like Opera/nVidia driver/Flash it will only fetch the binaries and install them, no compiling.



> Yes and to disable the "SH!T" you need to adjust a knob for many applications.



I haven't compiled anything else then lame port and I do not have pulse shit installed even as a dependency:


```
vermaden ~ % pkg_info | grep -i pulse
vermaden ~ %
```



> Of course, you can partially use packages, but they are old for -RELEASE.



That is why I moved to *-STABLE where packages are built every two weeks.



> I always use ports. I never need packages.



So you have to have a lot of time and CPU power at the same time then.


----------



## Blueprint (Apr 20, 2011)

If you mix ports and packages and later do a [CMD=""]portmaster -a[/CMD] will it attempt to compile later versions of the packages that is installed?


----------



## vermaden (Apr 20, 2011)

Blueprint said:
			
		

> If you mix ports and packages and later do a [CMD=""]portmaster -a[/CMD] will it attempt to compile later versions of the packages that is installed?



At the point I will find that my packages are in conflict with some newer package/port I would rather redownload all packages (they are built every two weeks) and re-add them instead of compiling them with portmaster.


----------



## mix_room (Apr 20, 2011)

nakal said:
			
		

> Well, you might ask yourself if it's the packages that force you to do this and you simply accepted it. I want my desktop in my language. And you often need to adapt software for it.



I'm with Vermaden on this one. I hate having to use other languages than English on the desktop. You then get peculiar names for things, like 'Strg'. It would often be easier to only have english, and just learn the English term for it than a made-up native one. Often the non-English ones are just the first thing that google-translate came up with.


----------



## nakal (Apr 20, 2011)

vermaden said:
			
		

> As soon as some 'non-security' serious bugs are discovered *-RELEASE should no longer be considered as 'production system', here is why: http://blog.vx.sk/archives/24-Backported-patches-for-FreeBSD-82-RELEASE.html
> 
> These are rather serious issues/bugs but they will not find their way into the 8.2-RELEASE, to have them You need to use 8-STABLE. That is why *-STABLE branch is more suitable for production the *-RELEASE.



Seems that these bugs are not considered critical nor security problems. Have you read read the handbook what/who STABLE is for? You should not recommend STABLE for production systems.



> I use these english settings everywhere mate, even on the cell phone, GPS navigation ... everywhere, I just cant stand 'technology' in my local language, also because of sometimes REALLY stupid translations english systems are more readeable/understandable.



So, I know who to thank for NOT contributing to make translations better! 

You know they are stupid, why not fix them? It makes FreeBSD and its applications better.



> If some software is available only in binary form, then its no matter if its port or a package, even typing make install at ports like Opera/nVidia driver/Flash it will only fetch the binaries and install them, no compiling.



Not really. NVidia driver port compiles stuff to be able to link the binary driver to user's kernel.



> So You have to have a lot of time and CPU power at the same time then.



You don't really need much CPU power. The first time you install ports, it can be time consuming, especially on an Atom-based netbook, yeah. The updates are not really worth mentioning, except for about 5 bigger applications, which you even can skip, if you want to (see: portmaster -x option).

And if you have many replicated installations, you can build your customized packages and distribute the packages the hosts.

@mix_room: Of course you can choose the language you like. If you stick to English, it's easier to use preconfigured software packages. This is the point we are talking about.


----------



## Zare (Apr 20, 2011)

Count me in, too, as my language belongs to same group as Vermaden's. Slavic languages are really really dumb for anything related to technology.


----------



## vermaden (Apr 20, 2011)

nakal said:
			
		

> Seems that these bugs are not considered critical nor security problems.



This is true as long as these problems do not 'hit' you ...



> So, I know who to thank for NOT contributing to make translations better!



Definitely, I think that anybody that wants to 'mess' with *ANY* operating systems should know English. Period.



> You know they are stupid, why not fix them? It makes FreeBSD and its applications better.



I think I miss the context here ...



> Not really. NVidia driver port compiles stuff to be able to link the binary driver to user's kernel.



But the 'most important part', the driver is just a binary blob, compiling a small 'layer' does not hurt that bad.



> And if you have many replicated installations, you can build your customized packages and distribute the packages the hosts.



This is what is actually done on FreeBSD's FTP servers with packages, so why double their work, the packages I need are already available.


----------



## phoenix (Apr 20, 2011)

nakal said:
			
		

> So you recommend to use a development version of FreeBSD world to use latest packages? I'm using -RELEASE with latest software.



No.  He's saying you use a -RELEASE version of the OS.  But you set your *PACKAGSITE* environment variable to point to the *packages-8-stable* directory so that you get -STABLE (as in, updated) packages when using the *pkg_** tools.


----------



## mix_room (Apr 21, 2011)

nakal said:
			
		

> @mix_room: Of course you can choose the language you like. If you stick to English, it's easier to use preconfigured software packages. This is the point we are talking about.



It's not that you can chose. It is rather that I rarely see the point of using an alternative language to English in computing. For most people, computing is a new paradigm. They have to learn new concepts and terms. Whether one decides to call the first entry in the menu-bar 'File' or 'Datei' doesn't really matter when you set out. Neither of them are the first thing that comes to mind. Even though I am equally well versed in both languages, I still find the German translations very confusing. Perhaps it is because of differences in the semantical structure between the languages, or because they are afterthoughts. If I use my mother as an example, she doesn't really care whether the language is German or English, she doesn't know where to click in any case. Translation efforts are well used when it comes to handbooks and the like, but when it is the software I often feel that the efforts are counterproductive.


----------

