Skip Navigation

Search

How can I make a custom .service run as root?

cross-posted from: https://reddthat.com/post/21668140

> I have a VPN daemon that needs to run before the client will work. Normally, this would have been set up automatically by its install script, but the system is immutable. > > I've created the systemd service via sysyemctl edit --force --full daemon.service with the following parameters: > > > [Unit] > Description=Blah > After=network-online.target > > [Service] > User=root > Group=root > ExecStart=/usr/bin/env /path/to/daemon > > [Install] > WantedBy=multi-user.target > > > I've verified that the daemon is actually executable, and it runs fine when I manually call it via sudo daemon. When I try to run it with sudo systemctl enable --now daemon.service, it exits with error code 126. > > What am I missing?

Edit: Typo, and added the relevant user and group to the Service section. Still throwing a 126.

Solution: the system wanted /usr/bin/env in ExecStart to launch the binary. The .service file above has been edited to show the working solution.

19

Really weird bug with KDE Plasma rendering panels and window decorations

Went away from my computer for a bathroom break. When I came back I noticed it took a very long time to wake up. But that was the least of my worries, as Plasma seems to now be really bugged out:

Two things: Window decorations (like the ones at the top with the buttons to close and such) do not render properly. That's the simple part

The other, weirder one, is harder to explain in text so I made a video -- The short version is that whenever I mouse over any icon in a panel, be it a tray icon or something on the taskbar thingie -- it seems to jump to the top-right corner of that panel. Though only visually (as in, to interact with it, I still have to click the blank space the icon once occupied)

I have also noticed that icons within qt6 windows do not show in the proper place

!

These persisted after reboots.

Other info:

  • Linux/KDE Plasma: OpenSUSE Tumbleweed 20240531
  • KDE Plasma Version: 6.0.5
  • KDE Frameworks Version: 6.2.0
  • Qt Version: 6.7.1
  • Kernel: 6.9.3-1-default (64-bit)
  • Graphics platform: X11

Extra details about system (idk maybe it helps?):

  1. I have an AMD Processor and GPU
  2. All the things I have installed are either from the official SUSE Repos or from Flatpak. There's also some appimages and local executables in my user folder. There is 1(one) application I compiled from source and installed system-wide, and that was Orbiton, a text editor for terminal.
  3. When I update the system I get a notification about how updating glibc-32bit would break Steam. So I marked it as untouchable on YaST. Maybe this broke something else? Idk.

Things I have already tried:

  1. Updating the system
  2. Rebooting
  3. Changing theming configurations back to system defaults (hey, you never know)
  4. Moving widgets around in panels
  5. Disabling fancy effects
  6. Disabling and re-enabling my second monitor/changing which monitor is the primary
  7. Asking nicely

Things I have not tried:

  1. Switching to Wayland (I would do so permanently but it breaks Inkscape for me and that's part of my workflow -- Plus I'm new to SUSE, and the last time I switched from X to Wayland was on EndeavourOS, dunno if the process is any different)
  2. Crying

I have also posted this to the kde bug tracker. Posting it here to in hopes of getting an answer sooner :P

EDIT: I gave it some time to see if it would stick and it did. So. "Going into the Plasma Renderer settings and switching it to OpenGL" was the solution to my issue, even if I have no idea what caused it, I at least seem to have fixed it

8

Should new distro for dual boot be changing my ssd id numbers?

Ok, so I had 1 ssd with Kubuntu and windows on it. I got a second ssd and I want to put opensuse on it, dual booting (well, triple). The problem is, when I went to install it, it showed the id of my two ssds as opposite of what the partition manager in Kubuntu says. I.e., Kubuntu calls the first one nvme0n1 and my new ssd nvme1n1, while the opensuse installer is calling the old ssd nvme1n1 and the new one nvme0n1. I know because it shows the existing partition sizes on them that way, and recognizes that windows and kubuntu are on the old ssd.

So is this normal? Is this ok? Is it ok to just install it with the ssd names this way? Would that confuse kubuntu at all, or are the two OSes ok with calling them different things? I just don't want the installer to overwrite anything on my existing partitions.

