Spyke

Posts

linuxquestions·Linux QuestionsbyMoLoPoLY

Debian/UnattendedUpgrades: Packages kept back

I've been using unattended upgrades without any problems until now. However, for the second time, I'm encountering an issue where I end up with a summary stating that some packages were not installed or updated. Among other things, it tells me:

Package imagemagick is held back because a related package is held back or due to local apt_preferences(5).

However, when I run sudo apt full-upgrade, everything is up to date and the packages are installed. sudo apt-mark showhold also doesn’t list any packages. So why am I getting the message that packages were held back?

View original on discuss.tchncs.de
16
linuxquestions·Linux QuestionsbyMoLoPoLY

logging levels with systemd

I start a bash shell script via a oneshot unit. I output standard messages currently with

echo $message
echo $message >> $logfile.txt

With this I have output on screen and additionally in a logfile. I don't know if there is a better way to do that.

This works for standard infos fine. Additionally there must be a way to output also error messages and warnings, since when I look into other services, I see red messages for errors and yellow/orange colored messages for warnings.

How can I do such things with my bash script and output other levels like warnings in yellow and errors in red?

View original on discuss.tchncs.de
9
linuxquestions·Linux QuestionsbyMoLoPoLY

Update and restart bash script after updating itself?

I have a bash script, which im using on a handful machines. On all machines, its the same script. Sometimes i need to adjust/update the script. With that, i need to copy the script to all this machines again.

Is there some way to update the script only on one central location and if this is done, the script checks itself, if there is a updated/changed variant on this central location and if so, copy the new version and restart itself after copy?

View original on discuss.tchncs.de
9
darktable·DarktablebyMoLoPoLY

Recommend export settings for Nextcloud albums

For the family album, I’ve been exporting my photos in Darktable to JPEG (8-bit) format at 90% quality. The images are organized into albums online using Nextcloud. But I’m reaching the limits of my available storage space. Typically, each *.jpg export creates a file ranging from about 20MB to 38MB. I haven’t paid much attention to this before, but I now realize that’s a lot. It quickly adds up to a few GB. If I reduce the quality to 85%, the files are just under 25% of the size compared to the 90% quality export. At least on the web, I don’t see any difference at first glance.

Since some family members occasionally create a photo book from the pictures, I’m not sure how the quality will hold up in print. I won’t know for sure until it’s too late. But if I can’t tell the difference at 100% zoom, I’m hoping the print quality will be at least acceptably similar.

According to Google Page Speed Insights, it’s recommended to use WebP with a quality of 80%. The resulting files are now only 20% as large as the 90% JPEG exports. I notice slight differences, especially with smooth color gradients, bokeh, and similar elements. There are subtle variations and color shifts, but hardly any artifacts. If I don’t know the original, it doesn’t stand out. But it does in a direct comparison. I can’t estimate how this will affect the print as a photo book. What I do see, however, is a significantly longer export time.

Question for the community: What would you recommend? Stick with 8-bit JPEG and set the quality to just 85% (or less), or switch to WebP with 80% quality? Maybe you have another or better idea?

BTW: One additional question. Pixel dimensions of the photos are usually huge in my case. I don't scale down the pictures during export, because i don't know how to do that. Some photos are landscape, some portrait, some are cropped, some not. So every photo can have a other resolution. What should i use to have a max resolution of 2560x1440 Pixel and keep the aspect ratio of landscape and portrait and cropped images. I don't want to upscale images, only downscale, when they are bigger as the max resolution. I don't understand the documentation of the setting.

View original on discuss.tchncs.de
4
linuxquestions·Linux QuestionsbyMoLoPoLY

Lost partition table, can i trust the HDD again?

Probably due to a power outage, I suddenly lost access to a connected USB HDD yesterday. According to parted, I get the message “unknown partition table,” and gdisk says the GPT is corrupted. Using testdisk, I was able to copy the files to another drive and restore the partition table and mount the HDD.

Is it possible that the partition table was damaged by the power outage, or does this point to a different problem? Can I safely store data on such an HDD again, or should I replace it?

View original on discuss.tchncs.de
41

Kate and Projects

Until now, I have been using Visual Studio Code to develop my PHP projects. However, I would like to give Kate a try, even though it offers slightly less in terms of overall scope. My PHP projects are usually organized in folders. In VSCode, I can save these as “workspaces” and also save various settings that only apply to that one project/workspace. I couldn't find any workspaces in Kate. I therefore assume that the equivalent is “projects.” Is that correct?

