Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
M2 Macbook Pro
Sonoma 14.4

I have these old symlinks in my /usr folder: X11, X11R6
I'm pretty sure they were migrated over from an old Mac.

ls -l entries in /usr:

Code:
lrwxr-xr-x    1 root  wheel    25B Feb 28 20:05 X11@ -> ../private/var/select/X11
lrwxr-xr-x    1 root  wheel    25B Feb 28 20:05 X11R6@ -> ../private/var/select/X11


xquartz/x11 is gone. The links point nowhere. The targets don't exist. I want to delete them.
I have disabled SIP, but I am unable to delete or do anything with them:

Code:
rm: /usr/X11: Read-only file system
unlink: /usr/X11: Read-only file system
chown: /usr/X11: Read-only file system

I just want them gone. How do I get rid of them?
 

Attachments

  • Screenshot 2024-03-21 at 18.45.54.png
    Screenshot 2024-03-21 at 18.45.54.png
    346 KB · Views: 63

Nermal

Moderator
Staff member
Dec 7, 2002
21,006
4,587
New Zealand
Those aren't migrated files, but are part of the OS. I'm not sure how you'd go about deleting them, but I wouldn't recommend it.

Edit: But you're right that they don't point anywhere. Strange...
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
Are you sure? I thought Apple stopped shipping xquartz with MacOS a long time ago.
According to this user, it's a "notorious" issue:

If it really is supposed to be there it should be easy enough to replace.
If I could just figure out how to mount the right volume as read-write ...
 

Attachments

  • IMG_2883.jpeg
    IMG_2883.jpeg
    187 KB · Views: 29

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
From recovery mode, I remounted /Volumes/Macintosh HD as read-write, and was able to delete the symlinks, but they came back after a reboot. Maybe I got the wrong volume, or I seem to recall having to "bless" folders in the past to make changes "stick", but I'm a little reluctant to push my luck.

It's so weird to have broken links like that. Seems like it could cause issues
 
Last edited:

Bigwaff

Contributor
Sep 20, 2013
2,740
1,830
Seems like it could cause issues
The reason the symlinks came back is due to how macOS uses a cryptographically signed version of the operating system. The volume you mounted read-only and mucked with was snapshot of the SSV system. On reboot, the snapshot is replaced with pristine snapshot.

What issues do you foresee with the “dead” symlinks?
 

HDFan

Contributor
Jun 30, 2007
7,290
3,340
I've got them and they don't seem to be doing any harm. Why worry about them?
 

adrianlondon

macrumors 603
Nov 28, 2013
5,536
8,360
Switzerland
On my system (MacOS 14.4 beta) ...

/usr/X11 links to ../private/var/select/X11
/private/var/select/X11 links to /opt/X11
/opt/X11 exists.

What a mess! But it is what it is.

While playing, loads of links up and down eventually lead to:
/usr/lib/ruby/site_ruby/2.6.0/universal-darwin23

Which is empty :)
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
The reason the symlinks came back is due to how macOS uses a cryptographically signed version of the operating system. The volume you mounted read-only and mucked with was snapshot of the SSV system. On reboot, the snapshot is replaced with pristine snapshot.

What issues do you foresee with the “dead” symlinks?

I figured that was the case.
The question is, are the files part of the original OS, or did they become part of the snapshot after the migration process.
If something tried to use X11 and use a dead symlink, it could fail and cause me problems later.
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
I've got them and they don't seem to be doing any harm. Why worry about them?

Thank you for verifying.
Because I don't want to be hunting for problems later. I absolutely hate tracking down compile failures.

I put xquartz back so it's no longer an issue.
 

adrianlondon

macrumors 603
Nov 28, 2013
5,536
8,360
Switzerland
then you must have installed it, which I ended up doing
Aha - I might have done. I've had this laptop for 4 years so have probably installed lots of things I've since forgotten about. If it's related to some quartz graphic thing (which it sounds like it is), I probably installed it as part of trying to get a document to show properly in LateX a couple of years ago.
 

Bigwaff

Contributor
Sep 20, 2013
2,740
1,830
The question is, are the files part of the original OS, or did they become part of the snapshot after the migration process.
I have these symlinks in /usr directory and I've never installed X11. Based on the ownership and date, these are part of the system install and baked into the SSV.

Bash:
❯ ls -la /usr | grep X
lrwxr-xr-x    1 root  wheel     25 Feb  2 12:19 X11 -> ../private/var/select/X11
lrwxr-xr-x    1 root  wheel     25 Feb  2 12:19 X11R6 -> ../private/var/select/X11

... and I've never encountered an issue. No need to install X11 package just to make these symlinks point to something, especially when you are never going to X-display any Unix programs.
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
I will probably end up using it anyway since I mess around with imagemagick and other CLI tools
 

bogdanw

macrumors 603
Mar 10, 2009
6,117
3,028
/private/var/select/X11 and /private/var/select/X11 are not present in a clean Sonoma install.
Only /private/var/select/sh exists and points to /bin/bash
/private/var/select/ is not on the system volume, is on the data volume.
/var is protected by SIP. With SIP disabled, I can write in /private/var/select/.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.