Showing posts from 2020

Setup mail server with ldap authentication in docker

Getting an email server to run in docker is easy but getting an email server with ldap authentication to run in docker spend me a week to get up and running. Here are the steps that I taken. I will assume you already know how to install docker. Install LDAP. docker run \              --detach \              --restart unless-stopped \              --name openldap \              -e LDAP_ORGANISATION=domain \              -e \              -e LDAP_ADMIN_PASSWORD=complex-password \              -e LDAP_RFC2307BIS_SCHEMA=true \              -e LDAP_REMOVE_CONFIG_AFTER_SETUP=true \              -e LDAP_TLS=false \              -p 389:389 \              --volume /data/openldap/var_lib_ldap:/var/lib/ldap \              --volume /data/openldap/etc_ldap_slapd.d:/etc/ldap/slapd.d \              osixia/openldap:latest Install postfix-book schema into the ldap. # cd /etc/ldap/schema # apt update # apt install vim wget # wget

Firefox performance issue at fedora 32

If you are running firefox in Fedora 32 XFCE spin, you might face performance issue. I fix it by turn on gfx.webrender.enabled and gfx.webrender.all in about:config . Hope this will help to solve the issue for you. ---

My note on ffmpeg usage

Most Common Basic Usage to burn subtitles into video ffmpeg -i input.mp4 -vf subtitles="" output.mp4 with gpu ffmpeg -i input.mp4 -c:v hevc_amf -vf subtitles="" output.mp4 ffmpeg -i input.mp4 -c:v h264_amf -vf subtitles="" output.mp4 ffmpeg -i input.mp4 -c:v h264_nvenc -vf subtitles="" output.mp4 Use this command to list down gpu option available ffmpeg -f lavfi -i nullsrc -c:v h264_nvenc -gpu list -f null - Below is the RAW note which I haven't tidy up. Bash Shell Script for convert media file in batch. for f in *.flv do #echo $f #echo ${f%.*} ffmpeg -i $f ./done/${f%.*}.mp4 done rename 's/ACDC/AC-DC/' *.xxx To replace # by somethingelse for filenames in the current directory (not recursive) you can use the GNU rename utility: rename  's/#/somethingelse/' * Characters like - must be escaped with a \. ffmpeg -i orig.mkv -filter_complex "[0:v][0:s]overlay=(W-w)/2:(H-h)/10*9

Connect 2 monitors to Dell Laptop G3 15 on Fedora 32

If you are trying to connect 2 monitors (HDMI + USB C), you might find that only USB C and the laptop monitors is working in Fedora 32. After I search around, here is the simple solution. Create a file (any file name end with extension .conf) under folder /etc/X11/xorg.conf.d. I name it 11-nvidia-prime.conf. (Copy from ubuntu). Enter the lines below and reboot.  [root@localhost xorg.conf.d]# cat 11-nvidia-prime.conf Section "OutputClass"     Identifier "Nvidia Prime"     MatchDriver "nvidia-drm"     Driver "nvidia"     Option "AllowEmptyInitialConfiguration"     Option "IgnoreDisplayDevices" "CRT"     Option "PrimaryGPU" "Yes" EndSection I believe this solution should be working for Fedora 25 and above. Leave me a message if you have question.