Tag Archives: macOS

Antranig Vartanian

December 22, 2022

Screenshot 2022 12 22 at 3 30 47 PM

Could this be a timezone math issue? No wait, I think it’s just bad written software issue!

Personally, I would prefer if it said “Currently doing XYZ” and ideally if it just printed the output of ^T (SIGINFO) somewhere in the window.

Reply via email.

Software Review: #MarsEdit version 5

I haven’t done anything like this before, so please, be gentle 🙂

I first heard of MarsEdit when I was browsing Gruber’s website and I saw it listed in his Essential Apps. At the time I was using Hugo as my “content manager” for my blog, so I moved on. Fast forward a year-or-two, I migrated to WordPress.

A week-or-so ago Gruber blogged about MarsEdit 5.0, so I decided to give it a go.

After 10 days of using it, here is my feedback.

First Impressions

I downloaded the app from Red Sweater Software’s website, at the time I didn’t know that it was also available on the App Store. A simple Zip file which contained the App, I moved it to the application folder and I started it.

Right from the start, it asks you two simple questions: Your blog’s name and the address.

I entered my Armenian blog’s name “Ազատութիւն Ամենեցուն” and address “անդրանիկ.հայ”. As you have noticed, it’s a unicode domain 🙂 This info will be important later.

MarsEdit automatically figured that I’m running WordPress and that it should use the WordPress API!

The interface is nice and intuitive. At first, you will see information about your blog, It’s made of two “parts”

SCR 20221219 kng

At the top is list of your posts and pages
At the bottom is a live preview of your selected page/post

The live preview doesn’t actually fetch things from your server, instead, you can have a template. Luckily, you can edit the preview settings and download your template. Unfortunately, there was (is?) a bug and MarsEdit was not able to download the template of my blog. First thing that came to my mind “I’m using a unicode domain, that might be the issue!” and turns out I was right. As soon as I added my English blog with its domain (the one that you’re reading right now!) the “Download Template…” button worked like a charm!

Screenshot 2022 12 19 at 3 09 40 PM

The Editor

This is, easily, the best editor I’ve seen for blogging.

SCR 20221219 lbx

You start with selecting your blog (1) and the post type (2), you can give your post a title (3), but turns out that’s not mandatory at all. As you start typing in the input box (4), you will notice the toolbar at the top (5), which has the basic formatting buttons such as Bold, Italic, Underline. There’s “adding a link” and paragraph formatting. For example —

This is a plain paragraph style

This is a quoted paragraph style

And this is a preformatted paragraph style

Depending on your theme, it will look different in preview/website and in the editor.

You can (and should!) also add tags (6), which MarsEdit will autocomplete while typing and select Categories (7). There is also the option to specify a “Featured Image”, I’ve never used this in MarsEdit nor in the WordPress editor, so no comments from me!

Finally, you can specify the server settings (9), such as the status of the post (Published, Draft, etc), Password protection, author (I actually DO run a multi-author blog!), comments and TraceBacks!

But the most impressive feature for me is the ability to save things locally, hence the Edited (10) at the title bar! I’m mostly on the move (well, not these day, it’s cold outside), while I don’t travel a lot, I do have daily work-things, such as going to a government office, a bank, a notary office, etc., which means I’m either commuting or waiting for my turn. While I have a mobile internet with me, we all know how old buildings are not built for the wireless era, so it amazes for me that I can just ⌘S and save my post locally to continue later.

All the local drafts are available in the… Local Drafts 😅

SCR 20221219 o9p

Amazing Niceties

The first nicety that I noticed was in the editor and it’s called “Typewriter Scrolling”. It does exactly what it says. The input box’s cursor will always be at the middle of the editor.

Screenshot 2022 12 19 at 5 33 31 PM

The second nicety is that everything is customizable, and I mean everything! For example, I blog a lot with coding samples, so I need a code tag. All I had to do was to go to Format → Customize… and I was able to create a new HTML tag for my code formatted text. Like this:
uname -a

And the final nicety that I noticed was the editor’s integration with TimeMachine-style restore points. I wish if every software had a feature like this!

Screenshot 2022 12 19 at 5 51 33 PM

Common (Personal?) Issues

I wasn’t planning on writing this review, at all, but since I wanted to try out MarsEdit before purchasing it, I wanted to use it intensively. In the last two weeks we had a Capture The Flag hacking competition and an Armenian InfoSec conference, so I blogged every details of these two events using MarsEdit. Actually, I was an organizer of the CTF competition, so I used MarsEdit to blog about everything from server installation, platform setup to “the food is here!” status updates 😄