7

Why does rsync change behavior in bash script?

I want to sync retroarch save files across devices on my local network using a bash script. Plan is to run the script as a cronjob to keep all machines synced.

This does the trick as a one-off in the terminal: rsync -a /home/localuser/.config/retroarch/states/ [email protected]:/home/remoteuser/.config/retroarch/states/

  • Copies new save files to remote location
  • Updates any save files which were modified

But when I put the same line in a bash script rsync's behavior changes. My bash script looks like this: #!/usr/bin/env bash rsync -a /home/localuser/.config/retroarch/states/ [email protected]:/home/remoteuser/.config/retroarch/states/ I call it with bash sync_saves.sh

  • Copies new save files to remote location
  • Updates any save files which were modified

Strangely, rsync doesn't update modified files when run as a script. But it's not failing altogether, because it transfers new files OK. What am I missing?

> Update: if I do the rsync in the reverse order (remote machine -> local machine) then the bash script works as expected. So my issue exists only when rsync goes local machine -> remote machine. Why would this matter?

Update 2 (Solution): I changed the command to rsync -razu /home/localuser/.config/retroarch/states/ [email protected]:/home/remoteuser/.config/retroarch/states/, but I'm not sure that made any impact. The issue was how I was doing my testing. I was doing touch testfile.txt to change the modification date on a file & then I'd try to transfer it with the bash script & watch the modification date on the downstream machine as confirmation that it moved correctly. Problem is that rsync must be smart & doesn't transfer a file if only the modification date changes. It requires the contents to also change. Whenever I tested this way I would never see the file transfer, but when I changed my testing method to change the contents of the file instead (not just the modification timestamp) then all worked fine!

I feel like a dummy for initially mixing testing methods & coming to the wrong conclusion about what was happening, but happy it's working now & maybe I learned a lesson!

5

Can dual distros share /home?

Briefly: I'm running Kubuntu right now, just installed a second ssd. If I install another distro (say opensuse) on it, can I tell it to use the same /home that kubuntu is using (which is on a separate partition and drive)? Actually looking to switch distros, but I want to keep all my data where it is on the bigger hdd, while moving games to the ssd.

If you want/need more details:

  • ssd1: windows, kubuntu /
  • hdd1: kubuntu (opensuse) /home
  • ssd2: (goal) opensuse /, second partition for games
13

How do I use a Wii remote as a input device? Anyone using a Wii remote as input and if so what's your setup like.

Solution: I bought a dolphin bar. Its not here yet but it should work better.

10

Sddm shows mouse cursor for a few seconds before crashing to a black screen

Rebooted my computer earlier today and walked away while it did its thing. When I got back to to it some minutes later, I saw a black screen with that "_" text cursor flashing on the topleft corner. Which was, of course, odd.

Hitting Ctrl+Alt+F2 sent me to the TTY. Which is to say: The system was still up, and indeed, calling for a process manager loaded showed that sddm was still running, as were a bunch of other processes.

Still, attempts to get sddm to do its thing failed. I tried to systemctl restart the sddm service, I tried to reboot the computer. I tried to delete customizations to its config files in case they were breaking something.

In all of those cases -- Title happened. The mouse cursor would show up for a second or two. And then it'd kick me back to the black screen with text cursor because something was fucked.

I eventually managed to get to my desktop by entirely disabling the sddm service, rebooting so I'd just get the TTY, and then doing dbus-run-session startplasma-wayland to run Plasma manually once logged in (thank FUCK for smartphones and access to internet search on them for helping me figure this out).

So that's a workaround, and it sorta works but I'd like to get my display manager back, please. :P

Further information:

  • I am running EndeavourOS.
  • As implied, I use KDE Plasma under Wayland as my DE.
  • I have an AMD GPU
  • I am at the latest version of every relevant package -- The reboot I mentioned at the start of the thread was just after running a sudo pacman -Syyu
  • I did try to search for my specific issue but nothing relevant came up? A lot of older issues, under X11, and most involving NVidia stuff. None seemed relevant to my case.
  • Having found the workaround I used the computer all night and had no other issues, which to me signals it's something about sddm and ONLY sddm that is broken, whether it's some config that got fucked up or some bs with my own incompetent package management.
  • I am, of course, able to provide logs and stuff if you tell me which ones and where to get them, cuz yeah.