If so, how can I open a specific project? I haven't found a way to save a project under a specific name, so I have no idea how to open an existing project later.

Can someone briefly explain to me how working with projects in Kate is supposed to work?

BTW: I usually edit PHP files in a local directory, but when I save them in VSCode, the changes are also transferred to another computer via SFTP at the same time. Is there a similar option in Kate? I mean, without me having to trigger anything else.

View original on discuss.tchncs.de
19
linuxquestions·Linux QuestionsbyMoLoPoLY

Systemd Timer units

I am trying to create some systemd units that are supposed to start scripts at certain intervals. With Cron, I used an expression like 0 3 */7 * * to start a job every 7 days at 3 a.m. That worked great. With OnCalendar, I have no idea how to implement "every 7 days". Or can I use OnUnitActiveSec here? Additional problem: The computer is not always on at the specified time. The job should therefore be repeated as soon as the computer is available again. I have set Persistent=true for this purpose. However, I suspect that OnUnitActiveSec is reset every time I restart the computer. Or does OnUnitActiveSec refer to the time when the unit was activated with systemctl enabled test.timer?

View original on discuss.tchncs.de
18

Cant use keyboard shortcuts with multiple tabs open in kwrite

Coming from years of using GNOME, so please forgive me, if this is a stupid question.

When I have kwrite open and multiple documents open (one in each tab) and i press usual shortcuts like strg+c, strg+v, strg+s and so on, I get a annoying popup, which tells me that the shortcut has multiple meanings and it can't do what I want. If I have only 1 document open, it works fine.

From my point of view, this looks like a bug. Or do I have to setup something special?

Im using Arch Linux with kwrite 25.12.1

View original on discuss.tchncs.de
10
pixelfed·PixelfedbyMoLoPoLY

Pixelfed Android App

When I add images to my post, they sometimes don't appear in the mobile app on Android. I only see them when I edit the post. It probably has something to do with the size of the image. If I load smaller versions into a post, they are easily loaded. My tests included images in JPG format with a resolution of 6542x4365. File size at about 15MB. I assumed that the images would be automatically reduced before uploading and that EXIF data would be automatically removed. Obviously, this is not so. I was able to download the images in the browser. All Exif data was included, the file was also identical in size.

Is there a setting somewhere that can be automatically adjusted before uploading?

What I also noticed is that there is no way in Android to display the alt text of an image or to enlarge it full screen. Surely the latter is a mistake? Is it?

View original on discuss.tchncs.de
11
archlinux·Arch LinuxbyMoLoPoLY

Howto Install bootloader afterwards?

Coming from Manjaro, I had Manjaro in dual boot with Windows for a few years now. I have now also installed Arch Linux. During the Arch installation, I skipped the part with the boot partition and the bootloader. I have been using the bootloader/grub from Manjaro. That works quite well.

But now I want to switch to a bootloader from Arch. With the Arch bootloader I would like to continue to have the choice between Arch, Manjaro and Windows.

I assume that I have to install a corresponding bootloader for Arch in the EFI parallel to the others. But how should I proceed in detail? I have not yet been able to find any corresponding howtos. Which bootloader would you recommend?

View original on discuss.tchncs.de
11
archlinux·Arch LinuxbyMoLoPoLY

How to start a script after logging in AND WiFi is ready?

I try to download a file with curl directly after logging into Gnome. This usually fails because mostly the WiFi connection is only established after login. If I wait long enough in the login screen before logging in, the connection is already established and the download works.

So far I have used Manjaro. WiFi was already active long before the login screen of GDM was even displayed. The download therefore always worked.

The download is initiated with a *.desktop file in ~/.config/autostart.

Is there another way to start the download after the user is logged in and the WiFi connection is really ready?

View original on discuss.tchncs.de
archlinux·Arch LinuxbyMoLoPoLY

Games no longer start under steam

Since I no longer had an icon for Steam in Gnome, I tried to reinstall Steam via pacman -S steam. That didn't bring me an icon in the Gnome overview either, but that was because I had created a separate *.desktop file in ~/.local/share/applications. I removed this and the icon in the overview came back. But now I have the problem that the games I call up via Steam no longer start. For one game, the launcher starts, but then displays the message “Please start Steam first” (Steam is already running, otherwise I wouldn't be able to start the game). Other games bring up the message that no wine-mono is supposedly installed. But it is installed.

A reinstallation of Steam has not changed anything. What can I do?

View original on discuss.tchncs.de
jerboa·JerboabyMoLoPoLY

