Can you save a terminal command or must it be entered every time the computer restarts? I have missing share options with El Capitan.

I have missing share options since installing EL CAPITAN. The advice is to use terminal command. However it needs to be entered every time the computer restarts. Is there a way of saving the command in Terminal or some other option?

iMac, OS X El Capitan (10.11)

Posted on Oct 16, 2015 6:54 AM

Reply
11 replies

Oct 16, 2015 9:49 AM in response to ah_millar

ah_millar wrote:


...Is there a way of saving the command in Terminal or some other option?

Try opening Terminal and, at the prompt, hit the up-arrow key. The most recent command used should appear (at least it does for me). If you've used other commands since, keep hitting the up arrow to get to the one you want.


Alternatively, type the command in TextEdit and save it, then each day open the file, copy the command and paste it into Terminal. That command certainly is a lot to type each time.😮

Oct 16, 2015 7:49 AM in response to ah_millar

ah_millar wrote:


I have missing share options since installing EL CAPITAN. The advice is to use terminal command. However it needs to be entered every time the computer restarts. Is there a way of saving the command in Terminal or some other option?


If I understand correctly, you were given advice to run some Terminal command every time you start your mac, in order to fix some problem.

This is NOT a good advice.

1) Maybe you should describe exactly what the problem is, so we can try to help

2) If a certain command should be executed every time, it should be placed appropriate so the system knows it must be run. It is absurd to tell a user he must enter and reenter a command every time the machine is started.

Oct 16, 2015 9:26 AM in response to Luis Sequeira1

After installing El Capitan, the share menu in PHOTOS and Safari have several items missing including share by email. Apple Support (If Share options or Markup is missing after upgrading to OS X Yosemite or El Capitan - Apple Support) says to go to Terminal and paste . . .

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed ... However every time the computer starts it needs to be input once again. Thanks

Oct 16, 2015 10:22 AM in response to ah_millar

Problems such as yours are sometimes caused by files that should belong to you but are locked or have wrong permissions. This procedure will check for such files. It makes no changes and therefore is not, in itself, a solution.

First, empty the Trash, if possible.

Triple-click anywhere in the line below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:

find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) 2>&- | wc -l | pbcopy

Launch the built-in Terminal application.

Paste into the Terminal window by pressing command-V. The command may take a noticeable amount of time to run.

Wait for a new line ending in a dollar sign ($) to appear.

The output of the command will be a number. It's automatically copied to the Clipboard. Please paste it into a reply.

The Terminal window doesn't show the output. Please don't copy anything from there.

Oct 17, 2015 2:35 AM in response to ah_millar

ah_millar wrote:


After installing El Capitan, the share menu in PHOTOS and Safari have several items missing including share by email. Apple Support (If Share options or Markup is missing after upgrading to OS X Yosemite or El Capitan - Apple Support) says to go to Terminal and paste . . .

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed ... However every time the computer starts it needs to be input once again. Thanks


If this does not stick through a computer restart, then there are other issues involved. You may create a little application that calls this command, and put it in your login items, so it is run automatically, but it shouldn't have to.

Oct 17, 2015 9:05 AM in response to ah_millar

Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock those files and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.

Back up all data before proceeding.

Step 1

If you have more than one user, and the one in question is not an administrator, then go to Step 2.

Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):

sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-

You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.

Step 2 (optional)

Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.

Start up in Recovery mode. When the OS X Utilities screen appears, select

Utilities Terminal

from the menu bar. A Terminal window will open. In that window, type this:

resetp

Press the tab key. The partial command you typed will automatically be completed to this:

resetpassword

Press return. A Reset Password window will open. You’re not going to reset a password.

Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.

Select your username from the menu labeled Select the user account if not already selected.

Under Reset Home Directory Permissions and ACLs, click the Reset button

Select

Restart

from the menu bar.

Nov 24, 2016 12:32 PM in response to Linc Davis

84924


I'm having some trouble with accessing markup within the photo app. The extensions when opened there show Photos not enabled but the markup ext is check marked. I can't use markup. I followed your instructions for a similar issue and this is the number I came up with from terminal. I don't know if you can help but I'm a bit boggled. I also find my computer is patchy updating photos from my phones. Sometimes they are there and sometimes it seems to take some tweaking to sort of wake it up. Thanks for any help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can you save a terminal command or must it be entered every time the computer restarts? I have missing share options with El Capitan.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.