That’s where I had my first issue! I set the Paragraph Style to Preformatted and I pasted some code, here’s how it looked like, if the code was multi-line;

Screenshot 2022 12 19 at 5 59 09 PM

It took me a while to realize, that I had to 1) set the Paragraph Style to Preformatted 2) Paste the code by doing Edit → Paste HTML Source. I’m not sure if this is an issue with my theme or not, but in case you get a similar issue, that’s how to solve it! Now, the code looks perfect 😇

Screenshot 2022 12 19 at 6 02 30 PM

The only other issue that I had was with the microposting feature, which is new in MarsEdit 5. It looks like a “status update” on Twitter or Mastodon.

Screenshot 2022 12 19 at 6 05 42 PM

When I first used this on MarsEdit 5, MarsEdit crashed. So finally, I’d like to talk about how

Daniel Jalkut is Amazing!

Like I said, I used MarsEdit 5 as soon as it came out, and the “New Micropost” feature crashed every time. Just 6 days after its initial release, Daniel released MarsEdit 5.0.1 which fixes the Micropost issue that I was having.

Finally, I send an email to Daniel saying

Greetings Daniel! how are you?

Looks like that MarsEdit is not crashing after upgrading to Version 5.0.1 (10611), however, a small question (feature request?):

In MarsEdit -> File -> New Post, I can set the Kind (Post Format) to Post, Aside, Status, etc.

I was wondering if there was a built-in way to make sure that my micro-posts are always set to Status? Microposts with no title look silly on WordPress, but in Status mode they look like a twitter/social-media status update!

I was wondering if I can implement that by using the Custom Fields tab in Blog Preferences.

Let me know!

Daniel replied to me just an hour later saying

Hi Antranig – this is a great idea and I’ll try to get it added as a preference ASAP. I’ll let you know when I have it in there!

Daniel

Conclusion

MarsEdit 5 is amazing. Currently it costs $59.95 for a Single User license and $89.95 for a Family Pack license (5 people in a private household), and let me tell you, it’s totally worth it!

MarsEdit 5 is my Christmas gift to myself.

If you are also a blogger who uses one of the platforms that MarsEdit supports (WordPress, Micro.blog, Tumblr, TypePad, Movable Type, and any blog that supports a standard MetaWeblog or AtomPub interface) and don’t want to open your browser every time an idea comes to your mind, then MarsEdit is for you.

P.S. WordPress’s Block Editor is also amazing. The WordPress team has done an amazing work with Gutenberg. And while I’ll be using MarsEdit for my personal blogs while writing from my Mac, Gutenberg has been amazing with my other WordPress blogs while writing from my FreeBSD laptop! Give that a try too! 😉

Reply via email.

FreeBSD arm64.aarch64 on QEMU/UTM with better (but not perfect) graphics

A week ago I posted about Running arm64.aarch64 FreeBSD on QEMU/UTM.app on Apple Silicon, and looks like

  1. Many people liked that post
  2. Everyone asked about running graphics (Xorg)

It took me a while but in the end it was, again, a simple change.

All you have to do is to add this single line to /boot/loader.conf

efi_max_resolution="1920x1080"

Now, QEMU’s display will not be 1080p, but it will be the following

VT(efifb): resolution 1024x768

Here are some screenshots

Here’s also Firefox doing an HTML5 test. As you can see, it passed the exam!

However, I’d like to get more resolution out of this. If you know how, please let me know.

That’s all folks…

Reply via email.

Running arm64.aarch64 FreeBSD on QEMU/UTM.app on Apple Silicon

Around a year ago I got an M1 MacBook Air for work. At this point, a lot of people that I know use these Apple Silicon machines.

While my personal machine is running FreeBSD, many times I’ve been in a situation where I need to run FreeBSD on my M1 MacBook Air, at least as a Virtual Machine.

For 9 months I’ve been running the AMD64 version of FreeBSD on QEMU/UTM.app using emulation. It gets the job done.

But whenever I want to do FreeBSD development, I need a fast machine. While M1 is pretty fast, VM emulation is still slow.

The problem is that whenever I booted the arm64.aarch64 FreeBSD on QEMU, it would use so much CPU on the host, that my battery would die in an hour or so.

After a lot of searching, I finally found this, this and this, which eventually got me to this page on the handbook

1. Set Boot Loader Variables
The most important step is to reduce the kern.hz tunable to reduce the CPU utilization of FreeBSD under the Parallels environment. This is accomplished by adding the following line to /boot/loader.conf:

kern.hz=100

Without this setting, an idle FreeBSD Parallels guest will use roughly 15% of the CPU of a single processor iMac®. After this change the usage will be closer to 5%.

Configuring FreeBSD on Parallels

So I tried that, and here you go!

Ahh, finally, I can do some work.

That’s all folks…

Reply via email.

Antranig Vartanian

September 23, 2022

I’m running two VMs on my M1 MacBook Air. An x86_64 FreeBSD and x86_64 LureOS (illuria‘s OS), both are emulated.

and yet, somehow, according to macOS, my browser is Using Significant Energy.

To be honest, I believe macOS, but the real question is, how did we get to a place where a piece of software is consuming more power than a complete Operating System?

Reply via email.

The command command

According to the 2018 edition of The Open Group Base Specifications (Issue 7), there’s a command named command which executes commands.

Wait, macOS is OpenGroup UNIX 03 certified, right?

command running uname -a

I tried tracing back the history, macOS is mostly based on FreeBSD, as we can see in their open-source code.

So I started tracing back the FreeBSD code, and I found the current one.

I found the oldest commit about command in FreeBSD’s source tree, but it said

Import the 4.4BSD-Lite2 /bin/sh sources

builtins.def

So I opened up the SVN tree of CSRG, and there I found this

date and time created 91/03/07 20:24:04 by bostic

builtins.def

However, if I knew how to use SVNWeb, I’m pretty sure I’d navigate around the /old/sh directory.

It’s funny, how this line
# NOTE: bltincmd must come first!
Is both in the macOS code AND the CSRG code from 30 years ago.

That’s all folks…

Reply via email.

Music.app is a good radio app

As I mention in my other post, macOS also has Music.app, which as I said I will to try it out as well.

Turns out it’s really good! I’ve been listening to DeepHouseRadio all day. When the connection drops while I go to the kitchen to make some coffee, it buffers it properly. Although once it skipped and started playing the “next song” which was some media file.

While doing my testing, I realized that the Music.app has Radio included in it! It fetches the list of radio stations from TuneIn, which I loved using their app on my BlackBerry 9780 back in the day.

Good job Apple, not updating your QuickTime Player, but at least making sure that one of your out-of-the-box apps handles a thing properly.

That’s all folks…

Reply via email.

The OS App vs The Browser OS

I like listening to online radios like anonradio and DeepHouseRadio, instead of me trying to organize my local library or listening the same music over and over again on Deezer, I get lazy and just use their HTTP link.

Like a sane person, I would use a media player to “open” these HTTP radio links. On my FreeBSD machine, all I need to do is mplayer http://the.domain/path/to/content, but on macOS it would not be that simple.

The default media player on macOS is QuickTime. Here is where my problems start. I open QuickTime Player, I set the location to the HTTP link and it all works fine. Until it doesn’t. A small network lag and it stops playing completely.

I am usually connected to the internet via a cable in my office or the house, but when I go wireless, there’s a blind spot in one of the rooms. My FreeBSD laptop with mplayer handles it all fine, but QuickTime? Not so much.

So I decided to use the “other” “Operating System” in macOS, also known as a browser, in this case Firefox. I open the link and it all works fine. Even if there’s a network lag, Firefox would handle it fine.

It’s sad funny how browsers are handling things better than native desktop programs these days.

While writing this blog-post I realized that macOS has another media player known as Music.app, so will try with that as well, let’s see how it will handle it.

That’s all folks.

Reply via email.

macOS to FreeBSD migration a.k.a why I left macOS

I think the title tells a lot about the story I’m going to tell you.

This is not a technical documentation for how I migrated from macOS to FreeBSD. This is a high-level for why I migrated from macOS to FreeBSD.

Not so long ago, I was using macOS as my daily driver. The main reason why I got a macbook was the underlying BSD Unix and the nice graphics it provides. Also, I have an iPhone. But they were also the same reasons for why I left macOS.

I did not want to write this post right after the migration, I wanted to take my time, use FreeBSD daily, see if I will ever miss macOS.

Here’s a tweet of mine from 8 months ago

Let’s look at it this way. macOS is becoming less Unix-y every year, date(1) is outdated, there are 100+ Unix processes running by the time the system is booted, most of them are useless for the general user, it has no native package manager (at least MacPorts/homebrew/pkgsrc is out there) and for a power user, there is no proper documentation. Have you ever checked the FreeBSD handbook? Everything is right there!

