Alternative to Cron

For Linux systems what is a good alternative to cron?

ANSWER

(1) systemd

A lot of Linux distros are already using systemd. I’d say the major ones have been on systemd for a long time. It is capable of scheduling tasks just like cron, and has other features such as setting CPU/memory limit, randomized schedules to name a few. I haven’t used it yet. But I’ve seen some and creating a task is very different from what you may be used to with your traditional cron. It’s verbose. The good thing is there’s a lot of examples and documentation about it, plus it is built-in to your Linux system already.

(2) jobber

There’s an alternative to cron that I like to use called jobber. You can find it here: https://dshearer.github.io/jobber/

Quoting from the jobber website:

Jobber is a utility for Unix-like systems that can run arbitrary commands, or “jobs”, according to a schedule. It is meant to be a better alternative to the classic Unix utility cron

I’ve used jobber several times in little projects and some even in production. It is pretty robust and stable. As with anything new, using it requires some reading. The time format to schedule a task, or job, in jobber is not at all different from cron. It has other features such as error handling and reporting, as well as execution history.

jobber tasks are defined in a YAML file. That file can be placed in a user’s home directory. It’s not so hard to create a task for jobber. Their site has a good documentation found here: https://dshearer.github.io/jobber/doc/v1.4/#

There are pre-packaged binaries officially available to download for Debian/Ubuntu, and Red Hat. Or check your Linux distro’s application repository if it’s there. If not you could always compile it yourself. The last time I used this tool I also compiled it on the server. Easy to do that, and is explained also at their website.

What Password Managers available in Linux

List of Password Managers that are available in Linux?

Aside from BitWarden. I want to know some alternatives you guys are using. Prefer it’s standalone program instead of browser plugin or extensions.

ANSWER

I am using KeePassXC personally for some time. 1Password for work-related stuffs.

The first one is a KeePass variant and open-source. It has a Qt-based application that has been available for Linux for a while. Then, 1Password support in Linux was in beta since last year. Recently it has been moved out of beta.

Others I know off the top of my head,

  • AuthPass
  • Password Safe (for Gnome DE)
  • KeePassX (where KeePassXC was forked)

How to fix error: snap “telegram-desktop” has “install-snap” change in progress

I enconter this error message when installing a Snap app Telegram for Desktop from the terminal command line. I followed instructions on how to do this from the Install button of the snapcraft.io website.

First one I select is use the GUI app store. But nothing happens when click install button. Installing progress starts but go back to install. Click again and same thing is happens.

When using the command line that is I got the error of:

error: snap "telegram-desktop" has "install-snap" change in progress

How to fix?

ANSWER

The error is because you are telling Snap to install an app that has already been scheduled for installation. It’s in the queue. The GUI app store is not very informative about this scenario. Hence, it will seem like the installation process failed when in fact that is not the case.

My guess is it is put on schedule for installation because a higher priority install needs to be done first, most likely Snap core updates that have not yet been applied to the system yet.

Either wait for the core updates to finish and wait for Telegram to get installed after, or force it to update right away.

At the command line, do:

:~$ snap changes

It will show something such as:

ID Status Spawn Ready Summary
101 Done yesterday at 20:33 PST yesterday at 20:34 PST Auto-refresh snap "intellij-idea-community"
102 Doing today at 11:36 PST - Install "slack" snap

Abort the scheduled install for the app listed there, in your case “telegram-desktop” snap using the following command:

:~$ sudo snap abort 102

In the example above, I chose to abort install scheduled with ID 102. Choose the ID of the app you are trying to install that you will see on your terminal after the command above.

Then install the snap app manually:

:~$ sudo snap install telegram-desktop

This should force snap to go ahead with the install, but first it may start with its core updates, followed by the telegram-desktop snap app.

Change default app to open torrent magnet link

I installed a Popcorn-time desktop software on my Ubuntu linux to try that out. It appears to use a torrent technology to stream content as it downloads at the same time. Somehow that now gets the default to open magnet links for torrent files. Have not remembered any setting asking me to make the app open by default during installation or at download.

I don’t want this, don’t know how to change to my default torrent software – Transmission BitTorrent.

How to change back?

ANSWER

Add/edit it into the following files. Either or both is fine, but better to have it in for the system-wide list if you have multiple users.

  • System-wide: /usr/share/applications/defaults.list
  • User-specific: ~/.local/share/applications/mimeapps.list

The value of this entry – x-scheme-handler/magnet – needs to be set to the application you prefer.

For example, since you want it to be Transmission it will be similar as shown below:


x-scheme-handler/magnet=transmission-gtk.desktop

Just make sure the .desktop file for the desired application is correct. Again you can check for that file in the same directory where this list is found.

As an alternative, the following terminal commands will also help.

Find out what is the existing default app that will handle such mime-type for your existing user:

:~$ xdg-mime query default x-scheme-handler/magnet

Replace that by using the next command:

:-$ xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet

Lastly, you can check again if the last command was successful by running the first one.

There any free, lightweight app to merge PDF files as one?

As the name of the title in this post says it all. Okay, maybe not all it says because I want it on Linux desktop.

Looking for a tool that can combine different PDF into one big PDF file. I don’t need to modify the content of the PDFs. All important is merging them together as a group.

Sorting it probably comes as second important feature. But I can get on without that as long as it stays in sequence however I added each PDF file.

Lastly simple. No over the top effects. Prefer GUI app. Open to command line.

ANSWER

For that purpose, I have personally used PDF-Shuffler, It is a GUI desktop application on Linux. I used it back then on Ubuntu, but it should be available in all other major distros. Google for it. I know it is included in the official package management repositories of Ubuntu.

PDF-Shuffler can collate, sort (through drag and drop) and rotate the PDF files individually. As an added bonus, it can crop PDFs too.

It is a straightforward app. Stable for all those times I’ve used. But my usage is fairly moderate only.

I also suggest using pdftk for command line if you fancy that kind of stuff. You can combine PDFs into one as simple as:

:~$ pdftk file-1.pdf file-2.df file-3.pdf output my-merged.pdf

This tool can do other stuff. You can read its manual for more information. Google about pdftk too for more examples.

Support for Ubuntu Unity Desktop after 16.04 LTS

Can still use the Unity Desktop after Ubuntu 16.04 Xenial Xerus? Is it still supported?

I like the Unity desktop way of things. Been using it many years now. Read about and tried the new Ubuntu that with Gnome Shell, but I don’t like it much at all. It look clunky with many of missing things from it.

Come April 2021 Ubuntu 16.04 will EOL. Starting to find alternatives, but if Unity is still out there, I’d pick it over the others.

ANSWER

In one word, Yes.

Still can run on both LTS versions of 18.04 and 20.04. Go ahead and install it with:

sudo apt install ubuntu-unity-desktop

Choose Lightdm display manager when asked during install. Best to restart your computer afterwards. Then enjoy.

Consider that many people have said some weird looks of Unity when installed on said LTS versions appear. I forget, but I think its the window decorations and such. This is supposedly caused by the newer Gnome versions, and unpatched by Ubuntu. Unlike before.

You may also like to try out an alternative in the Ubuntu Unity Desktop spinoff. Can be found at this website – https://ubuntuunity.org/

It is not official Ubuntu flavor, but being maintained by some other 3rd party group. The experience is different from just installing 20.04 and then install Unity DE afterwards. Try it out if it suits you.

cant restore nuget packege on ubuntu after upgrae to .net core 3.1

i am running .net core 2.1 on Ubuntu 18.04 so far so good

i upgrade my project to .net core 3.1 and installed the 3.1 SDK

since than i cant use ‘dotnet restore’

this is the full output

/usr/share/dotnet/sdk/3.1.401/NuGet.targets(128,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/repos/myproj/portal/PortalApi/PortalApi.csproj]
/usr/share/dotnet/sdk/3.1.401/NuGet.targets(128,5): error :   The SSL connection could not be established, see inner exception. [/repos/myproj/portal/PortalApi/PortalApi.csproj]
/usr/share/dotnet/sdk/3.1.401/NuGet.targets(128,5): error :   The remote certificate is invalid according to the validation procedure. [/repos/myproj/portal/PortalApi/PortalApi.csproj]

any idea why ?

thanks

Go to Source
Author: David Munsa

/etc/passwd.org, /etc/group.org, /etc/shadow.org files

On a Debian 10 server, which started as Debian 7 and updated whenever new version came out, I accidentally found these three files:

/etc/passwd.org, /etc/group.org, /etc/shadow.org

The backup files /etc/passwd-, /etc/group-, /etc/shadow- and other *- files are present, as they should.

For example, all passwd files are (same applies for the other two):

$ ll /etc/passwd*
-rw-r--r-- 1 root root 2,1K Αυγ  13 14:08 /etc/passwd
-rw-r--r-- 1 root root 2,1K Αυγ  13 14:06 /etc/passwd-
-rw-r--r-- 1 root root 2,0K Ιουν 20  2015 /etc/passwd.org

Their last access time is somewhere in 2015. Their contents are on par with /etc/passwd, /etc/group, /etc/shadow, as they probably were some time in the past – I can see some deleted users. I cannot find any info of such *org files. Does anybody has any idea what are there *org files and what is their use?

Go to Source
Author: Krackout

Failing ZFS Raid-Z2, need to build new pool but lack a SAS port. Can I disconnect one drive from Raid-Z2?

I have a Raid-Z2 pool with 6 * 4TB drives. All the drives have a bit over 40 000 hours running time. Now they all seem to be degrading at the same time. The pool is degraded, and all drives are marked as degraded with to many errors. But luckily no lost data at the moment.

        NAME        STATE     READ WRITE CKSUM
        File        DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     DEGRADED     0     0     0  too many errors
            sdb     DEGRADED     0     0     0  too many errors
            sdc     DEGRADED     0     0     0  too many errors
            sdd     DEGRADED     0     0     0  too many errors
            sde     DEGRADED     0     0     0  too many errors
            sdf     DEGRADED     0     0     0  too many errors

