BEGIN RANT

I used Linux, many distros*, as my primary desktop and everywhere else from 1998 to 2012. I used Unix starting in 1982, with Macintoshes off and on since their introduction.

In 2012, I moved my primary "desktop" to a MacBook. I liked it a lot, and a Mac is still my primary desktop. Since I retired in 2015, I maintain very few servers.

So my Linux sysadmin skills have atrophied.

1/N

* #SuSE #RedHat #Debian #Knoppix #Gentoo #Ubuntu #CentOS #SomeOthersIForgot

On Monday I decided, for reasons, to set up a Linux workstation on a mini PC. I started with NixOS. I spent the next six hours reading NixOS documentation so I could install Python.

After six hours, the docs had taught me a new programming language, explained common pitfalls (so many pitfalls!) in using this language, but had not come anywhere near "type this to install a package".

I decided to move on, and overwrote the NixOS image with...

2/N

#NixOS

Show thread

... and installed Linux Mint. Because Cinnamon looks a lot cleaner than GNOME. It went okay. I got a desktop, logged in, used the familiar Debian tools to install some things, and started to get comfortable.

Then I decided I wanted to use the desktop remotely from my Mac. (My 2005 $10 keyboard and mouse suck, and the monitor isn't conveniently placed.)

RDP or VNC?

...

3/N

#LinuxMint #Cinnamon #VNC

Show thread

I started with RDP, because some random Redditor said it performs better than VNC.

BEGIN SUBRANT

Somewhere between 99 and 100% of the information on the Internet about configuring Linux is wrong. It might have been right for the author's system on that particular day, but because every part of the ecosystem is in flux and there are 74.8 different ways to do everything, including things that should never have to be looked at.

END SUBRANT

4/N

#RDP

Show thread

Where was I? Right. I started with RDP. I could not find reliable info on how to connect to an RDP server from MacOS, nor whether it's possible, so I didn't get far.

So I switched to VNC. I used VNC 20 years ago. MacOS supports it. Let's see what's changed. I looked at RealVNC, tightVNC, and tigerVNC. RealVNC is apparently paid now. tightVNC is Windows first now(!) and only old versions support Linux. That leaves tigerVNC.

5/N

#RDP #VNC #RealVNC #tightVNC #tigerVNC

Show thread

It wasn't too hard to run tigerVNC from a terminal, I just had to follow the instructions, then figure out why display :0 wasn't available, then write a shell script to start a Cinnamon session, then rewrite it a few times until it worked, and then find the right way to address a nonzero display from the Mac. (Hint: it's vnc://hostname:590 because everybody loves magic numbers). Five, six hours of faffing, tops. Easy.

So let's get this running as a daemon.

6/N

#MacOSIsGuiltyToo

Show thread

Sometime since 2012, a new utility has become part of Linux. It's called systemd. You may have heard of it.

Installing a daemon means working with systemd. I've never really used it before, though if you need SysV init scripts, I'm your man. The SysV init system was apparently too complicated and opaque, a nest of little shell scripts and symlinks. So systemd simplifies all that.

Many pages of angry text have been written about systemd; I'm not going there. I'm just sad.

7/N

#systemd

Show thread

Anyway, the information on the Internet was uniformly wrong about how to integrate VNC into systemd. Wrong in many interesting ways. I delved into the systemd docs and finally got Xvnc plumbed into it, and then the problem was that VNC didn't have any X clients to run. So I looked up which display manager Mint uses. It's lightdm.

(Question for the peanut gallery: does Ubuntu use lightdm? Canonical apparently wrote it, but Ubuntu might have migrated away.)

8/N

#LinuxMint #VNC #LightDM

Show thread

I DuckDuckWent around a little for lightdm + vnc info, and I found some internal design documents for lightdm. Right next to the XDMCP -- no, really! Check this out! XDMCP! As Obi-Wan himself said, now that's a name I've not heard in a long time. Probably since about 1995.

deepwiki.com/canonical/lightdm

But I digress.

9/N

#XDMCP #ThisIsRealRetroComputing

Show thread

Right after the XDMCP class diagrams, there's a secton on VNC server support. lightdm has a VNC proxy delegator thing built in!

So fornicate systemd, I just need to add a stanza to lightdm's configuration to listen on port 5901 and call Xvnc. Which I did. And it worked in just a few tries. Success! Tuesday afternoon, maybe 10 hours after I started.

Rebooted a couple of times to verify it's really working, and it is. So now I can move on to the next thing.

10/N

#LightDM

Show thread

I have to mention that while I was doing this, I decided to set up VNC between two Macs, just to verify the Mac was going to be a VNC client. It was a two minute job, and an Apple support page spelled out every step, correctly and unambiguously. But oddly, nobody nowhere could tell me how to write a URL for the second display. I found it by guessing. (It's vnc://hostname:5901 .)

END RANT (for now)

11/N

#MacOSIsGuiltyToo #ButLessEgregiouslyGuilty

Show thread

(Not a rant.)

Now that I've gathered all the Linux nerds (and probably infuriated most of you), I have a question.

20+ years ago, I learned to type "apt-get install $package" instead of "apt get". Likewise, I've always used "apt-get dist-upgrade" instead of "apt upgrade". I learned those were better, but I've forgotten why, if I ever knew.

Is apt-get install better than apt install?
Was it once?
How?

Same three questions for apt-get dist-upgrade.
Thanks!

12/N

#Debian #CompuArchaeology

Show thread

@kbob apt-get is old. apt is new. At some moment I've stopped tracking the changes, but iirc apt has better dependency/conflict resolution engine.

Follow

@agturcz @kbob It's a different frontend for the same engine. apt was created to make changes benefiting humans without breaking tons of scripts that rely on apt-get.

"apt-get upgrade" only upgrades packages, never installs new dependencies or remove old ones.

"apt upgrade" installs new ones but doesn't remove old ones.

"apt-get/apt dist-upgrade/full-upgrade" both installs and removes packages as needed to perform the upgrade.

Under normal circumstances I just always use "apt full-upgrade" 😜

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml