Linux - Reddit – Telegram
Linux - Reddit
761 subscribers
4.18K photos
207 videos
39.8K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Writing an init with Go (part 1)

Hey guys, I've been experimenting with what the PID 1 is supposed to do and implementing it with modularity in mind (e.g. no services are spawned from PID1).

Also tried to use some sort of well known language to write services. Who doesn't know yaml?

And all the utils are written in Go. From golang.org: "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software". It feels like a perfect fit for the PID 1.

So, here is the repo: https://gitlab.com/mrvik/go-pid1

And some articles describing the process and some design decisions: https://dev.to/mrvik/writing-an-init-with-go-part-1-3f35

I hope you like it. Feel free to report suggestions or whatever improvements you like.

Cheers!

https://redd.it/kvdumu
@r_linux
SUCCESS: iPhone 7 booting Ubuntu 20.04 to full gnome-shell desktop GUI

WE DID IT!! BOOTS TO THE FULL DEFAULT GNOME DESKTOP!

**VIDEO!** [**https://www.youtube.com/watch?v=DO8vt34kTh0**](https://www.youtube.com/watch?v=DO8vt34kTh0)

​

https://preview.redd.it/v5gtvtwapua61.png?width=750&format=png&auto=webp&s=b2d8c6a11e4d836f0004c5d59610f20ed6fd4026

**BIG NOTE 0:** lol i literally wrote this entire post from Firefox running on the iphone 7 XD big brain time + arm64 rocks

**BIG NOTE 1:** Holy shit! This blew up! Thank you everyone, I had no idea this was gonna be that big. I'm truly humbled by how much interest it's garnered. I hope I've been able to effectively deliver the inspiration that Linux provides not just to me, not to just to the people reading about this, but to millions of developers, employees, and children alike. It's a tool to change the world, and I've never been prouder to support a worldwide revolutionary example of software which saves devices from the trash, revives old laptops to help children in need, or simply makes a convenient server out of an otherwise useless iPhone.

**BIG NOTE 2:** It's reached 9to5mac and iDownloadBlog and more! It's been reported that I am running on a "jailbroken" iPhone and that to be able to do this one has to have already jailbroken the phone. That's not correct; in fact there's no possible way for me to jailbreak this iPhone, as its NVMe NAND is downright inaccessible. That is to say, iOS will never be able to boot on this phone. *If there weren't a Linux kernel port for A10, one might be able to affectionately call this phone not a Linux phone but a brick.* One can pull all of this off without ever jailbreaking the phone. The only reason I'm using checkra1n is for the bootrom exploit and unsigned code execution. In fact, this iPhone had never been jailbroken before flash failure. I got it from my grandma who had the NAND die on her suddenly.

\--------------

Background: I actually was going to stop at just booting nogui. Believe it or not, I am going to be using this in production; I will actually be deploying this iPhone as a server to relieve capacity issues at my home servers. I'm 16 and run several school/club websites and game servers for my friends and myself, and I'll be distributing some load to the iPhone to relieve the main server!

With A10 IPC on par with Skylake, the performance per watt of this device is downright astonishing. The entire "server" is powered off a USB port on the main server.

**TO-DO: Run benchmarks**

* I would love to use the phoronix test suite, but I have no idea what benchmark suite I'd be running. Let me know what you're interested in seeing!
* From memory in news articles and geekbench scores, A10 nearly matched Skylake IPC, and I'd love to see whether that still holds true in a Linux environment
* **Let me know if there's anything else you'd like to see tested/run on the Ubuntu iPhone!**

**Fixes since last time**

* `sudo apt install linux-firmware ubuntu-desktop`
* Working on getting brcmfmac firmware (not my main focus though, as I don't need it)
* No compromises ubuntu-desktop, since its just an nfsroot folder that I can easily make a copy of for my actual production setup, why not go grand for a test
* New services: [https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master](https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master)
* g\_ether\_dns.service --> /etc/systemd/system/g\_ether\_dns.service
* enable it to fix DNS not being set by kernel dhcp
* vino\_server.desktop --> \~/.config/autostart/vino\_server.desktop
* For mouse/keyboard input to gnome-shell, also remote access is useful in general
* `sudo nano /etc/gdm3/custom.conf`
* Uncomment AutomaticLoginEnable and AutomaticLogin
* set these for your user
* As VNC doesn't work in gdm3 but it'll autostart on login
* `gsettings set org.gnome.Vino prompt-enabled false`
* To allow connection without triggering a prompt that we have no way of interacting with

​

**Quick thing for anyone who's
trying this out**

1. If your nvme NAND isn't dead, try compiling hx-touchd, fixing hx-touchd.service from [https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master](https://github.com/newperson1746/iphone7-linux-nfsroot/tree/master) , and moving firmware/D10.mtprops to a location like /lib/firmware/multitouch/D10.mtprops
1. This is the daemon that uploads the firmware and config for the touchscreen; it won't work for me because it depends on certain data on NAND (/dev/nvme0n3) from iOS, which is corrupt by the dead NAND cells.

* Source for mtprops/service info on hx-touchd: [`https://github.com/corellium/projectsandcastle/blob/master/android/sandcastle-aosp.diff`](https://github.com/corellium/projectsandcastle/blob/master/android/sandcastle-aosp.diff)

https://redd.it/kvmsfd
@r_linux
Best way to filter and monitor traffic?

Im planning to set up DNS sinkhole to block ads and stuff, so i am wondering, what best way would be to set up some monitoring tool to see statistics and logs of visited ip's, as well as used bandwidth on per-user basis?
For the platform im going to be using intel nuc and centos

https://redd.it/kvnewo
@r_linux
Can open Firefox in terminal

Cant open Firefox in terminal

Hey,

​

Whenever I try to open firefox in my terminal I get this message:

No protocol specified

Unable to init server: Could not connect: Connection refused

Error: cannot open display: :14.0

​

Does anyone know what I can do to fix that?

https://redd.it/kvobo2
@r_linux
Config program from i3lock-color

Hey guys, just wanted to put a project I started working on out there! I love i3 and I've used it off and on for years, but I've never been a fan of manually editing configuration files or command flags outside of automation and prefer a GUI config for everyday use, so I decided to make one (in PyQt5) for i3lock-color. This doesn't work with vanilla i3lock and lacks settings for some of i3lock-color's functionality, but I'm hoping eventually it will be capable of editing any flag it has and more by combining i3lock-color with imagemagick. It's called i3lcc (i3lock-configuratorinator) it's available at <https://github.com/mgord9518/i3lcc\>. Any constructive criticism is of course welcomed.

https://preview.redd.it/xtz0bo6hnva61.png?width=932&format=png&auto=webp&s=fa7ac14bc53e36769e9c2c33954d9da8bc4fc63b

https://redd.it/kvp2ur
@r_linux
Big Up Linux Community!

I moved to linux very anxious of how I would manage after being a windows guy for all my life.

I just wanted to say the support received is overwhelming. So many people are willing to help in this community makes me happy and so positive for future.

Managed to apply Ethernet driver after thinking my computer was broken and having no idea what was the cause of my problems. Finding the solution and managing to see Ethernet symbol gives me massive buzz, knowing I resolved my issues using detective skills with the help of all of you. May not seem big, but its huge to me! Gracias

https://redd.it/kvrx5w
@r_linux
9 Months of using linux - some sort of review + some more or less chaotic wall of text

TL;DR: I used linux for 9 months as a main OS, I was infected by FLOSS, and privacy in some parts I'm a happier human now, but the curse of knowledge is making some things worse.

&#x200B;

This is some sort of review of 9 months of using Debian as a main OS, with a focus on my change of mindset and the technical differences to windows

&#x200B;

Nine months ago, I started using linux as a main OS.

What happened before that lead me to this steps

I learned C and I read in the internet, that there is MSYS2 that comes with a nice C compiler, that isn't as bloated as MSVC. So I installed MSYS2 and soon after that, I learned the commandline tools of linux like grep,sed,awk,cat and other concepts like pipes.

Then I wanted to try real linux. I looked around and well, as a naive beginner, I choose Kali Linux.

I dual-booted, but because I didn't know what to do with this tools and having no real usage for them (Except nasm-shell, this is pretty nice), I deleted it.

The only nice thing about Kali Linux was its look. Well it looks great and so I have chosen my next distro that looked as good as this Kali Linux: Debian

I installed debian and started using it as a main OS.(In April) I never booted to windows for more than 3 months. I didn't need it.

First, some things were different. I say different, not worse. Installing software without a package manager is so time-consuming and feels wrong. On linux, having a package manager is such a nice thing.

But then, the first problem came to the new world: Nvidia

I have a nvidia graphics card, and I wanted to use it, but never got it working. (I wanted to make it switch between my intel chip and the graphics card, depending on the usage of graphics)

My entire workflow is better, faster, more efficient, programming is a dream, using it is a dream, it's nearly perfect.

Soon after I had installed linux, I came into contact with FLOSS. I opened a github account, made contributions (Sadly only 10 PRs that were accepted, 2 were declined), opened my own opensource projects.

I must say, I nearly "radicalized" (Sorry I don't know any other matching word). I used only FLOSS, I gave up getting nvidia drivers running, as these are proprietary ~~mal~~software, same with my WiFi Card. Only on the web I make an exception and on the smartphone (Fuck you peer pressure, screw you whatsapp), as both are already infected with too much proprietary software. (Although I try to use as much FLOSS as possible[1\])

1 year ago, I would just have downloaded the first program I found for some task. Now I only look for FLOSS solutions. If there are none, I will cancel this task or find other ways to accomplish it, if possible.

As I became interested into more technical things, I went to the topic privacy.

Before I was like "I have nothing to hide", but after reading Cory Doctorows book "Little brother" and randomly going to r/privacy, my eyes were opened.

I cared even more about privacy, I made my browser a fortress, tried to convert(=Showed that privacy is a nice thing to have) others to caring about privacy (I got five of my friends to use firefox instead chrome and converted two to linux)

&#x200B;

But knowledge is sometimes a curse. All the attacks onto privacy and FLOSS were making my life hard. I read about the things microsoft did, EEE, how non-free software is prevalent in many areas of life, often because of the lobbying of Microsoft or Apple.

For example in schools. Schools should never just teach the product of one company (Especially at my school, germany, in 5. and 6. grade Word and Powerpoint, in the 9. grade Access and Excel). It is in my opinion for example totally wrong, from every POV.

It was making me somehow sad and I was feeling overwhelmed because of the attacks on the consumers/peoples freedom (DRM) and privacy (EARN IT, and the comparable BS the EU wants to do).

&#x200B;

Some months later, I deleted my windows partition and was happy.

But soon, I had to write applications as I'm
ending school soon. This worked great, until they wanted to make video interviews. I had to installed Webex Teams/Meetings (I don't know which anymore).

I didn't got it running with wine. Every internet connection with this program failed with some Certification failed error, the web client wasn't working somehow. So in the biggest emergency, I had to install windows.

I have it since then. The original plan was to purge it after the application processes, but then the second lockdown came. My school forced us MS Teams down the throat and so my plans for purging this, for me useless, from my disk were delayed indefinitely.

Windows is now feeling foreign. Every minute in which I use windows is feeling like a pain. No I don't want your browser, no I know, what I want to do. I'm 17 and not a fucking child. Maybe I'm prejudging, because Windows is proprietary, but it feels comparatively much worse to linux.

I know, many(?) use windows just for gaming. I was some sort of gamer before I switched to linux, I played Minecraft and was happy. After switching, I played it some weeks, until I got infected with FLOSS. Now I'm happy with 0ad and Supertuxkart.

&#x200B;

Thank you, all of you that made it possible, to write this text.

&#x200B;

Congratulations, if you were able to read until here and understand everything.

&#x200B;

^(Please excuse my english)

&#x200B;

[1\]: I have only two packages installed, that are in the non-free repo: manpages-posix-dev and manpages-posix

https://redd.it/kvta6e
@r_linux
mhtml2html conversion tool

For those of you who have a couple of MHT(ML) files collected on your disk like me: As all viewers seems to be gone these days I needed a way/tool to convert them into a more future-proof format. Unfortunately I couldn't find one, so I've created it myself:

https://gitlab.com/thomas.mc.work/mhtml2html

It has been tested with several input files, from several sites, captured by several clients, including lots of non-standards-compliant parts. So it should be pretty much bullet-proof in the meantime.

Have fun!

https://redd.it/kvrojb
@r_linux
Media is too big
VIEW IN TELEGRAM
The advantage of a fully transparent terminal is that you can watch movie while you code.

https://redd.it/kvyl7l
@r_linux