Choosing the best version of Fedora app packages

Downgrading is something that looks scary. Come to think of it: come back to the past is something everyone afraid of, right? 😀 Nevertheless, sometimes downgrading is the option we want to choose when the current app is not working well, and there is no option to upgrade.

Recently I had VLC in Fedora that cannot stream from my Raspberry Pi DLNA server. The server is not listed on the UPNP playlist. While when I try VLC in Android, it could see the server. In the debug log message (CTRL+M), there were a couple of error messages, something like upnp services discovery: Initializing libupnp on '(null)'.

And actually, the workaround is simple: there is a feature of DNF to downgrade the working version of packages. In this case, the newest version of VLC that I installed from COPR repo cannot work with the latest libupnp version. Then I have to downgrade it to the previous version which fortunately still working.

sudo dnf downgrade libupnp

screenshot_20161227_214622

Dealing with Fedora firewall configuration

Fedora includes and enables firewall rules set by default. I mean –as an end user opinion– it’s not the same as Ubuntu. When I was using Ubuntu, everything just works, no hassle caused by firewall. Then when the first time I tried Fedora, there are a few restrictions created by firewall configuration. I’m not really understand firewall, though. But soon I learnt it.

TL;DR, at least I’ve got 3 hurdles in dealing with Fedora firewall default config. They are blocked by the config, i.e

  • Samba Share
  • KDE Connect
  • VLC UPNP / DLNA

By then, I put them as whitelist apps to be allowed in the Firewalld config manager. Then this day, I look again, and actually I totally disable the firewalld of systemd.

sudo systemctl disable firewalld

Fedora KDE: Automount NTFS Partition at Login

I had a dual boot system: Windows and Ubuntu ever since I knew Linux world. So, I always have a separate partition to store files, which both OS can access them. The partition is always formatted with NTFS, something that’s not come from Linux world. Something like an alien for Linux, but has a good integration, since the Linux contributors gave support for NTFS partition. So, there’s no difficulty to read files in NTFS drive with Linux.

But, the problem comes when we want to ‘mount’ the drive / partition. It usually asks for a root password to mount. It’s not so convenient to type the password every time we mount the drive / partition, isn’t it?

“Hey, there is /etc/fstab out there.” You may think so. Oh, yeah, I almost forget this one. Actually we can set the partition to be automounted in every boot. But I don’t know why I avoided this approach since then.

So, I always use the automount option of Ubuntu instead. Ubuntu has the option to automount the drive/partition somewhere in the system settings if I remember correctly. After I switch to KDE desktop, I also found the option in the KDE systemsettings. So, I’ve got the partition to be automounted as soon as I log in to the plasma desktop.

A little trouble with Fedora

Now I also use Fedora in my daily basis. And I also choose KDE as the desktop. But, after a while, I found out that KDE was unable to automount the NTFS partition like Kubuntu did. Even though I have checked the option to ‘automount at login’, it still didn’t work.

fedora-automount

Then, a couple of days ago, I asked people in the #fedora-kde channel at Freenode IRC about my problem. Then a person with username ‘rdieter’ pointed about  ‘Privilege escalation’ in Fedora.

So, I just asked google about it, and it’s actually a piece of cake to find the best answer. I followed the instruction in AskFedora forum here. And it’s just work! Great! Here’s the workaround I managed to do automount partition in Fedora.

Follow the guide for Fedora 17, but the file should be saved to /etc/polkit-1/rules.d/99-mount-partitions.rules and its contents should be:

// Password-less mounting of local partitions
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("wheel")) {
       return polkit.Result.YES;
    }
});

The writer noted that it’s for Fedora 18, but the comment below it states that it’s also working for Fedora 22. And yes, so does Fedora 23. Now, Dolphin doesn’t ask for password when I click on the NTFS partition.

Setting Up fcitx-mozc in Fedora 23 KDE

こんにちは。今回のテーマは『Fedora 23に日本語入力fcitx-mozcを導入する』です。最近はLinuxでの日本語入力としてfcitx-mozcの人気がジワジワ高まっているように感じます。

