Thursday, December 24, 2020

Guides on Installing Common Desktop Environment on FreeBSD

Common Desktop Environment - one of the oldest desktop environment for UNIX environment since 90's where most of old-school programmers had their good time with this graphical user interface. Today, this desktop environment had been revived so user with modern PCs can try to install this desktop environment and feel the classical throwback in the 90's.


Today, I'm gonna write on how to install and set up the Common Desktop Environment (CDE) and this guide is heavily aimed at FreeBSD users (sorry, Linux users!)



1. Installing CDE interface

First of all, you will need to obtain the latest ports package first which you will need to compile it yourself.

$ portsnap fetch
$ portsnap extract 

Then, go to CDE ports directory via the command below:

$ /usr/ports/x11/cde

Next, launch the command below to begin building process.

$ make install  

NOTE: If you're having an error during compilation process such as ksh93 is not found, you will need to make a new copy of ksh executable as ksh93 via the command below:

$ cp /usr/local/bin/ksh /bin/ksh93 

1. Configuring CDE interface

Add these line below in /etc/rc.local to start CDE on boot:

/usr/local/dt/bin/dtlogin

To set up CDE Calendar, at these line in /etc/inetd.conf below:

dtspc stream tcp4   nowait  root    /usr/local/dt/bin/dtspcd /usr/local/dt/bin/dtspcd
cmsd/2-5    dgram rpc/udp4 wait root /usr/local/dt/bin/rpc.cmsd rpc.cmsd

Then, add these linds in /etc/rc.conf below:
rpcbind_enable="YES"
inetd_enable="YES"

After that, add these line in /etc/hosts below:
127.0.0.1   HOSTNAME

Friday, June 12, 2020

Setting up FreeBSD on your PC/Laptop after installation

This guide will show you on how to set up your FreeBSD OS after installation. This step is fairly different than the virtualbox guide so you will require some extra step for that.


1. SETUP xorg PACKAGE
It is best to compile the package from scratch rather than install the pre-built ones. You don't want having yourself scratching up your head due to problematic issues such as video playback not working and etc. 1

If you're not installing ports from the FreeBSD installation setup, run the command below to obtain ports package. 
 
$ portsnap fetch
$ portsnap extract 
Then, you will need to install both components first, llvm and meson.
$ whereis llvm
llvm: /usr/share/ports/devel/llvm
$ whereis meson
meson: /usr/share/ports/devel/meson
Next, go to these direcotries and build these packages. This will take a longer time so be patient.
$ cd /usr/share/ports/devel/llvm
$ make install clean
$ cd /usr/share/ports/devel/meson
$ make install clean 
Then, locate the ports package for xorg
$ whereis xorg
xorg: /usr/share/ports/x11/xorg
After that, go to the xorg ports directory and build it from scratch
$ cd /usr/share/ports/x11/xorg
$ make install clean

2. SETTING UP GRAPHICS DRIVER.
Sometimes, installing a graphic driver could be pretty messy especially with Intel GPUs from which I thought that it's pretty easy to install than the Nvidia or AMD counterparts. 

First, install the pre-built drm-kmod package first, pay attention to the terminal output on the screen:
 $ pkg install drm-kmod
New packages to be INSTALLED:
	drm-kmod: g20181126 [FreeBSD]
	drm-current-kmod: 4.16.g20190305 [FreeBSD]
Message from drm-current-kmod-4.16.g20190305:

The experimental drm-current-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled (similar to amdgpu).

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="/boot/modules/i915kms.ko"
For radeonkms: kld_list="/boot/modules/radeonkms.ko"

Please ensure that all users requiring graphics are members of the
"video" group.

Older generations are supported by the legacy kms modules (radeonkms / 
i915kms) in base or by installing graphics/drm-legacy-kmod.
Then, add these lines into /etc/rc.conf: For amdgpu (newer AMD GPU cards):
 kld_list="amdgpu"
For Intel GPU:
kld_list="/boot/modules/i915kms.ko"
For radeonkms (older AMD/ATI GPU cards):
kld_list="/boot/modules/radeonkms.ko"
NOTE: If you're using Nvidia GPU cards, you might need to take a look at these guides here. Other guides can be followed through this forum link here and also from the FreeBSD handbook guide here.

NOTE: If you're using Intel GPU and having difficulties while activating GPU even though the drm-kmod is installed and added into /etc/rc.conf correctly without syntax error, you might need to take a look at this forum link here.

