LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   BSD Howtos (http://www.linuxquestions.org/questions/%2Absd-17/bsd-howtos-4175488437/)

hitest 12-18-2013 10:26 AM

BSD Howtos
 
I thought it might be useful to start a thread on how to do some things on different versions of BSD. Please feel free to post your own howtos.

Here is a short explanation on how to install XFCE on OpenBSD 5.4.

After you have installed OpenBSD 5.4 login as your regular user and then get a root prompt. This is the ftp server I use.
Set your package pathway.

Code:

# export PKG_PATH=ftp://ftp3.usa.openbsd.org/pub/OpenBSD/5.4/packages/i386/
Install XFCE

Code:

# pkg_add -v xfce-4.10.tgz
Install XFCE goodies.

Code:

# pkg_add -v xfce-extras-4.10p0.tgz
I would do a re-boot and then login as your regular user. From your home directory issue this command as your regular user.

Code:

echo "exec startxfce4" > .xinitrc
Then issue this command which will launch XFCE.

Code:

startx

pan64 12-18-2013 10:39 AM

why do you need a reboot?

hitest 12-18-2013 11:40 AM

Quote:

Originally Posted by pan64 (Post 5083274)
why do you need a reboot?

It is possibly not needed, but, XFCE is not as light a DE as it one was what with all the Gnome dependencies, etc. It does not hurt to be safe. I just like to have all new processes starting up properly at boot-up.
The series of commands above will yield a fully functional XFCE. I am certain of that.

ReaperX7 12-27-2013 07:07 PM

Xfce4 is still fairly lightweight compared to Gnome3 and KDE4. However most BSDs and other UNICES still use KDE4 as their heaviest weight desktop with MATE, Gnome2, Xfce4, and several others as their lighter weight desktops. I personally use Xfce4 as it's verily the most flexible.

hitest 12-27-2013 08:35 PM

Quote:

Originally Posted by ReaperX7 (Post 5087851)
Xfce4 is still fairly lightweight compared to Gnome3 and KDE4. However most BSDs and other UNICES still use KDE4 as their heaviest weight desktop with MATE, Gnome2, Xfce4, and several others as their lighter weight desktops. I personally use Xfce4 as it's verily the most flexible.

Agreed. XFCE is definately light weight compared to Gnome 3 and KDE 4. XFCE is my favourite DE for the BSDs and Linux.

kooru 12-28-2013 05:04 AM

To install openbox on NetBSD:

Code:

pkg_add -v openbox
Then configure your ${HOME}/.xinitrc
Code:

exec openbox-session
Now with

Code:

startx
you can run openbox.

Other tasks:

Copy openbox files into your .config/ (use this files to customize your openbox)
Code:

cp -R /usr/pkg/share/examples/openbox/ ${HOME}/.config/
In addition, install dbus, hal and famd
Code:

pkg_add -v dbus
pkg_add -v fam
pkg_add -v hal

Copy their file into /etc/rc.d
Code:

cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d
cp /usr/pkg/share/examples/rc.d/hal /etc/rc.d
cp /usr/pkg/share/examples/rc.d/famd /etc/rc.d

Put these strings into rc.conf to autostart them
Code:

echo famd=YES >> /etc/rc.conf
echo rpcbind=YES >> /etc/rc.conf
echo dbus=YES >> /etc/rc.conf
echo hal=YES >> /etc/rc.conf

Start them now
Code:

/etc/rc.d/famd start
/etc/rc.d/rpcbind start
/etc/rc.d/dbus start
/etc/rc.d/hal start

About X11 on NetBSD you can read the official documentation.
To customize your openbox, there are many resources online (just one as example)

angryfirelord 01-04-2014 02:07 PM

Two notes on your OpenBSD section.

I'd advise picking a mirror close to you. HTTP or FTP will work fine. There's plenty of mirrors to choose from: http://www.openbsd.org/ftp.html

The other thing is that pkg_add in OpenBSD doesn't need the specific version number of the package you want (contrary to FreeBSD). xfce and xfce-extras are sufficent. Be aware though that it will prompt you for an ambiguous dependency, but the first choice is usually fine.

hitest 01-04-2014 03:19 PM

Quote:

Originally Posted by angryfirelord (Post 5091907)
Two notes on your OpenBSD section.

I'd advise picking a mirror close to you. HTTP or FTP will work fine. There's plenty of mirrors to choose from: http://www.openbsd.org/ftp.html

Yep. I pick a mirror that has proven itself to be reliable. I am more concerned about reliability than one that is closer to me. Picking a close mirror is indeed a good idea.

Quote:

The other thing is that pkg_add in OpenBSD doesn't need the specific version number of the package you want (contrary to FreeBSD). xfce and xfce-extras are sufficent. Be aware though that it will prompt you for an ambiguous dependency, but the first choice is usually fine.
Thanks. I forgot to mention that. :)