Recently, Mozc, Japanese input methode engine by Google become more popular, compared with Anthy, so does fcitx upon ibus. In the official repository of Fedora, there’s fcitx-anthy, but unfortunately, there’s no fcitx-mozc yet.

Here I will wrap up the workaround for those who want to use fcitx-mozc in Fedora 23. Be careful, that you take responsible of all risks that may happen, as it may lead to dependency hell. Basically, you are going to get favor from OpenSUSE as it has provided fcitx-mozc. You need 3 packages to be downloaded: fcitx-mozc, mozc, and mozc-gui-tools.

  1. Download those 3 packages from https://software.opensuse.org/421/en, select “more version” link, under Direct install button, there you can choose the package version and system architecture, whether 32 bit or 64 bit
    fedora31
  2. Remove ibus-mozc and mozc if already installed via command sudo dnf remove ibus-mozc mozc
  3. Install fcitx if it’s not installed yet, sudo dnf install fcitx kcm-fcitx
  4. Then install the previously downloaded packages via console. sudo dnf install fcitx-mozc.rpm fcitx-gui-tools.rpm mozc.rpm
    fedora33
  5. Once it successfully installed, you can set the default input method to fcitx-mozc via system settings.
    fedora34
    at the left list, you may have to uncheck the option “Only show the current language” to show Mozc and move to the right. Apply the settings and just relogin to Plasma to take effect and see the fcitx icon at the taskbar below.

via Fedora 23に日本語入力fcitx-mozcを導入する.

KDEConnect not Working in Fedora 23 KDE

I’ve just successfully connected KDE Connect in my Fedora 23 KDE to Android. Just before, I thought it didn’t work in Plasma 5 or broken in Fedora. Since it could not find the Android devices, although they have KDE Connect app installed. But actually, it’s just blocked by firewall config of Fedora.

According to KDE Wiki, the ports for kde-connect need to be opened, i.e 1714-1764. I’ve never thought that such essential part of the desktop environment would be blocked by firewall. So I had no idea to touch firewall config at all. It was until I found a discussion on Reddit about the same problem I had. A user pointing out about Fedora’s firewall that seems blocking kde-connect. But I could see the ports either TCP or UDP have been opened and listened in the firewall config. But then I found out that kde-connect was unchecked in the Services list.

It means that the firewall didn’t allow kde-connect to access the ports it needs. Then I just had to check it, typed password, and voila… my Android device has been found by kde-connect. So now, I can enjoy syncing Android to KDE and playing some stuffs it has.

References:
1. https://community.kde.org/KDEConnect#Troubleshooting
2. https://www.reddit.com/r/kde/comments/388fo0/kde_connect_fails_to_function/
3. http://www.bakalarczyk.com/posts/kde-connect-fw/

QR Code Scanner with Qt Framework + OpenCV

I need a program for scanning QR code and processing the data. For this purpose, there are several libraries which can help saving my time for developing it. For instance, ZXing library, or ZBar. For web developers, there are also corresponding library for scanning QR code, that are both client side (JavaScript) and server side (PHP). Continue reading QR Code Scanner with Qt Framework + OpenCV

Membuat Flashdisk Multibootable dengan Grub4Dos [Lagi]

Sebelumnya sudah saya tulis tutorial membuat flashdisk multibootable dengan grub4dos. Pada tulisan tersebut, hanya dijelaskan caranya untuk Windows. Sedangkan kali ini, saya menjelaskannya untuk Linux. Ternyata grub4dos memang bisa membuat flashdisk bootable tidak hanya di Windows, tetapi juga di Linux.

Sebenarnya sudah ada aplikasi lain untuk membuat flashdisk bootable yang lebih mudah. Lalu kenapa saya bersikukuh dengan grub4dos? Karena keras kepala. 😀 Bukan. Tetapi karena saya punya kontrol penuh terhadap flashdisk. Mungkin istilahnya kurang tepat, tapi maksudnya, setidaknya saya tahu apa yang dilakukan grub4dos.

Continue reading Membuat Flashdisk Multibootable dengan Grub4Dos [Lagi]