Tag Archives: freebsd

FreeBSD git fatal: Unable to find remote helper for ‘https’

I just found out that git is not fully functional on my FreeBSD (11) box. It was installed from port (using portmaster git). I can clone a repo using SSH key, but not with HTTPS.

I’m not quite sure if it’s always been this way. Here is how to fix it:

1) Reinstall curl

# pkg remove curl
# portmaster curl

2) Reinstall git

# pkg remove git
# portmaster git

Why did I install git from port? Well, ‘cuz there is no binary package for FreeBSD 11 arm, which runs on my Raspberry Pi B+.

Installing Pip with Python 3.5 on FreeBSD

Here is a quick note serves as a self-reminder on how to get pip working or installed on FreeBSD 10.3.

# pkg install python35

There is no package for pip, at least at the time of this writing, on FreeBSD. To have it install, run the following command:

# python3.5 -m ensurepip

While you’re at it, you might as well update pip:

# pip3.5 install --upgrade pip

Thanks to this post in the FreeBSD forum: https://forums.freebsd.org/threads/52702/.

Mouse not working in Xorg on FreeBSD

After installing Mate desktop environment on a fresh FreeBSD 10.2 box, mouse was not working. This is what I have in my /etc/rc.conf:


Some suggests that the order of hald and dbus be swapped around. I tried that, and it didn’t work.

A bit of more Googlings, I found out a working solution[1]. I need to install: xf86-input-mouse.

Here’s how I did it:

# portmaster x11/drivers/xf86-input-mouse

And that’s all required to be done. If your keyboard is not working in Xorg, you might want to also install xf86-input-keyboard.

Full credit goes to the guy at the killtheradio.ne. Thanks!


– [1] http://killtheradio.net/tricks-hacks/keyboardmouse-not-working-in-xorg-on-freebsd/

PF firewall rule for DNS server

A reminder to readers, most of these blog posts are to remind me what I have done or fixed some problems. What works for me may not work for you. Most of the time, they aren’t even the best practice.

Here’s a snippet of the PF firewall rule on my FreeBSD box which acts as a DNS server. Basically, the firewall opens up UDP port 53 to allow LAN access it.

ext_if = "ue0"
pass in on $ext_if proto udp from to any port 53 keep state

Reference: IPFW rules for DNS Resolvers

Remove a file/directory starting with dash/hyphen

I just noticed that in the /root directory, there exists a directory with its name starting with a dash: -p in my FreeBSD box.

root@raspbsd:~ # ls -l
total 144
drwxr-xr-x  2 root  wheel    512 May  5 18:26 -p
drwxr-xr-x  2 root  wheel    512 May  5 20:45 .byobu
drwxr-xr-x  3 root  wheel    512 May  5 20:45 .cache
-rw-r--r--  2 root  wheel    959 Jan 23 00:59 .cshrc

As much as I wanted to get rid of it, I was curious to find out what’s inside that directory.

root@raspbsd:~ # cd -p/
Usage: cd [-plvn][-|...

That didn’t work. After a short while of trying many things, I figured out 2 ways to do it.

root@raspbsd:~ # cd \-p
root@raspbsd:~/-p # 

Another way (1) is to add ‘./’ in front of it:

root@raspbsd:~ # cd ./-p
root@raspbsd:~/-p #

Finally, after confirming that the ‘-p’ hold no file, it can be deleted as:

 # rmdir ./-p

Notice that, # rmdir \-p does not work though. I should have put a disclaimer on the top. I only tested this on FreeBSD, but it should also work on Linux. If you decide to follow my instruction to remove any files on your system, do it cautiously. I will not be responsible for your action ^_^.

Reference: (1) http://www.electrictoolbox.com/delete-file-starting-with-dash-hyphen/