I would like to build a new pool with Raid-Z1 and 3 * 6TB drives as I don’t need all the space as in the original pool. My problem is that the old pool has 6 drives and my pool will have 3, but my SAS controller only has 8 ports. So I would like to disconnect one disk from my Raid-Z2 pool, connect my 3 new drives and create a new pool with them and then save my data by copying to the new pool before the old pool fails.

Is that possible? My thinking is that the old pool should work with one disk missing. But when I tried disconnecting a disk I’m unable to access any data in the old pool.

Anyone know how to solve this?

Go to Source
Author: Northern Brewer

How to Fix Gradle Wrapper Permission Denied Error

I am getting this “gradlew permission denied” error after pushing my code to my GitLab repository. The build is not able to continue because the gradle wrapper is not able to run.

What is causing this and how to fix it?

ANSWER

From a local terminal/command line, use the Git command that follows to fix this issue:

git update-index --chmod=+x gradlew

Continue to commit the modifications to the gradlew file.

Push the changes to your Git repository.

You can read more at this page: https://www.joseyamut.xyz/2020/08/15/fix-gradlew-permission-denied-on-openshift-deploy/

Reference request for permissions needed by linux commands

Good day,

I want to ask if there is a comprehensive reference for permissions needed by each linux command and on which directores (ex : source/target) to do its primary role … something like a list, I wasn’t successful to find that in the manual but if it exists , please help me know in what part it resides in the manual

I am preparing a summary of that during my self study thats why am asking so if any one could help me it will be appreciated
Thanks

Go to Source
Author: AbdAllah Talaat

Can security modules completely override Linux Kernel’s access model?

I am aware of Apparmor and specifically how it can be used to limit a program’s access rights where of the file-system permissions otherwise allow. What I’m less clear on is whether it’s possible for Apparmor or any similar security module to completely override a program’s access rights. Can they grant a program access to read/write/execute files that the user otherwise has no access to.

I’m asking for what the Linux Kernel will allow such a security module to do, not what existing security modules can be configured to do.

Can security modules completely override Linux Kernel’s access model?

Go to Source
Author: Philip Couling

How to show Snap app icon properly on Ubuntu Unity desktop

Had this issue where after I logged into my Ubuntu desktop all Snap apps icons do not show properly. Instead I see a plain icon in place of what the app icon should be. Have you the same experience?

This might have been fixed in later Ubuntu LTS releases, I really don’t know. But I am still on 16.04 Xenial Xerus until its EOL. Also, the reason is that I love the Unity Desktop. The Gnome Shell replacement just doesn’t cut it for me.

I have been looking for a solution on this issue for some time. The 2 main things people point out are:

– Add /snap/bin to the /etc/environment file, and;

– Something to do with the profile.

Neither of those solutions worked for me. But it did work for others according to what I have read so far.

ANSWER

To fix this icon issue, create a symlink of the Snap’s .desktop shortcut file to your user’s .local/share/applications directory.

It is as simple as that. Once done the problem will go away, and you will be left with a nice-looking icon that came with the Snap installation. This won’t go away on following restarts.

For more details on how to do this fix exactly, refer to this article – https://www.joseyamut.xyz/2020/08/13/getting-that-ubuntu-snap-icon-right-on-unity-shell/

GNU Date: inconsistency calculating number of days between dates

I am trying to calculate the number of days between two dates like this:

$ echo $((($(date +%s -d 2016/11/22)-$(date +%s -d 2016/11/20))/(3600*24))) days
2 days

That is the expected answer and perfectly consistent with this:

$ date -d '2016/11/22 - 2 days'
Sun Nov 20 00:00:00 CET 2016

However, these two seem to be inconsistent:

$ echo $((($(date +%s -d 2020/06/28)-$(date +%s -d 2016/11/20))/(3600*24))) days
1315 days

$ date -d '2020/06/28 - 1315 days'
Mon Nov 21 00:00:00 CET 2016

Am I missing something? Why don’t I get 1316 days (instead of 1315) in the third command I used?

I have done a few more tests changing the month in the date 2020/06/28. It seems that up to March I get the expected answer (i.e., I get Nov 20 in the fourth command), but from April on the inconsistency is present (i.e., I get Nov 21 in the fourth command). Any hints?

Go to Source
Author: orelleiro

Arch Linux – Boot stucked after installing SDDM on amd laptop

newbie here, after installing SDDM booting is stuck at: Starting version 245.7-1-arch.When i boot without quiet parameter it’s stuck on Finished| Load/Save random seed.

When i boot with loglevel=7 no errors show after Load/Save random seed line.

I tried – reinstalling sddm, plasma. Installing rng-tools, haveged

UPDATE: Running sddm-greeter returns: GREETER: Could not load the Qt platform plugin “xcb” in “” even though it was found

Go to Source
Author: Lukáš Starinský