Author Topic: [OpenBSD 5.7] Installing xfce and basic applications using pkg_add  (Read 5370 times)

0 Members and 1 Guest are viewing this topic.

Offline v32itas

  • Peasant
  • *
  • Posts: 123
  • Cookies: -4
  • coup de grâce
    • View Profile
OpenBSD 5.7 Installing xfce and basic applications using pkg_add

First of all. This guide is for noobs like myself. And I'm noob in tutorial writing too.
So this is like "docendo discimus" I'm trying to learn by teaching. And this might
be useful for me later. Because I often do things first and read manuals later, when
things broke. And I forgot things often too.

For people like myself. OpenBSD might look scary at first. I remember how I installed
it into dual boot with slackware on my laptop. I managed to connect to wifi quickly
(thanks to slackware), But then that default wm is not very suitable for casual simple
tasks, like checking what is new on EZ... So then I just reboot into slackware and
continued using it until I broke everything by installing new compiled kernel and
deleting my old working kernel(never do that) Then I got mad but OpenBSD gave
me a warm hug.

Getting Internet Access (Connetcting To Wireless Network)

In case you will run OpenBSD from VirtualBox or just gonna plug ethernet cable, you can just skip this connecting to wireless part.
Let's assume we're running a laptop without possibility to just plug in ethernet cable.
And we're logged in as root. So find out how your wlan interface is named.

Finding out wlan interface name using ifconfig
You should get similar output
And you should look for things like wlan BRADCAST 802.11
Quote
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        priority: 0
        groups: lo
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr c8:60:00:d8:ac:1d
        priority: 0
        media: Ethernet autoselect (none)
        status: no carrier
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 70:f1:a1:43:85:bb
        priority: 4
        groups: wlan egress
        media: IEEE802.11 autoselect (OFDM54)
        status: no network
enc0: flags=0<>
        priority: 0
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33144
        priority: 0
        groups: pflog

So in my case it's athn0 connecting to wifi trough command line is really simple.
You might want to read a man page about your interface. In my case that would be
Quote
#man athn
but output is to large to paste it here. You can read many things there.

So to scan for wifi nearby

Quote
#ifconfig athn0 scan
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 70:f1:a1:43:85:bb
        priority: 4
        groups: wlan egress
        media: IEEE802.11 autoselect (OFDM54 mode 11g)
        status: no network
                nwid "NOKIA Lumia 520_2473" chan 6 bssid a4:77:60:4a:fe:32 59dBm 54M privacy,short_preamble,short_slottime,wpa2
                nwid SKY4xxxx chan 11 bssid 7c:xx:a5:xx:xx:69 6dBm 54M privacy,short_slottime,wpa2

Connecting to wireless network:

Quote
#ifconfig athn0 nwid "NOKIA Lumia 520_2473"
#ifconfig athn0 wpakey 80080077
# dhclient athn0
DHCPREQUEST on athn0 to 255.255.255.255
DHCPREQUEST on athn0 to 255.255.255.255
DHCPACK from 192.168.137.1 (a4:77:60:4a:fe:32)
bound to 192.168.137.64 -- renewal in 300 seconds.
check your connectivity by pinging google lol (ctrl + c to stop)
Quote
# ping google.com
PING google.com (216.58.209.238): 56 data bytes
64 bytes from 216.58.209.238: icmp_seq=0 ttl=55 time=46.461 ms
--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 46.461/46.461/46.461/0.000 ms

OK So hardest part is done. Now we need noob friendly text editor nano(my favorite)
you need to choose one ftp mirror from here http://www.openbsd.org/ftp.html
or use one that i have picked

Installing nano:

Quote
# pkg_add ftp://mirror.ox.ac.uk/pub/OpenBSD/5.7/packages/$(uname -m)/nano
quirks-2.54 signed on 2015-03-08T12:33:05Z
..........

So after U install nano you just need to add PKG_PATH variable to root .profile. After that
You just gonna use:
Quote
#pkg_add package
instead of pointing a full path every time.

Editing .profile and adding PKG_PATH :
Quote
#nano ~/.profile
your root .profile should look like this
Quote
# $OpenBSD: dot.profile,v 1.9 2010/12/13 12:54:31 millert Exp $
#
# sh/ksh initialization

export PKG_PATH=ftp://mirror.ox.ac.uk/pub/OpenBSD/5.7/packages/'uname -m'/
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
export PATH
: ${HOME='/root'}
export HOME
umask 022

