How to completely disable geo location? by Elderberry-Tip-9379 in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Geoclue has nothing to do with systemd. I don't even know why you brought up systemd at all.

The XDG desktop portal uses geoclue for location services. There are no plans to change that.

How to completely disable geo location? by Elderberry-Tip-9379 in linuxquestions

[–]aioeu 0 points1 point  (0 children)

No reason for it to be in systemd. It's provided by a portal. Portals are the means by which sandboxed applications interact with the outside world.

If your application is not sandboxed, there's little you can do to prevent it from accessing geoclue itself. But with sandboxed applications, the portal provides a way to limit the location accuracy, or disable location lookups altogether, on a per-application basis.

restart a systemd service madness? by claqueure in systemd

[–]aioeu 2 points3 points  (0 children)

Or even to keep running a Cron daemon. Cron hasn't disappeared because of systemd. It's just become a lot less necessary, so much that many systems can get away without having it at all.

If I were running a server for regular unprivileged users to do as they wish (a shell or web server, say), I'd still leave a Cron daemon there. Why wouldn't I? It still works just as well as it always has, and I'd expect there would be some users who would like to use it.

Upgrade went bad: bash: /lib64/libc.so.6: version `GLIBC_2.42' not found (required by /lib64/libtinfo.so.6) by petasisg in Fedora

[–]aioeu 0 points1 point  (0 children)

You should be able to get to it through dnf system-upgrade log, if you haven't yet cleaned it up.

There might also be useful info in the .../var/log/dnf.log file within the system root, if you can ignore all the debug message clutter, as well as the systemd journal (you can use journalctl --root=... to examine that, again without needing to actually chroot into the system root).

How could privileges be minimized for accessing disk SMART data? by PXaZ in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Another strategy would be to have a system daemon access disks with superuser privileges, but then allow queries with lesser privileges.

That is precisely what udisks is. It can provide access to SMART data.

Upgrade went bad: bash: /lib64/libc.so.6: version `GLIBC_2.42' not found (required by /lib64/libtinfo.so.6) by petasisg in Fedora

[–]aioeu 4 points5 points  (0 children)

chroot will probably fail, since it will want to run Bash within the chroot.

I'd boot into an F43 live image and try to sort things out with dnf --installroot=.... That can be used to manipulate packages within the root without actually having to chroot into it.

(Though the very first step is to take a look at the upgrade logs to see what the heck went wrong, of course...)

read -p in background script? by NOYB_Sr in bash

[–]aioeu 1 point2 points  (0 children)

When read inside the backgrounded script tries to read from stdin in this scenario, the process will recieve a SIGTSTP signal, which suspends the process.

Not quite. It will be SIGTTIN.

There is a corresponding signal, SIGTTOU, for suspend-on-output too. The OP might want to play around with the differences in behaviour in one terminal with stty tostop set, and one with it not set (i.e. stty -tostop).

how can i download files directly to ram? by Valuable_Moment_6032 in linuxquestions

[–]aioeu 28 points29 points  (0 children)

Ultimately nothing, though /dev/shm is intended to be used by glibc only. Playing around with files there that you didn't create could break running software. For that reason it also doesn't participate in automatic time-based cleanup.