Okay, the nice graphics part. Have you seen the latest and greatest Big Sur? It feels like eye-candy, it’s not made for power users at all, everything seems to be a distraction now, even the icons. I’m no UI guru, but bringing iOS to the desktop is not for everyone.

So I decided to move to FreeBSD. This is where many people will tell me “Okay but not everything works outside the box”, true! but which OS works outside the box these days anyway? Windows is still a nightmare, setting up macOS took me 3 days the last time, Linux takes way more if you’re building it from scratch. Setting up FreeBSD took me 3 days, however this meant that I will NOT need to change it again for a very, very, VERY long time.

Every time Apple pushed an updated, my pf.conf and automount configs got broken on macOS. They either got deleted or they moved somewhere. Well, the last 2 times it just got deleted.

On FreeBSD, I upgraded from 12.1-RELEASE to 12.2-RELEASE and nothing broke, and in case there were any changes, FreeBSD just asked me what to do about them.

Let’s come back for a second. Unix is outdated and Apple does not care about it, fancy graphics are too fancy now. Doing forensics is almost impossible. And the hardware is, well, not the best out there (have you ever disassembled a MacBook Pro? it’s takes 2 hours to change a battery while I can reassemble my Dell Latitudes and ThinkPads in 30 minutes).

So there was no reason to stay here anymore. I had to migrate. The question is: where?

Linux has systemd, not my favorite thing out there, Windows is privacy nightmare. That left me with 2 major options: Linuxes without systemd (Gentoo, in my case) or BSDs.

Since I run FreeBSD servers anyway, I just migrated to FreeBSD.

Here’s a short review about running FreeBSD on ThinkPad T480s.

  • WiFi: works. not the fastest, but fast enough.
  • Graphics: works.
  • Touchpad: works with multiple fingers AND very configurable via sysctl.
  • BT does discovery and pairs, I still have to try it with non-Apple headphones.
  • COVID-19 era: Zoom, Google Hangouts, Jitsi and all other WebRTC-based video conferencing software works via web as well.
  • Thanks to Linuxulator, I can watch Netflix as well: here’s a screenshot.

Most importantly, it’s Free and Open Source.

It’s been 1 month and 1 day since I last touched my MacBook Pro, so, what do I miss?

  • Better BT support
  • Faster WiFi

That’s it, that’s all missing on a FreeBSD laptop these days. WiFi can do 48Mbps according to ifconfig but I usually get 10-20Mbps. BT pairs with my Apple AirPods but I wish it worked till the end.

Having a nice workstation/laptop is not an easy thing, using macOS means living by Apple rules, Windows is the same for Microsoft. The BSDs gave me the power to be as free as possible 🙂

During the next weeks I’ll try to blog about the actual setup.

P.S. dear Apple employee, in case you’re reading this, please tell your management to update their BSD Unix layer. Some of us still care, some of us are not just Docker people, some of us are not just “modern” web developers. Thanks in advance.

That’s all folks! 🙂

Reply via email.

autofs on macOS Catalina

One of the nice things (that used to be) about macOS is how much unix is underneath, but this has been less true each year.

Like any normal human being, I do my development on a real Unix system, FreeBSD. I ended up using FreeBSD VMs that have NFS exports, and I mount those on my macOS. However, there have been issues with Catalina, here’s the main problem:

mount | grep 'map auto_nfs_antranigv'  | wc -l
18

So for some reason in Catalina you can’t do nested mounts, because auto_nfs_antranigv was mounted in /Users/antranigv/nfs, which is inside /Users (also autofs’ed) it was duplicating and ended up eating a lot of CPU 🙂

Here’s the proper way of doing it

First, in /etc/auto_master add the following:

/System/Volumes/Data/netmount		auto_nfs_user

(you might want to change user to your username)

Then, create the following file → /etc/auto_nfs_user

Finally you can set your mounts, for example:

someoneelsecomputer	-fstype=nfs	cloudserver:/usr/home/sysadmin/cloud

here’s a complete example:

antranigv@zvartnots:~ $ cat /etc/auto_master
#
# Automounter master map
#
+auto_master			# Use directory service
#/net				-hosts		-nobrowse,hidefromfinder,nosuid
/home				auto_home	-nobrowse,hidefromfinder
/System/Volumes/Data/nfs	auto_nfs_antranigv
/Network/Servers		-fstab
/-				-static
antranigv@zvartnots:~ $ cat /etc/auto_nfs_antranigv
illuria-dev	-fstype=nfs illuria-dev:/usr/home/antranigv/illuria
devbsd-src	-fstype=nfs devbsd00:/usr/src

Now I’m happy! 🙂

Reply via email.