Bigger thumbnails?

I have searched the settings in the app, but didn't found such a setting. I want to have bigger thumbnails for posts with images and link previews. Is that available or if not can this be implemented? I have added a screenshot from "Thunder" with exact such bigger thumbnails. Can this be done?

View original on discuss.tchncs.de
5
linuxquestions·Linux QuestionsbyMoLoPoLY

How to find the name for Icon in *.desktop file?

Creating *.desktop files for WIndows/Wine applications, specify sometimes a Icon like this:

[Desktop Entry]
Name=Game to start
Comment=Play this game on Steam
Exec=steam steam://rungameid/738520
Icon=steam_icon_738520
Terminal=false
Type=Application
Categories=Game;

with Icon=steam_icon_738520. Is this extracted from the *.exe file and how do i get the name mentioned here? I know, that i can use the path to a *.png, but i would prefer to use the *.exe file itself.

View original on discuss.tchncs.de
5
raspberrypi·Raspberry PibyMoLoPoLY

ffmpeg Hardware encoding Auflösung

In einem Projekt schiebe ich Video von meinen Kameras in ein Verzeichnis auf den Rasperry Pi4. Ein Cronjob geht dieses Verzeichnis dann durch und konvertiert diese Videos mit ffmpeg. Seit letzter Woche schlägt dies fehl. Folgendes Kommando wird dabei benutzt: ffmpeg -y -i "/tmp/4B9A9487.MP4" -vf format=yuv420p -c:v h264_v4l2m2m -b:v 8M -c:a aac -movflags +faststart "/tmp/4B9A9487_cv.mp4". Für einige Video klapp dies, für andere erhalte ich die Fehlermeldung: [h264_v4l2m2m @ 0x558fae9600] Could not find a valid device.

Das es aber für einige funktioniert, für andere nicht, glaube ich nicht, das dies am fehlenden device liegt. Denn wenn ich die Auflösung des Videos reduziere, funktioniert es durchaus. So klappt folgender Befehl mit den bisher fehlgeschlagenen Videos problemlos: ffmpeg -y -i "/tmp/4B9A9487.MP4" -vf format=yuv420p -c:v h264_v4l2m2m -b:v 8M -s 1280x720 -c:a aac -movflags +faststart "/tmp/4B9A9487_cv.mp4".

Geändert hat sich nur die Angabe der Auflösung mit -s 1280x720. Das Input Video hat hier 3840x2160. Ich vermute daher das der Rasperry Pi hier irgendwo mit 3840x2160 nicht mehr klar kommt und daher abbricht.

Was ist denn die maximale Auflösung die der Rasperry Pi hier unterstützt?

View original on discuss.tchncs.de
5
darktable·DarktablebyMoLoPoLY

Filter in lighttable not working

I use Darktable 5.0.1. I don't know if this is a bug or just a user error on my part. But I can remember that it worked differently in 4.8.x.

When I am in the lighttable module, I can select “rejected only” in the filter. I would now expect to see all rejected images. However, the opposite is the case. I now see all images that have not been rejected. However, if I select “all except rejected”, I see the rejected images.

Why is the filter effect reversed?

View original on discuss.tchncs.de
4
fdroid·F-DroidbyMoLoPoLY

F-Droid and Samsung "Auto Blocker"

On Samsung Phones. there is a function called "Auto Blocker". If this is enabled, this blocks installing apps from unknown sources and via USB and ADB. In principle, this is a useful feature, but it also prevents the installation of updates via F-Droid. Even if F-Droid is classified as trustworthy in general and can therefore theoretically install apps and updates automatically, activating this function prevents automatic updates. If this function is deactivated, new apps and updates are installed automatically on request.

Is there a way to activate this function and still receive automatic updates via F-Droid? Does the installation of the F-Droid.apk via ADB/USB change anything in this constellation?

View original on discuss.tchncs.de
14
linux·LinuxbyMoLoPoLY

Autocomplete custom scripts?

As my time with linux, I created a lot of scripts. Some of them have input parameters and sometimes I just forget this parameters.

So I wonder if there is some way to create autocomplete parameters, like i autocomplete a path by pressing the tab key?

For example a script. ./test.sh can be completed with parameter-one, eg. ./test.sh parameter-one or ./test.sh parameter-two. If i type now ./test.sh followed by tab it should add parameter-one if i press tab again it should change to parameter-two.

How can I do that? I'm on bash…

View original on discuss.tchncs.de
16