For Intel GPU, additional steps needs to be taken in order to activate the hardware acceleration. You will need to add the SNA Acceleration mode in /usr/local/share/X11/xorg.conf.d/driver-intel.conf:
Section "Device"
        Identifier  "Card0"
        Driver "modesetting"
        Option "AccelMethod" "sna"
        Option "TearFree" "true"
EndSection
Finally, add yourself to video and wheel group:
$ pw groupmod video -M [username]
$ pw groupmod wheel -M [username]
3. SETTING UP SOUND CARD 
Setting up the soundcard might be different between the hardware and by default, the soundcard can be enabled by this line here in /boot/loader.conf
 snd_hda_load="YES"
However, sometimes, this line might have some issues either your hardware or your current OS versions which your video fail play. So, in order to enable the soundcard without some issues, add these line on /etc/sysctl.conf below
 
  dev.hdac.0.polling=1
  hw.snd.default_unit=1
If you're still having some issues with soundcard which is video is playable but no sound, just edit the value on the line hw.snd.default_unit to 0

4. MISCELLANEOUS
Turn off unnecessary thing like sendmail function:
 sendmail_enable="NO"
      sendmail_msp_queue_enable="NO"
      sendmail_outbound_enable="NO"
      sendmail_submit_enable="NO"

5. WIFI ISSUES
Just to say that FreeBSD not really friendly at detecting wifi devices compared to Linux OS. For now, you might need a USB wifi travel router that have a client capability to connect the wifi via LAN connection like this below:
                                        

Sunday, June 7, 2020

FreeBSD Guide For NOOBS! [PART 2 - Installing some stuffs]

The part 2 of this guide will covers how you are going to install these packages and also how to set up the desktop environment as well. Please pay full attention at this guide and also the output from the terminal as well because there are some extra steps that every user must be taken in order to complete the installation. 

1. SETTING UP STUFFS 

Log in FreeBSD OS as root account. You are required to set up some stuffs.

Then, run the command below: 
 pkg install sudo nano

Next, you will need to set up sudo file and associate with your username. Run the command below:
 nano /usr/local/etc/sudoers


Uncomment the section of the line like this:
 
%wheel ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSwD: ALL
%sudo ALL=(ALL) ALL
Then, add username into sudoers file:
 amirzaim ALL=(ALL) ALL
Press Ctrl+O to save the file and then press Ctrl+X to exit.

Next, we are going to set up the desktop environment. Xorg package must be installed first before installing any kind of desktop environment. Run the command below:
 pkg install xorg
Next, enter this line kern.evdev.rcpt_mask=6 on file /etc/sysctl.conf to allow ps/2 mouse especially on virtualbox.

.

Then, install the desktop environment. For KDE, run the command below:
 pkg install kde5
For Gnome, run the command below:
 pkg install gnome3
For XFCE, run the command below (login manager need to installed alongside as well):
 pkg install xfce gdm
Desktop environments needs /proc to be mounted, so you will need to add the line proc /proc procfs rw 0 0 on /etc/fstab

Next, open up file /etc/rc.conf and add two lines first:
 
dbus_enable="YES"
hald_enable="YES"

For Gnome/XFCE, add these lines into /etc/rc.conf file:
gdm_enable="YES"
gnome_enable="YES"
For KDE, just add these lines into /etc/rc.conf file:
sddm_enable="YES"
Then, reboot the virtual machine. If you seeing this logon screen, congratulations!



HELP!!! MY FREEBSD FAIL TO BOOT DUE TO SYNTAX ERROR ON /etc/rc.conf FILE!!!
Don't worry! Just enter these command here below to grant the disk access during abnormal boot:
fsck -y
mount -u /
mount -a -t ufs
swapon -a
NOTE: If you're installing FreeBSD on actual hardware instead of virtualbox, then you will need to configure graphics manually. See this FreeBSD handbook for details. 

 Let's go to part 3 to play it around the FreeBSD interface...

Saturday, June 6, 2020

FreeBSD Guide for Noobs! [PART 1 - FreeBSD Installation]

ENOUGH WITH LINUX BULLSHIT, MIGRATE TO FREEBSD!

Second revision: 8 Sept 2023.

Today, I'm writing here on how to set up FreeBSD for users who want to learn something about operating system that is much different than Linux although looks bit same. Let me tell something about FreeBSD - it is an open-source, unix-like operating system, much like Linux but different than Linux. The major difference between FreeBSD and Linux is you can develop a closed-source version of FreeBDS operating system and you are also have rights to remain your modified source codes hidden from public. On Linux, you can't simply closing-source the code and you shall give up the code to the penguin king and then the penguin king is now starting to bitching about it!

