Megasync Desktop Client Broken

I upgraded my Megasync plan from Free to LITE last August 13th. Two days later my megasync client is broken.

sudo] password for donato:
Aug 13 15:30:57 archdesktop megasync.desktop[1528]: libpng error: Not a PNG file
Aug 15 17:13:15 archdesktop megasync[1528]: Error reading events from display: Broken pipe

And when I tried to reinstall it aborted “build” due to permission issues in autogen.sh.

Aug 17 18:59:28 archdesktop sudo[28937]: donato : TTY=pts/1 ; PWD=/home/donato/Downloads/builds ; USER=root ;
COMMAND=/usr/bin/pacman -U megasync-x86_64.pkg.tar.xz
Aug 17 20:30:17 archdesktop gnome-software-service.desktop[1601]: 12:30:17:0546 As failed to rescan: Failed to parse /usr/share/applications/megasync.desktop file: cannot process file of type application/x-desktop
[donato ~]$

My best guess is this is a corruption in a configuration file. shame. I liked megasync. Now I have to use it in a browser to upload and download files to the cloud storage.

I Don’t Stand With Racists, I Won’t Walk With Bigots

It should be easy to tell which is bad and which is good. They want to exterminate a group of human beings based on race. Anyone who saw the gas chambers and the labor camps and heard testimonies of what the nazis did will recognize evil. It should be easy to denounce anyone who believes what the nazis believe. The nazis hate jews and believe in the aryan racial superiority. World War II was fought because of it.

In a country founded on the principle of equality and freedom, this contrast makes any other perspective untenable. For the leader of such a country to not critically denounce white supremacists and neo-nazis is a failure of historical proportions. How many americans died fighting in Europe to liberate it from Hitler? Instead the de facto leader of the free world, (I’m not referring to Donald Trump) Angela Merkel, Chancellor of Germany, denounced the neo-nazis in the United States. Donald Trump doesn’t deserve a position he clearly doesn’t understand. Donald Trump should be censured by Congress. The United States should be clear to the world it doesn’t stand with racists and bigots.

What Does Use Your Own Words Mean

I enjoy reading books. I enjoy tech books, you know the how-to, semi-textbook books. I even read manuals, believe it or not. Okay, I read manuals because I was told to. My point is reading about things make you think about things. Not as interesting as hearing your parents talk about sex but for most of my knowledge I got it from reading books. When I read enough of it I ran to an adult and try to start a conversation about it with an adult. Always, they give me this look of “where did you read that?” and that is the dismissal I get as a kid. Does it work better if I tell a lie? Do I dumb it down and pretend I’m an idiot?

In seventh grade, I was introduced to book reports. I was to read books from a school prepared list and submit a type written paper. I got a list of guide questions on what I’m suppose to write about. They are basic questions about the plot and the characters of the book and what I think about them. This was before those Idiot Guide Books became popular. In the first few attempts of submissions, I tend to tell the story myself, then it evolved to telling the story as I enjoyed them. I was in eight grade, yes, the second year of attempting to write something passable for a good book report, when my teacher read my book report on a novel by Robert Heinlein titled Methuselah’s Children in class. She remarked that this is how you write a good book report. Afterwards, I read my copy of that book report, and read it again, trying to find out what I did right with it. I asked my teacher about it too. I never answered a single question in the list of guide questions. Right, and you had lots of fun writing it too. Aha. It shows. Well my teacher’s smiles tell me she had lots of fun reading it, that is all.

When I read a book, read it to understand. Walk with the pace of the story. You will soon get to that part of the novel when everything seems to slow down and like Flash seems to move from one part of story to the next. You’re in the groove. Then it hits you with a blind corner. I see fear, wonder, anger or gratitude there. Here is the point when I know what to write in my book report.

Unless you get to feeling these emotions, you won’t know what to say. If you don’t know what to say, you’re bound to copy what other people think about the book and use their words not your words. So feel it. then tell me about it the best way you can.

Setting Up rkhunter Using systemd

rkhunter is a rootkit and malware detection application available in the repositories. So you can install it using pacman with command:
#pacman -S rkhunter ##to install rkhunter.

I’m skipping configuration steps for your user case. I’m referring to any changes you wish to do with /etc/rkhunter.conf. Perhaps another blog post is necessary. For this post, I wish to start rkhunter in systemd using Unit and Timer methods.

From systemd Website:

systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points, and implements an elaborate transactional dependency-based service control logic. systemd supports SysV and LSB init scripts and works as a replacement for sysvinit. Other parts include a logging daemon, utilities to control basic system configuration like the hostname, date, locale, maintain a list of logged-in users and running containers and virtual machines, system accounts, runtime directories and settings, and daemons to manage simple network configuration, network time synchronization, log forwarding, and name resolution.

I wish to run rkhunter daily with systemd managing the service and the process. To do this I have to create two files. A Unit or Service file and a Timer file. I’m going to use vim but use the text editor of your choice.

#vim /etc/systemd/system/rkhunter.service ##to create the service file

[sample service file]
[Unit]
Description=rkhunter rootkit scan and malware detection

[Service]
Type=oneshot
ExecStart=/usr/bin/rkhunter –update
ExecStart=/usr/bin/rkhunter –propupd
ExecStart=/usr/bin/rkhunter –check -sk
RemainAfterExit=yes