iDavE 01-10-2014 09:48 PM

OpenBSD

Check if the PKG_PATH is set

Code:

echo $PKG_PATH
If not set, then edit the /etc/pkg.conf file and add your mirror. Below is my install path as an example

To query packages
Code:

pkg_info -Q <package name>
To delete package
Code:

pkg_delete /var/db/pkg/<package name>

BSDRocks 01-13-2014 02:26 PM

A good thread idea but lacking content. I guess not to many BSD users here in LQ :/

A good BSD youtube channel
http://www.youtube.com/user/bsdtutorial

Lots of good tutorials on the BSDs

hitest 01-13-2014 03:55 PM

Quote:

Originally Posted by BSDRocks (Post 5097347)
A good thread idea but lacking content. I guess not to many BSD users here in LQ :/

A good BSD youtube channel
http://www.youtube.com/user/bsdtutorial

Lots of good tutorials on the BSDs

The idea of the thread is for us to add content. Please feel free to add your how to if you wish.

replica9000 02-08-2014 08:52 PM

I'm trying FreeBSD 10, and it seems like I'm finding completely different steps to achieve the same result as thing mentioned above.

For instance, to install XFCE4, as "pkg_add: Command not found."
Code:

pkg install xfce4-wm-4.10.1
-- or --
cd /usr/ports/x11-wm/xfce4-wm
make install

Code:

echo 'dbus_enable="YES"' >> /etc/rc.conf
Code:

/usr/local/etc/rc.d/dbus start

hitest 02-08-2014 09:07 PM

Quote:

Originally Posted by replica9000 (Post 5114217)
I'm trying FreeBSD 10, and it seems like I'm finding completely different steps to achieve the same result as thing mentioned above.

For instance, to install XFCE4, as "pkg_add: Command not found."
[code]

To install XFCE in FreeBSD 10.0 issue this command:

# pkg install xfce

JWJones 02-08-2014 09:39 PM

Battery monitoring in OpenBSD:

Get a list of sensors:

user@openbsd:~$ sysctl hw.sensors
...
hw.sensors.acpibat0.watthour0=4.35 Wh (last full capacity)
hw.sensors.acpibat0.watthour1=0.43 Wh (warning capacity)
hw.sensors.acpibat0.watthour2=0.00 Wh (low capacity)
hw.sensors.acpibat0.watthour3=3.24 Wh (remaining capacity), OK
hw.sensors.acpibat0.raw0=1 (battery discharging), OK
hw.sensors.acpibat0.raw1=1957 (rate)
...

Configure /etc/sensorsd.conf similar to:

# alert if remaining capacity < warning capacity
hw.sensors.acpibat0.watthour3:low=0.43Wh:command=/usr/X11R6/bin/xmessage "battery is low"

Start/restart sensorsd via sudo /usr/sbin/sensorsd or sudo pkill -HUP sensorsd

Set sensorsd_flags="" in /etc/rc.conf.local to stick around on boot.

If remaining capacity goes below the warning capacity, a xmessage pop-up will interrupt you.

JWJones 02-08-2014 09:46 PM

To suspend on laptop when lid is closed in OpenBSD, uncomment:

machdep.lidsuspend=1

in /etc/sysctl.conf


All times are GMT -5. The time now is 02:02 PM.