FreeBSD operating system mainly popular on high-end server and networking machines rather being popular at desktop but it is also popular at gaming consoles such as Sony PS3/PS4 consoles and even Nintendo Switch as well due to the nature of BSD license clause that allow the creation of close source version of their operating system. On the other hand, FreeBSD is simply a full-fledged operating system when compared to Linux which is just a kernel and heavily dependent with other stuffs that make up the operating system. If you're already expert on Linux, I'm sure that you're might also able to handle FreeBSD OS as well although it's kinda bit confusing at the moment and the way of installation of FreeBSD is I just say - bit similar to Arch Linux but the difference is FreeBSD provides guided CLI-based installer so you don't have to waste your time writing the command one-by-one like Arch Linux. 

Saturday, March 7, 2020

Locked Out Tracks On Music Streaming Services - How To Unlock Them

TL:DR - Just buy that album if possible!

Music streaming services like Apple Music, Spotify, Tidal etc. revolutionize on how to enjoying the music (although it sounds like a mitigation to overcome piracy that eventually killed the traditional physical media) and many people are using it. Although music streaming services provides a countless of music catalogs, however there's a catch - you can't enjoy region-locked albums or songs!

Region-locked tracks are pretty normal especially non-English songs like Japanese song (well, this one is pretty notorious). But, if you're sitting in one particular region and wanted to access the song/album from the region where you lived and then encounters several unplayable tracks that you might seems it as region-locked tracks but it really isn't region locked tracks.

Instead, you're now encountering LOCKED OUT TRACKS!

Example of one album which have locked out tracks

The main cause of these locked out tracks are one particular thing - permission issues on streaming sites. Record labels often have their rights to modify and alter the music catalog and even screwing up you especially you're already paying music streaming subscription when it comes to locked out tracks or albums or even wiping out the catalog from music streaming sites.  So, is there any way to overcome that thing?

If you're using Spotify or other streaming services that only provides music streaming only, there's nothing much you can do about it, these locked out tracks will stay locked out forever until they changed their mind. If you're using Apple Music. there's a great news for you - you can purchase the album to unlock these tracks!

If you're using Apple Music on iTunes program, simply click on the 3 dotted lines on the album you just saved into library and select show in iTunes Store. From there, you can purchase the full album to enjoy the locked out tracks. 

Purchase the album to unlock the tracks. You can see these tracks are marked as "ALBUM ONLY"
Subsequently, you can enjoy streaming these unlocked tracks on Apple Music on smartphone without having to import purchased album track files but it must be accessed from Library section only. If you're using other than Apple Music, look out for album purchase section where you can buy the full album to unlock these tracks. If not, these locked out tracks are remaining locked for a long time. 

Hope this guide helps you...cheers...



Saturday, February 29, 2020

Facebook - The Scrutiny of Freedom Speech

I really hate to write this but I want to write something about Facebook here - It disregards your rights to freedom of speech in the name of "Community Guidelines". It's just really ironic when a certain post from certain language can't be deleted and yet, some posts that I write in plain English or my mother tongue is just getting deleted and having a present surprise - A 3 day ban, or worst 30 days ban.

The problem with Facebook is when you're being forced to accept their community guidelines that is not suit your agenda, political ideology or anything that is not right and whenever you're commented or posted them, you will slapped with a several days ban alongside with warning as well. Also, if you're using Facebook anti-tracking tool like browser extension and etc, you also need to be careful because Facebook is really mad when they can't track what are you browsing outside Facebook.

In Facebook, you are not allowed to criticize about certain things like race, ethnicity, LGBT and so on and even you can't post anything that supports Nazi. But the main problem with Facebook is being double standard when dealing such issues such as religion when they seems don't want to remove the post although the post itself is regarded is defaming other religion. Also, Facebook still failed to adhere cyber-bullying issues where any post that I reported gets ignored pretty often and instead, I was just slapped with a several days ban instead!

Facebook is really famous for privacy scrutiny when Cambridge Analytica harvesting user information which are obtained from malicious 3rd-party apps and ended up having fines of billions of dollars. And it just keep slapped it again and again. I wish that Facebook will be tumble down alongside with its two-somes like WhatsApp and Instagram (I deactivated that thing).

So, if you're using Facebook, pretend that you're using a clown mask, that's it. And, delete FB app and keep using Brave browser instead, you will not being tracked down, let the Facebook collecting rage level and explodes...

PS: These ban just relieved me from social anxiety and FOMO.