My brain was not functioning properly. I realized later in the night that I could have grepped the file and piped it into awk. Actually, I could make all that a one-liner that executes sed.
But my method is very brute-forced. Again, it could be way more efficient, but when you want something done once or twice on a small file, couple kilobytes, it should be fine. But given its very brute-force approach, it is almost guaranteed it won’t replace anything wrong.
In the meantime I realized such a complicated mess was not even needed, all you have to do is use sed to match the beginning of the line with a number, then replace the beginning with an _:
Now, reading jlittle’s comment, it seems we thought of a similar thing in a slightly different way. I just search for the beginning of a line with a number and insert _ at the beginning, while he replaces anything that beginning with a number with _[the same line].
This isn’t really a Linux question, I know, but I don’t want to create an entirely new thread for it and it is related to Linux. I followed Lawrence System’s Wireguard tutorial for setting up Wireguard on my PFSense box, but I am not quite getting what I want. Does anyone know how or know of a good tutorial on how I can use Wireguard to access devices on my LAN remotely? Or perhaps I don’t use Wireguard, but some other technology.
Edit: When I created the container, I had left the “unprivileged container” option checked. I recreated the container and have logged in with user: root and the password I created as expected.
I am sure that there is a simple solution, but I am currently beating my head against the wall.
On Proxmox (current and operational for months) I am attempting to install the Omada Controller software in an LXC container. (ubuntu-20.04-standard_20.04-1_amd64.tar.gz) It creates the container without any problems, but responds with “Login incorrect” no matter the credentials.
From the information that I have found, Proxmox LXC containers should have user: root and password: whatever you entered during the creation. I have tried root, Root, ubuntu, Ubuntu, admin, omada, Omada in endless combinations of the password I created, ubuntu, root, toor, blank, et cetera. I have even plugged in a generic usb keyboard because of a keyboard issue mentioned somewhere online.
Could someone end my suffering and tell me what I am missing?
I tend to reach for awk for these tasks. (No need for grep, and awk’s searching is more flexible, f.ex. awk '/search-string/ && $2 > 42'). In this case, it is helpful:
$ awk '/^\d/'
awk: cmd. line:1: warning: regexp escape sequence `\d' is not a known regexp operator
I am running into an issue with the add-apt-repository command failing, it gives an error saying it timed out.
TimeoutError: [Errno 110] Connection timed out
A quick google found two other posts (source and source) with related issues, but none had a solution.
Does anyone know why this might be an issue? If not, how would I go about manually adding these PPAs to my system? If it matters, I am trying to add the ondrej/php ppa.
EDIT:
Figured it out. Was a problem with my computer trying to use IPv6, which isn’t set up. This fixed it:
Not certain this will work, but I am trying to give Wireguard peers access to the LAN. If this isn’t what I am supposed to do using Wendel’s guide, what is? Also, the top rule is one Tom made on the Lawrence Systems video.
Update:
So it doesn’t seem to work. Also, there’s a lot of stuff in Wendel’s guide that thankfully doesn’t apply to me. I am a new Google Fiber subscriber (Hallelujah!), so I don’t have to worry about carrier-grade NAT or even Dynamic DNS because the IP address going to my fiber box / router is permanent! Everything else behind my LAN, though, doesn’t get a true public IP. I think this is called True NAT. There’s a lot of networking terms that are very jargony to me still.
Actually, I have discovered that there is a problem on my laptop. When I said I figured it out, it is because I connected to my cellular data using my phone and tried to navigate to the pfsense web portal. That worked. Yet, now I have discovered that it doesn’t work on my Linux-powered laptop.
Follow-up on how I solved this problem (accidentally installing one os as EFI and one as legacy for dual boot).
We anyway decided to reinstall Windows 10 in UEFI mode, to make everything proper feng shui. After that we realized that Pop!_OS seemed to fit my wife’s workflow better than Ubuntu, so we ended up reinstalling Linux too (of course after turning off CSM in CMOS, to avoid any more non-EFI shenanigans).
Funnily however, when installing Pop after Windows, systemd-boot somehow wiped the EFI partition on the Windows drive. This is the kind of thing that the Windows installer used to do to Linux disks, I never expected it the other way around!
I had to reinstall the boot files for Windows afterwards, googling myself to the procedure. But now everything should be fine.
Here I am again with not a technical problem, rather an “understanding” problem. I’m trying out Flatpak as a method to install those fringe programs that for various reasons refuse to live in the regular distro repositories. One of those is Signal-desktop on Debian-based distros.
On a fairly freshly installed Debian 11, I installed Flatpak from the apt repositories. Then I followed the instructions on Flathub to install Signal-Desktop. All look good, however it pulled in a bunch of dependencies:
root@host # flatpak install flathub org.signal.Signal
...
ID Branch Op Remote Download
1. [✓] org.freedesktop.Platform.GL.default 21.08 i flathub 130.1 MB / 129.8 MB
2. [✓] org.freedesktop.Platform.GL.nvidia-470-129-06 1.4 i flathub 273.4 MB / 273.0 MB
3. [✓] org.freedesktop.Platform.Locale 21.08 i flathub 17.7 kB / 325.8 MB
4. [✓] org.freedesktop.Platform.openh264 2.0 i flathub 1.8 MB / 1.5 MB
5. [✓] org.freedesktop.Platform 21.08 i flathub 224.5 MB / 200.4 MB
6. [✓] org.signal.Signal stable i flathub 154.2 MB / 156.3 MB
Warning: Not exporting file org.signal.Signal.appdata.xml of unsupported type.
Installation complete.
(the warning looks harmless according to a quick search, and the app works)
My question
Some of these deps look like things that could exist in the debian repositories too (though I haven’t verified this). Anyways they were taken as flatpaks. Is this simply because Flatpak needs to be a self-contained ecosystem in parallel with that based on the distro’s packaging system (in this case apt), or is there a way to integrate them and make Flatpak use deps from apt if possible?
I would prefer to have as much as possible in the distro’s preferred software catalog, and use things like Flatpak only for the out-of-the-ordinary stuff.
No. Keep in mind that not only is it part of the ecosystem and concept, but the deps in the Flatpak repo are likely also a different version then what the distros repo provides (especially on Debian).