Xfce FreeBSD 12.2-STABLE + Nvidia Driver GTX 970 4GB + 2 Monitors + Sound Card + Firewall Basic Config + XFCE4 + IRC Settings + Static IPV4

unixfool

New Member

Reaction score: 1
Messages: 2

Hello, This is my first post.
I'm a old FreeBSD user, but i never post nothing in this forum.
So ill like to share my basic desktop settings in a fresh install.

Step 1: You need update your system:
Code:
root@anaconda:~ # pkg update
root@anaconda:~ # pkg upgrade
Step 2: Ports update information.
Code:
root@anaconda:~ # portsnap fetch extract
root@anaconda:~ # portsnap update

Step 3: Install all packets you need.
In this case we going to install, oidentd, irssi, php7.4.15, libreoffice, vlc, filezilla, firefox.

Code:
root@anaconda:~ # pkg install oidentd irssi libreoffice vlc filezilla firefox php74 php74-mbstring php74-zlib php74-curl php74-gd php74-json php74-xmlrpc php74-opcache mod_php74 php74-composer

Step 4: Configure Oidentd for your ident in IRC. port: 113
Code:
root@anaconda:~ # sysrc oidentd_enable="YES"
root@anaconda:~ # cp /usr/local/etc/oidentd.conf.sample /usr/local/etc/oidentd.conf
root@anaconda:~ # sysrc oidentd_conf="/usr/local/etc/oidentd.conf"
root@anaconda:~ # cat /etc/rc.conf | grep oidentd
root@anaconda:~ # /usr/local/etc/rc.d/oidentd rcvar
root@anaconda:~ # /usr/local/etc/rc.d/oidentd start
root@anaconda:~ # ps aux | grep oidentd
Step 5: Install Xorg
Code:
root@anaconda:~ # pkg install xorg
Step 6: Install XFCE4 and Slim (You can do it with SDDM)
Code:
root@anaconda:~ # pkg install xfce slim
Step 7: Install Nvidia-Drivers
Code:
root@anaconda:~ # pkg install nvidia-driver nvidia-settings nvidia-xconfig
Step 8: Configure your /etc/rc.conf with sysrc.
Code:
root@anaconda:~ # sysrc zfs_enable="YES"
root@anaconda:~ # sysrc dbus_enable="YES"
root@anaconda:~ # sysrc hald_enable="YES"
root@anaconda:~ # sysrc gdm_enable="YES"
root@anaconda:~ # sysrc slim_enable="YES"
root@anaconda:~ # sysrc linux_enable="YES"
root@anaconda:~ # sysrc nvidia_enable="YES"
NOTE: Now we going to edit again rc.conf now with a editor. ee , vi , nano
NOTE: Add this line at the end of the like.
Code:
root@anaconda:~ # ee /etc/rc.conf

#This active your nvidia card
kld_list="linux nvidia nvidia-modeset"
#Add your ipv4 configuration for STATIC IP.
Code:
sshd_enable="YES"
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
ifconfig_em0="inet 192.168.1.200 netmask 255.255.255.0"
defaultrouter="192.168.1.1"

#Your Firewall IPFW Basic Config. Check IPFW Manual for complex rules set.
Code:
firewall_enable="YES"
firewall_quiet="YES"
firewall_type="workstation"
firewall_myservices="22/tcp 80/tcp 443/tcp 113/tcp"
firewall_allowservices="any"
firewall_logdeny="YES"

#NOTE: Close and save your /etc/rc.conf


Step 9: Now we going to edit /boot/loader.conf : You can use vi, ee, nano, pico
#NOTE: Add the follow lines on your file.

Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
zfs_load="YES"
nvidia_enable="YES"
linux_load="YES"
fuse_load="YES"

#NOTE: Close and save your file /boot/loader.conf


Step 10: Now in this part we need to edit our /etc/fstab
Code:
root@anaconda:~ # ee /etc/fstab
#NOTE: Add this line in your fstab file.

proc                    /proc   procfs  rw              0       0

Step 11: Now we need to to set user file and group.
NOTE: The user need to be in group wheel.
NOTE: YOUR-Username is your user you want to set in group wheel.
Code:
root@anaconda:~ # pw usermod YOUR-Username -G wheel

root@anaconda:~ # su YOUR-Username
$
$ cd
$ ee .xinitrc
#NOTE: You need to add this line:

/usr/local/bin/startxfce4

#NOTE: Close and save your file config.

Step 12: Reboot your system.
Code:
root@anaconda:~ # reboot
 

Attachments

  • Screenshot_2021-02-16_14-25-18.png
    Screenshot_2021-02-16_14-25-18.png
    535.3 KB · Views: 58

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,033
Messages: 38,480

You don't need a ports tree if you only use packages. So you can skip step 2. Additionally, it's pointless running portsnap update right after a portsnap extract. The extract already extracted a fully up to date ports tree.

Step 4. Don't run ident. It's a relic from the past and it'll leak your username to anyone that queries it.

Code:
ifconfig_em0="DHCP" 
ifconfig_em0_ipv6="inet6 accept_rtadv" 
ifconfig_em0="inet 192.168.1.200 netmask 255.255.255.0" 
defaultrouter="192.168.1.1"
Configure DHCP or a static IP, not both.

Code:
root@anaconda:~ # sysrc gdm_enable="YES" 
root@anaconda:~ # sysrc slim_enable="YES"
GDM and SLiM are both display managers, enable one or the other, not both.

Code:
nvidia_enable="YES" 
linux_load="YES"
These are already loaded using kld_list in rc.conf.

Code:
root@anaconda:~ # pw usermod YOUR-Username -G wheel
Use pw groupmod wheel -m <username>. The usermod command you used will remove all existing secondary groups of that user and only set them to 'wheel'.
 
Top