7

Ffmpeg makes choppy videos when recording audio

Well, my issue is simple to explain, but I tried everything to solve it without success.

I like recording gameplays, just for fun. The game I currently make recordings for is not resource heavy (it's Doom 2 through GZDoom). I'm using Lubuntu 22.04.

So, here is the command I've just used:

ffmpeg -f x11grab -draw_mouse 0 -framerate 30 -probesize 42M -video_size 1920x1080 -i :0 -f pulse -i default -c:v libvpx-vp9 -r 30 -g 90 -quality realtime -frame-parallel 1 -qmin 4 -qmax 48 -b:v 4500k -c:a libvorbis prueba.mkv

The issue is, if I record without including the audio, then the video plays smoothly after being recorded. But if I record including the audio, no matter what parameters, codecs, bitrate or anything I use, then the video is barely watchable, with lots of choppiness, and even with delay between audio and video, apparently.

SimpleScreenRecorder works fine, but sometimes there are few frames dropped and I don't like it much. OBS is very heavy for my hardware (Mac Mini 2016, Intel Core i5 1.4 GHz 4260U, Intel HD Graphics 4000, 4 GB RAM).

I also tried VAAPI, with same results as above.

And the thing is that I remember recording some years ago, with no issues at all.

I don't know what to do. Any tip or solution?

8

Is it possible to add smaller icon sizes for GNOME Nautilus?

Hello guys, I have a question about GNOME Nautilus and the sizes of icons in list view. In the included screenshot, you can see the list view of my home folder with lowest icon size. However, the entries are still rather tall compared to other file managers. To reduce the need of scrolling, I would like to reduce the icon size further. Is there any way to do this? Thanks!

Edit: The issue is resolved now. I found out, that padding is too large in the theme I use. The issue was already fixed upstream, only had to apply one commit to fix.

11

How to customize dead keys under Wayland / Electron apps?

EDIT: Solved! Check this comment!

I use a keyboard with an american layout. I find it much better for coding and actually love this keyboard to pieces. However, I still need to write in portuguese.

The dead keys in Microsoft Windows worked perfectly for me but the Linux ones do not. Some characters are not available and are replaced by characters that don't exist in the portuguese language.

In X11 I fixed this by using an .XCompose file with the keybinds just like in Windows. Source here, it works perfectly.

In Wayland, the .XCompose file works for pretty much all apps. Firefox is fine, kitty is fine, Vivaldi is fine. Unfortunately electron apps with the --ozone-platform-hint=wayland ignores the .XCompose file and I get the default keybinds. Since I own an nvidia card I really need these flags, otherwise the electron apps will aggressively flicker and/or eat letters while I'm typing.

I've searched far and wide, there are several open bugs in chromium, electron and wayland repositories. Everyone seems to be pointing fingers at each other for years and no workaround to make .XCompose work seems to be available.

I'm wondering if there is an alternative way to customize the dead keys under Wayland. Thanks in advance.

1

TFTP error: "Only absolute filenames allowed"

Workaround

I'm not sure what was going wrong with what I was doing initially, but, thanks to @[email protected], as suggested, I disabled the tftp server system service, and, instead, started it with the following command: sudo in.tftpd -L /srv/tftp --verbose --permissive -s and it then flashed successfully.

Original Post

I'm trying to flash firmware to a router (Archer C7) using TFTP, but, when the router makes the request for the firmware file over TFTP, the TFTP server responds with the following error Error code: Access violation (2) Error message: Only absolute filenames allowed

---

This is the config for tftpd in /etc/conf.d/tftpd: TFTP_OPTIONS="-s" TFTP_DIRECTORY="/srv/tftp" TFTP_USERNAME="tftp" TFTP_ADDRESS="192.168.0.66:69" I have the firmware file in /srv/tftp, and both the firmware file, and /srv/tftp have chmod 777 permissions.

The TFTP server is running on Archlinux, and is installed as tftp-hpa from the arch repos.

---

If I test as a client, I can get it to download if I specify the full (absolute) path to the file /srv/tftp/filename, so it seems that the config isn't pointing the server to /srv/tftp as the relative path... How would I go about fixing that?

4

How do I go about switching from X11 to Wayland? (also, should I?)

General information:

  • I'm using EndeavourOS, with KDE Plasma. I am very happy with my setup as it is, but since Wayland is "the future" I'm thinking of getting a move on.
  • It came default with just X11, no Wayland. I know KDE supports Wayland but have no idea how to switch.
  • I play a lot of games, I read somewhere that Wayland has worse gaming performance. I don't know if true or not, though.
  • ... I have an AMD GPU. I'm not enough of a masochist to try and use Linux with NVidia.
  • ..... BUT I've been thinking of upgrading to an Intel Arc GPU in the nearish future.

Let me know if there is any, more important, specific info I should be giving.

EDIT: I have changed. ... I felt no difference, but I suppose that is the whole point. Thank you to everyone who answered.

6

Having trouble removing a non-working application from KDE Application Launcher

History:

When trying to adjust the appearance of my KDE Neon setup, I made a mistake and now I can't figure out how to undo it. I was editing the applications in the stock Application Launcher. I can't remember exactly what I did, but I made a second entry to an application (Ferdium) that was already installed and tweaked the "Program:" entry for it. Since then, I haven't been able to use it. I even uninstalled the app, which removed the original application item, but I can't remove the copied version.

Problem:

When I click on it in the KDE Menu Editor, it immediately crashes the editor and suggests that I report a bug. The bug error details read "Executable: kmenuedit PID: 3,152 Signal: Segmentation fault (11) Time: 10/25/23 6:16 PM". I've submitted the bug, but haven't heard anything about it in weeks. I might have submitted it without contact information, and if I try to resubmit it, it appropriately prevents me from submitting the bug again.

When I click on the application entry as if it to open it, I get an error stating, "execvp: No such file or directory".

Any ideas on how I can remove the application from my application menu?

8

/etc/fstab entries being ignored

[Look at comments for solution]

Yeah, can't really explain why either...

#* /dev/nvme0n1p4 LABEL=Gentoo_ROOT UUID=1904b32b-44e0-47c0-9896-f2a72462ba35 / ext4 rw,relatime 0 1

#* /dev/nvme0n1p5 UUID=da7160d5-2c7b-4dee-99a2-f77fd94fd50c /home ext4 rw,relatime 0 2

#* /dev/nvme0n1p6 LABEL=GENTOO_BOOT UUID=3549-4E88 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2

^^Work

#* /dev/sdb3 LABEL=2TB\134x20HDD\134x20P2 UUID=3abcc113-850d-4e7a-88fb-f183907b3b55 /run/media/presi300/2TB\134x5cx20HDD\134x5cx20P2 ext4 auto,rw,relatime 0 2

#* /dev/sdc1 UUID=35bb39b3-650d-45d5-bf13-795edf483ca2 /run/media/presi300/35bb39b3-650d-45d5-bf13-795edf483ca2 ext4 auto,rw,relatime 0 2

#* /dev/sdb1 LABEL=2TBP1 UUID=0c9f4f41-5129-4829-8666-c1c7ee6b0ff0 /run/media/presi300/2TBP1 ext4 auto,rw,relatime 0 2

#* /dev/sda1 LABEL=1TB UUID=199a489b-a592-4546-9b38-8ba1f0365a34 /run/media/presi300/1TB ext4 auto,rw,relatime 0 2

^^Ignored

I've tried changing pretty much everything in /etc/fstab to no effect, another weird thing is that the system can boot without /etc/fstab being present... Though only the ROOT partition gets mounted. Any Ideas? (Ignore the *s, they are so that the # appears instead of lemmy enlarging the text)

6