case "$-" in
*i*)    # interactive shell
        if [ -x /usr/bin/tset ]; then
                if [ X"$XTERM_VERSION" = X"" ]; then
                        eval `/usr/bin/tset -sQ '-munknown:?vt220' $TERM`
                else
                        eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM`
                fi
        fi
        ;;
esac

I'm gonna leave this here in case you will mess up it and gonna need a backup.


Installing basic applications and starting xfce
So after it's done.
to install xfce
Quote
pkg_add xfce
to install firefox
Quote
pkg_add firefox
to install vlc, libreoffice, gimp
Quote
pkg_add vlc libreoffice gimp

I think now you have an Idea. And if you would like to try some BSD games I
suggest ou to try angband.
Quote
pkg_add angband

now to start xfce after logging in you need to use
Quote
startxfce4

Ok now you have OpenBSD with xfce, internet connectivity and basic applications
Now you can use GOOGLE from your OpenBSD.



P.S. My slackware kernel is now up to date. But I still enjoy playing with OpenBSD.
May the force be with you, always.
« Last Edit: May 17, 2015, 01:11:08 pm by v32itas »
"There is nothing more deceptive then an obvious fact." - SH

“There was no such thing as a fair fight. All vulnerabilities must be exploited.”
― Cary Caffrey





Offline bones

  • Serf
  • *
  • Posts: 32
  • Cookies: 8
    • View Profile
Re: [OpenBSD 5.7] Installing xfce and basic applications
« Reply #1 on: May 10, 2015, 06:25:16 am »
Xfce is pretty nice on OpenBSD. I wish 5.7 had Xfce 4.12, but it's probably in -current, or could be easily installed. I usually use either cwm or spectrwm, but I have a soft spot for xfce; it's my favorite DE (not a fan of the massively bloated Gnome and KDE).
BSD is what you get when a bunch of UNIX hackers sit down to try to port a UNIX system to the PC.
Linux is what you get when a bunch of PC hackers sit down and try to write a UNIX system for the PC.

Offline v32itas

  • Peasant
  • *
  • Posts: 123
  • Cookies: -4
  • coup de grâce
    • View Profile
Re: [OpenBSD 5.7] Installing xfce and basic applications
« Reply #2 on: May 10, 2015, 06:05:39 pm »
Xfce is pretty nice on OpenBSD. I wish 5.7 had Xfce 4.12, but it's probably in -current, or could be easily installed. I usually use either cwm or spectrwm, but I have a soft spot for xfce; it's my favorite DE (not a fan of the massively bloated Gnome and KDE).

Yes xfce is my favorite too. And I wasnt aware of cwm and spectrwm
 existence until i joined OpenBSD community on facebook. cwm looks
 nice, however i had xfce installed first, didint knew that default
OpenBSD install has cwm, because default fvwm looked really scary
and I just got back fixing my slackware then.
And now when i try to start cwm it gives me strange error about unable
 to open display, I haven't investigated that yet, because oh well xfce
works just fine.
« Last Edit: May 10, 2015, 06:08:01 pm by v32itas »
"There is nothing more deceptive then an obvious fact." - SH

“There was no such thing as a fair fight. All vulnerabilities must be exploited.”
― Cary Caffrey





Offline bones

  • Serf
  • *
  • Posts: 32
  • Cookies: 8
    • View Profile
Re: [OpenBSD 5.7] Installing xfce and basic applications using pkg_add
« Reply #3 on: May 12, 2015, 10:40:39 pm »
You probably just need to put "exec cwm" into your .xinitrc to start cwm instead of xfce. But be warned, the default cwm isn't much better than the default fvwm. Nothing some good .Xdefaults/.Xresources won't take care of, though.
BSD is what you get when a bunch of UNIX hackers sit down to try to port a UNIX system to the PC.
Linux is what you get when a bunch of PC hackers sit down and try to write a UNIX system for the PC.

Offline v32itas

  • Peasant
  • *
  • Posts: 123
  • Cookies: -4
  • coup de grâce
    • View Profile
Re: [OpenBSD 5.7] Installing xfce and basic applications using pkg_add
« Reply #4 on: May 13, 2015, 10:06:37 pm »
You probably just need to put "exec cwm" into your .xinitrc to start cwm instead of xfce. But be warned, the default cwm isn't much better than the default fvwm. Nothing some good .Xdefaults/.Xresources won't take care of, though.
+1 because at first I was too ignorant about those wm's cwm and fvwm having my opinion based on screenshots found on web, but now I find fvwm interesting. That OpenBSD fvwm's default theme is so terrible that I havent even bothered looking for customizing it, but now. Damn It's so out of the box. And I think that your suggestion would solve that open display problem, because I was able to switch to cwm from fvwm and realized that it is quite similiar and discovered about how customizable they both are.
« Last Edit: May 13, 2015, 10:08:28 pm by v32itas »
"There is nothing more deceptive then an obvious fact." - SH

“There was no such thing as a fair fight. All vulnerabilities must be exploited.”
― Cary Caffrey