Type can be simple, oneshot, idle, forking, notify and dbus.
ExecStart is the command for the process, path to the command.
RemainAfterExit accepts boolean value, yes if you want to tell systemd that the process is active after it exited.

#vim /etc/systemd/system/rkhunter.timer ##to create a Timer file. A timer file ends in .timer. A timer file is required by the service file.

[sample timer file]
[Unit]
Description=Run rkhunter daily

[Timer]
OnCalendar=daily
RandomizedDelaySec=15m
WakeSystem=true
Persistent=true

[Install]
WantedBy=timers.target

Unit= refers to the service the timer is starting
OnCalendar= refers to real time (wallclock, etc.) for example second, minute, hours, day, week, year
RandomizedDelaySec= tells systemd to manage start of process to efficiently use system resources
WakeSystem= tells systemd to wake the system up from sleep to perform action if supported
Persistent= in case of process failing to run after elapse of timer, systemd runs the process

$ systemctl status rkhunter.timer
● rkhunter.timer – Run rkhunter daily
Loaded: loaded (/etc/systemd/system/rkhunter.timer; disabled; vendor preset: disabled)
Active: active (running) since Sat 2017-08-12 23:37:04 +08; 1h 6min ago
Trigger: n/a
$

● rkhunter.service – rkhunter rootkit scan and malware detection
Loaded: loaded (/etc/systemd/system/rkhunter.service; static; vendor preset: disabled)
Active: active (exited) since Sat 2017-08-12 23:08:17 +08; 1h 36min ago
Main PID: 16924 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/rkhunter.service

If you are prompted to reload systemd, the command is :
#systemctl daemon-reload

If rkhunter finds something suspicious, and issues a warning the process will exit with a value other than 0 which is failure. I have rkhunter configured to send an email to me in /etc/rkhunter.conf in such a case.

GnuCash: Why I Like It And What Else Do I Want From It

gnucash-about-window

GnuCash is free accounting software for personal and small business use.

I’m a bookkeeper by training who got into computers early in my career. I was already handling financial books in my on-the-job course in college. Back when I’m still using pen and paper, the calculator is still on my desktop ( a real Casio calculator and a real desk). That summer job environment has gone the way of the dinosaur and the next year I was employed by a company with IBM machines and my journey in the world of computerized accounting started. Twenty-seven years on, my personal finances are in the hands of more powerful computers and certainly more ubiquitous applications.

I have been using GnuCash for two years to handle my small apartment rental business and my bank account. In addition to a desktop computer, I have an 8-inch tablet and my android smartphone. GnuCash can run on all these devices in varying form and features. I employ a cloud service to sync the data file on all devices. So I can pretty much check and analyze financial data, run graphs anywhere I happen to need it. I can create statements and graphs from updated database as soon as I enter the current data in a few clicks. GnuCash runs on Windows 10, Mac OS and Linux. They also have an app in Google Play.

I need GnuCash to have ready business forms like receipts, payment orders and automatic receivables summary. An easy printing feature to help users make hardcopy. Perhaps a notification system isn’t a bad idea too.

Creating Pacman Hook For Cleaning Cache

You can create a pacman hook which executes paccache to clean the pacman cache everytime pacman is run. Just a simple file saved in /etc/pacman.d/hooks.

Before anything check /etc/pacman.conf if the line Hookdir=/etc/pacman.d/hooks has been uncommented. If not, then uncomment it. edit: By default the config file looks at the directory, you can ignore this step if you are putting the .hook file in the default location.

In your favorite text editor create a file to be saved in /etc/pacman.d/hooks.

An example of a pacman hook to clean the cache:

[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *

[Action]
Description = Cleaning pacman cache…
When = PostTransaction
Exec = /usr/bin/paccache -r

Whenever you upgrade, install or remove a package using pacman, it should pull the hook.

[partial pacman -Syu print]
:: Processing package changes…
(1/1) upgrading firefox [########################################################] 100%
:: Running post-transaction hooks…
(1/4) Cleaning pacman cache…
==> no candidate packages found for pruning

[partial pacman -Syu print]

See the hooks built in for pacman here along with the one user added.

[print starts]
:: Processing package changes…
(1/6) upgrading geocode-glib [########################################################] 100%
(2/6) upgrading libsystemd [########################################################] 100%
(3/6) upgrading mesa [########################################################] 100%
(4/6) upgrading systemd [########################################################] 100%
(5/6) upgrading systemd-sysvcompat [########################################################] 100%
(6/6) upgrading vulkan-intel [########################################################] 100%
:: Running post-transaction hooks…
(1/7) Updating linux initcpios
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: ‘default’
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.12.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [mdadm_udev]
-> Running build hook: [lvm2]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: ‘fallback’
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.12.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: aic94xx
-> Running build hook: [mdadm_udev]
-> Running build hook: [lvm2]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(2/7) Cleaning pacman cache…
==> no candidate packages found for pruning
(3/7) Updating icon theme caches…
(4/7) Updating udev hardware database…
(5/7) Updating system user accounts…
(6/7) Creating temporary files…
(7/7) Arming ConditionNeedsUpdate…
[print ends]