torsdag 12 december 2019

openssl: Can't load /home/[username]/.rnd into RNG

On Ubuntu 18.04 LTS I got the following error message:
Can't load /home/sniglom/.rnd into RNG

The solution was to comment out the following line in /etc/ssl/openssl.cnf:
RANDFILE = $ENV::HOME/.rnd

I found this solution via the openssl project at github.

måndag 4 november 2019

Slack open links in its own browser on Ubuntu

Running 18.04 LTS I discovered an odd behavior from Slack. Instead of opening links in my regular FIrefox installation, it opened its own Firefox-instance. That instance had no plugins and was grouped as a slack process in the menu bar. Weird.

Reinstalling Slack from Ubuntu Software didn't help and I couldn't find a setting within Slack that controlled this.

The solution to my issue was to install the .deb file from Slack's homepage, instead of using Ubuntu Software. After doing so, links opened through my regular Firefox installation, instead of starting new processes belonging to Slack.

Source: askubuntu.com

tisdag 1 oktober 2019

option OSS requires SDL_AUDIO

Trying to compile SDL20 I got the following message. It took a while before I realized that this wasn't a library that I needed to install, I needed to reconfigure SDL20 to add the SDL_AUDIO option.
To do that I simply ran "make config" in the SDL20 port directory and added SDL_AUDIO.

FreeBSD: X needs Python 3.5 at least, but 2.7 was specified.

When trying to compile using the ports system, the error message that something needs Python 3.x, but 2.7 was specified is quite common.
This is due to the ports system "remembering" the python version that was specified by a top level package, while a dependency may require something else.

The solution is to manually compile the dependency first.

In my case I was trying to build sdl_sound, but it failed due to meson-0.51.2 needs Python 3.5 at least, but 2.7 was specified.
To fix this I compile meson first, then I go back and compile sdl_sound.

söndag 22 september 2019

Avoid configuration prompts when installing freebsd ports

When installing ports with many dependencies, repeatedly stopping the compilation to show a configuration prompt is annoying, especially if you want the default values. This can be avoided in a couple of ways.

When installing a port, adding either of these batch flag uses default.
make install BATCH=YES
make install -DBATCH

The batch flag can also be set as an environment variable.
export BATCH=yes

What if you want to configure everything first and then compile?
make config-recursive
Remember that this command needs to be run many times until all configuration has been performed.

Sources:
1 unix.stackexchange.com
2 unix.stackexchange.com

Get octal permissions for files.

Sometimes it would be nice to read the permissions in octal, not only set it in octal.
This can be done using the stat tool.

This command will list all files/folders and their octal permission.
stat -c "%a %n" *

-c is for specifying the display format.
%a is the octal permission and %n is the file name.

Source: AskUbuntu.com