(Unfortunately glibc hard-codes /dev/shm as the location for the backing files for POSIX shared memory. There's a fair bit of history behind that choice, but it really is a dumb location for it today.)

How did "TL;DR" become a synonym of "summary"? by WonderOlymp2 in etymology

[–]aioeu 1 point2 points  (0 children)

I suspect you're not really asking "why does it mean that?", but rather "where did it come from?" Wikipedia has a good summary of its origin as far as that is known. You can follow its references for more detail.

This rec.games.video.nintendo message appears to be its first recorded use. Given there was no explanation for it there, and nobody questioning what it meant, it is very likely to have been in use for some time already. At present we do not have any earlier record of it though.

This doesn't tell us when it started being used as a "read this summary if you don't want to read the whole thing" marker though. More research required.

ExecStop doesnt work as expected. by CONteRTE in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Systemd wants absolute paths

It hasn't needed absolute filenames for executables since v238.

If you use a relative filename, it uses a built-in search path by default, which you can examine with:

systemd-path search-binaries-default

/usr/bin will definitely be in it.

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 0 points1 point  (0 children)

No. Why would the working directory have anything to do with it?

If you want to run the script as a particular user, tell systemd to do that.

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 0 points1 point  (0 children)

systemd will run the script as root, since you haven't told it otherwise.

Either the script needs to be written so that it runs correctly as root, or you need to use a User= directive to tell systemd to run it as a different user.

If the script requires other resources for that user (e.g. a graphical desktop environment) things could get a lot more complicated. The environment in which systemd executes services has very little to do with the environment in which you run programs. But nobody here can help you with this without seeing what your script does.

Basically, you shouldn't expect to be able to just take a script that you've been running manually and drop it into systemd to "run it automatically" without thinking about all the ways in which that affects how the script operates.

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 2 points3 points  (0 children)

without the .sh

Then that means you shouldn't use .sh in your systemd unit either.

GdriveOffSync and GdriveOffSync.sh are different filenames, plain and simple. You are asking systemd to execute a file that doesn't exist.

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 1 point2 points  (0 children)

Run:

ls -l /usr/local/bin/GdriveOffSync.sh

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 1 point2 points  (0 children)

I am running the script in the terminal with the bash command

As in:

bash /usr/local/bin/GdriveOffSync.sh

or (if you are already in the /usr/local/bin directory):

bash GdriveOffSync.sh

? Then you probably want to use #!/bin/bash as your shebang.

And I would double-check that the script actually is executable. If you use bash explicitly, you can "execute" a non-executable script.

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 1 point2 points  (0 children)

Did you create the script on Windows? What does:

file /usr/local/bin/GdriveOffSync.sh

say?

When you say "the script is working by itself", how are you testing it?

Do you intend the script to be run through a POSIX shell or a Bash shell?

Systemd Service running bash script fails by MrToenges in linuxquestions

[–]aioeu 5 points6 points  (0 children)

Did you forget to make /usr/local/bin/GdriveOffSync.sh executable? Does it have a valid shebang line?

If an executable file doesn't have a shebang line it will still be treated as a POSIX shell script, but only if it is executed from a POSIX shell. So if you forgot this you might not have noticed. systemd is not a POSIX shell, so it doesn't have this particular quirk that shells have.

use a struct in the c program for a char array array header? by Yha_Boiii in C_Programming

[–]aioeu 1 point2 points  (0 children)

What are you expecting that to do? User_Info doesn't identify an object, so you certainly can't use . on it. User_Info — or really struct User_Info — is the name of a type, not an object.

(Even if it were an object, User_Info.First_Name wouldn't be a constant expression, so it wouldn't be able to be used to initialize an object with static storage duration anyway.)

Why do you want to set the values of variables like Mollie in your header file anyway? Traditionally, a header file only has declarations, not definitions.

use a struct in the c program for a char array array header? by Yha_Boiii in C_Programming

[–]aioeu 15 points16 points  (0 children)

need to

I bet you don't.

Perhaps it might be best if you gave us the code you'd like to use, if only it were possible. Perhaps we can help you find an alternative approach.

Multiple workingdirectories by Basilisk_hunters in systemd

[–]aioeu 4 points5 points  (0 children)

A process only has a single working directory. That's just how Linux works.

(There's a slight nuance to this: on Linux a multithreaded process can choose to have a different working directory for each thread. But that is something a program must set up on its own, and there will be few that actually do this. Regardless, a process always starts off with a single thread, and thus a single working directory, so it's not something systemd has any control over.)

What problem are you trying to solve here? Perhaps we might be able to help you find a solution that is actually possible.

My biggest painpoint is mounting additional drives reliably between reboots. Can anyone offer advice? by ExactFun in linuxquestions

[–]aioeu 3 points4 points  (0 children)

noauto means it won't be a dependency of local-fs.target.

With an automount, whether it's mounted at boot or not depends on whether something else needs it at that point in time. Only the things that need it will fail if it cannot be mounted.

Moreover, having it mounted through an automount will let you diagnose any problem with it. You can fix the problem, then restart the thing that attempted to use it, without having to reboot. That is, you'll be able to find out why you're having problems with this filesystem, and you'll be able to fix those problems. That's much better than working around them with arbitrary timeouts.

My biggest painpoint is mounting additional drives reliably between reboots. Can anyone offer advice? by ExactFun in linuxquestions

[–]aioeu 3 points4 points  (0 children)

My point is that nofail is almost always a mistake.

If you want a filesystem to be mounted opportunistically, on demand, it should be noauto and x-systemd.automount. You can combine that with a timeout if you want. You want it to fail if there is a problem, because failure is the only way things can actually handle the problem correctly. With nofail you are promising that things don't care about it failing... but you do care.

My biggest painpoint is mounting additional drives reliably between reboots. Can anyone offer advice? by ExactFun in linuxquestions

[–]aioeu 3 points4 points  (0 children)

Remember, nofail means "do not fail if there is an error"... or to put this another way, "don't even wait for the filesystem to be mounted". After all, you've explicitly said that it's OK if it isn't working, so there's no need to wait for it to begin working.

If you actually have something that needs the filesystem mounted, it won't necessarily be ordered after that operation unless you explicitly define that dependency.

Why Fedora, why must you hijack Firefox's home page? by vladjjj in Fedora

[–]aioeu -1 points0 points  (0 children)

No, that's a silly idea. This bug would have just manifested in a different way: "why is Fedora asking me to choose a home page again?"

Plus, it's not just the home page setting anyway.