Skip Navigation
Lemmy updated to v0.19.5
  • I made this userscript to put the vote count in comments back beside the vote button because the new one is kind of hard to see, its not the prettiest script (idk much about javascript), but I've tested it in Librewolf with Violentmonkey and it does work, hope it helps someone else!

    // ==UserScript==
    // @name        New script blahaj.zone
    // @namespace   Violentmonkey Scripts
    // @match       https://lemmy.blahaj.zone/post/*
    // @grant       none
    // @version     1.0
    // @author      -
    // @description 8/24/2024, 3:32:47 PM
    // @run-at      document-idle
    // ==/UserScript==
    
    function main ()
    {
    	var parent_comments = document.getElementsByClassName("comment list-unstyled"); 
    	for (var i = 0; i < parent_comments.length; /*i++*/)
    	{
    		/*console.log(i);*/
    		var comments = parent_comments[i].getElementsByTagName("article");
    		for (var j = 0; j < comments.length; j++)
    		{
    			var upvote_button = comments[j].getElementsByTagName("button")[1];
    			
    			if (upvote_button.attributes["vote_count_patched"] != null)
    			{
    				i++;
    				continue;
    			}
    			
    			var post_votes = upvote_button.attributes[2].textContent.split(' ')[0];
    			upvote_button.append(' ' + String(post_votes));
    			upvote_button.attributes["vote_count_patched"] = true;
    			i++;
    		}
    	}
    }
    /*var mutation = null;
    var mutation_observer = new MutationObserver(function(m) { mutation = m; console.log("new mutation logged yo");} );
    mutation_observer.observe(document, { childList: true, subtree: true }); */
    
    var mutation_observer = new MutationObserver(main);
    mutation_observer.observe(document, { childList: true, subtree: true});
    
    main();
    
  • It's not much, but I've made my first working Gentoo install!

    It took about 23 hours to get it booted under its own power using a binary kernel. And on the 4th day (today) I've managed to get a custom kernel working. Gentoo has been very fun to use and to customize, and it's very fast and responsive, even on my old hardware and with a hard disk, browsing heavy webpages with Librewolf is no problem at all. I've been sleeping on Gentoo for WAY to long.

    4
    Nvidia to AMD
  • Ive only had to setup a nvidia system once, so I might be missing some packages, but I think pacman -Rns nvidia nvidia-utils lib32-nvidia-utils should get rid of all of it.

  • Deleted
    Is it possible to erase the UEFI using dd or rm -rf on Linux ?
  • WARNING: doing this will absolutely DESTROY YOUR SYSTEM, PERMANENTLY!!!

    But if you wish to continue, you can erase all the EFI variables using the rm utility, I dont think you will be able to completely zero out the chip on the system from inside of Linux as its read-only.

    But to delete all the EFI variables, cd into /sys/firmware/efi/efivars, if this directory is not availiable, either the efivarfs is not mounted, or you are booted in legacy BIOS mode. But once you are in this directory, run chattr -i ./* as root or sudo to remove the immutable bit on all the files, then run rm ./* as root. This WILL break your system. Only do this if you know how to restore your system using like a chip programmer.

  • Cannot use system tray widget Plasma 6
  • This happened to me too. I had to grab the box that comes up and resize it like I would with a normal window, mine glitched a lot when I tried it, try resizing it as far as you can, it will try and glitch back, but just keep fighting it until it becomes a usable size, then log out of Plasma and log back in, and then you can size it back down to a normal size. Hopefully there will be an official fix for this soon

  • small script help, action each file in a folder
  • What about something like this:

    for i in /media/johann/5461-000B/DCIM/100MEDIA/*.AVI; do newpath="$HOME/Public/240321/$(basename "$i" | sed 's/^IMAG/240321_/g')"; ffmpeg -i "$i" -ss 00:00:00 -t 00:00:20 "$newpath" && rm "$i"; done
    
  • Deleted
    *Permanently Deleted*
  • If its just / owned by the mint user, you should just able to run chown root:root / as root/sudo, dont use -R. This should make root become the owner of /. Now if all files and directories in the partition are owned by the mint user, this might be a bigger problem

  • removed my mint partition from my kde-neon system and now grub won't boot :-{
  • Alright, could you see what the root variable is in the grub console before manually setting it by running echo $root, and if it prints anything, could you run ls / in the grub console and see if you see like home dev etc, or the directories you would expect to see in / inside linux, and if you do see anything, could you run ls /boot/grub/ and see if you see grub.cfg. But if you are already inside linux, go ahead and install grub with --removable, it wont overwrite your current installation. I dont want you to format the efi partition, incase something goes wrong and you wont be able to boot into linux at all

  • removed my mint partition from my kde-neon system and now grub won't boot :-{
  • I think anything that can be done with a fresh format can be done with the current one, when you ran grub-install after the issue with not running it as root, did you only do it with --removable? If so, the old grub is might be getting picked over the new grub installed at the removable fallback path, because it has a proper entry in the boot order. I dont know what key it is on your system, but if you can get into the boot order menu where it shows all the different boot devices, like where you can pick where you want to boot from, id look for one that just says something like "UEFI boot " or something like along those lines, it wont say like grub or your distro name, if there is such an option available, could you try booting from that option?

  • removed my mint partition from my kde-neon system and now grub won't boot :-{
  • Oh its no worries, it sounds like you just need to regenerate the grub config, you can do this by running

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    

    or if your distro has it, you can just run

    sudo update-grub
    

    then grub should see the config on boot and put you in the normal graphical menu

  • removed my mint partition from my kde-neon system and now grub won't boot :-{
  • This is definitely strange, but the EFI system partition will have to be mounted to install grub to it, maybe the disk got mounted as read only, could you try explicitly mounting it as rw with this command

    sudo mount /dev/nvme0n1p1 /boot/efi -o rw
    

    and then see if you can make a file as root by doing

    sudo touch /boot/efi/test
    

    if it doesnt fail on a permissions error, try installing grub again with --removable incase this error has something to do with it trying to tell the firmware what disk to look in like this

    sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable
    

    hopefully this will run without error and install grub, and if it does id run it again without the removable flag

  • removed my mint partition from my kde-neon system and now grub won't boot :-{
  • As long as the kde neon partition is still there, recovery should be possible. You will need a way to boot into a linux environment like a installation media of just about any distro, where you will be able to mount your kde neon install, chroot in, and reinstall grub. Now I dont know your system or how you have it setup, but I can try and give some basic instructions.

    So first things first, you are gonna want to get into a linux environment and open a terminal and start a root shell, this may be different depending on your environment, but its pretty much just:

    sudo bash
    

    or

    su -l root
    

    now if either of these ask you for a password, and its not presented somewhere, you may have to search on the internet for like installation disk default password, but hopefully sudo is just setup to run without one.

    Now that you are in the root shell, you need to find the name of the block device that corresponds with your kde neon partition, the lsblk utility can be used to list all detected block devices, you are gonna want to find the one with the same size as your kde neon partition, this will likely be the one. Now if your partition has a label on it, you can use ls to look into the /dev/disk/by-label/ directory and see if you see your partitions label there, if so, you can just mount it like this:

    mount /dev/disk/by-label/example-label /mnt
    

    If the /dev/disk/by-label/ directory does not exist, it just means that none of the partitions are labeled. If you are having trouble determining what partition has your data, you can try mounting each one and looking inside, and unmounting them if it doesnt have your kde neon install like this:

    mount /dev/sda1 /mnt
    ls /mnt
    umount /mnt
    

    sda1 is just an example here, it may be different on your system.

    Now when you have found the partition that has your kde neon install and mounted it to /mnt, you can now cd in and bind mount the special directories like this:

    cd /mnt
    mount -t proc /proc proc/
    mount -t sysfs /sys sys/
    mount --rbind /dev dev/
    

    now if you are booting using UEFI, you will have to bind mount the efivars directory with this command:

    mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars/
    

    Now with everything mounted, you should be ready to chroot in and reinstall grub, you can chroot with this command:

    chroot /mnt /bin/bash
    

    Now that you are in your kde neon install, you can reinstall grub, the installation process may vary depending on if you are booting legacy BIOS or UEFI, to install grub on bios, you would run:

    grub-install --target=i386-pc /dev/sda
    

    now /dev/sda is just an example here, but you want to install it to the main disk, dont install it to a partition like sda1 or something.

    But if you are on efi, there may be an extra mount involved, the EFI system partition, now if the EFI system partition gets mounted automatically in normal circumstances, you should be able to just run:

    mount -a
    

    this command will mount the partitions listed in the /etc/fstab file. If the partition was destroyed, it will have to be recreated. If it is not listed in the fstab and is not automatically mounted, you may have to seek it out manually with lsblk, it should be the smallest partition, use the mount command to mount it to /boot/efi, creating this directory if it does not already exist. If you have to create one, just make a partition with at least 16 megs of space, and format it as a FAT partition, you can use the mkfs.msdos or mkfs.fat command line utilities like this:

    mkfs.msdos /dev/sda2
    

    where /dev/sda2 is the free space that is gonna be used for the system partition, this command is destructive, and will overwrite any data on the partition, so make sure you enter the one with just free space.

    Once you know what partition is your efi system partition, and you have mounted it to /boot/efi in the chroot, you can now install the UEFI version of grub, you can use this command

    grub-install --target=x86_64-efi --efi-directory=/boot/efi
    

    and for good measure/backup incase grub cant tell your firmware where it is located, you can install it to the removable media path where your firmware will look if it doesnt have any entries with this command:

    grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable
    

    And finally, once you have installed grub for either UEFI or BIOS, you can generate the config file, like this:

    grub-mkconfig -o /boot/grub/grub.cfg
    

    Now you can reboot using the reboot command like this:

    reboot
    

    it should take care of unmounting everything for you, make sure you remove whatever installation media if you are using any from your system. And hopefully it should just boot into the normal grub menu and start your kde neon install.

  • How to reset downloads on AAAD?
  • I was thinking about that too, I cant think of much this ID is good for other than fingerprinting users. It just sucks that there isnt much of anything that can be done about it without a rooted device or privacy rom.

  • How to reset downloads on AAAD?
  • I did a internet search on "AAAD" and I found this github repository. I'm not sure if it is the same, but they seem to serve the same purpose and share the same name. I took a look into the code and I saw something about Settings.Secure.ANDROID_ID in AboutPaymentActivity.kt, so I did some searching on that, and according to a person on stackoverflow, Settings.Secure.ANDROID_ID is a ID unique to every app on your phone, this ID will persist across uninstalls and reinstalls. The only reason it should change is if the package name or signing key changes. Also it should be different for different users on the phone, but im guessing it might not be possible to add more users on android auto, im not sure, I've never really used one.

    Now, about circumventing it, you could modify the source code and remove the license verification checks and rebuild, but this might not be legal, I'm not to good with legal stuff, but the license had a few words that suggest it might be non-free, but if software licenses arent an issue, feel free! There is also the option of just resigning the apk with your own key, which should change the ID, I believe you can do this in luckypatcher with one click, but lucky patcher is kind of sketchy and might not be able to work on android auto, I dont know much about them.

    I hope this helps, im sorry I couldnt find any like anything that could just reset it and be done with it, maybe someone else might chime in with a more helpful answer.

  • SOLVED: Is there a way to enable the systemctl switch-root command after initrd.target in systemd version 255? (Arch Linux)

    Ive been tryna figure this out all day, Ive read the manual for systemctl and I didnt see anything about switch-root after the initrd target. I did see a --force option, however it didnt do anything. Before the upgrade to version 255, I would use a script or manually mount the partition, and then I would just do like systemctl switch-root /mnt and it would just switch to the other system in an instant as if I booted it normally. But ever since this update it just prints Not in initrd, refusing switch-root operation. and does nothing.

    Is there a configuration file I can edit to allow switch-root after the initrd? Or is it like hard-coded and systemd would need patching and recompiling to allow for this? If so is there a way to just trick systemd into thinking its in the initrd and just let me switch-root?

    I was dissappointed when I found out I couldnt just switch-root anymore. Any help, ideas, or suggestions will be much appreciated, thank you!

    EDIT: To switch root in the new versions of systemd, you will have to mount the filesystem you want to switch root into to /run/nextroot and run systemctl soft-reboot, and it will switch into the root just like before.

    2
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)12
    12510198 @lemmy.blahaj.zone
    Posts 2
    Comments 28