Tag Archives: macos

Schedule your Mac to turn on or off (sleep) in Terminal

You can use the pmset command line utility in Terminal to schedule specific times for your Mac to start up, sleep, restart, or shut down.

In the Terminal app on your Mac, enter a pmset command. Examples:

pmset -g sched See the current schedule
sudo pmset repeat wake M 8:30:00 Schedule your Mac to wake at 8:30 a.m. every Monday
sudo pmset repeat cancel Cancel the current schedule. I was searching how to stop this routine I have setup long time ago.
Examples of PMSET command usage

How to allow apps to be downloaded and opened from anywhere on MacOS Ventura / Как да разрешим да се изпълняват програми свалени от интернет на Мак ОС Вентура

Open Terminal / Стартирайте програмата Терминал:

sudo spctl --master-disable

And in  Apple menu => “System Settings” => “Privacy & Security” => “Security” section select option:

MacOS / Logitech Lift and secure input problem

Interesting problem during setup of Logitech Lift mouse.

There is a secure input mode / flag on MacOS which prevents input devices in some cases from working / installing properly.

Below is a post on the topic in the Logitech support forum:

Logi Options+ issues recognizing devices on macOS when Secure Input is enabled


To check if secure input mode is enabled and by which process do the following:

  • Launch terminal and go in directory /Applications/Utilities 
  • Execute command
    ioreg -l -d 1 -w 0 | grep SecureInput
  • If nothing returned, then the secure input mode is NOT active
  • Otherwise search for “kCGSSessionSecureInputPID”=xxxx in the returned output. The number xxxx points to the Process ID (PID). You can kill it and try again

Another guide for general setup of the Logitech software on MacOS Ventura (13.x):


And the site to help you setup the mouse: ERGOsetup.logi.com

MacOS terminal improvements

Check which shell you use:

  echo $0

If it is bash you can continue editing bash settings:

  nano ~/.bash_profile

Add a line containing this:

  export PS1="\w\$ "

This will show you the current path in the terminal (bash).

And I like the short “ls -la” command to be set as alias “ll“, so I added also:

  alias ll="ls -la"

Remember to open new terminal window to get the new settings or execute:

  source ~/.bash_profile

That’s all for now!

BASE64 email raw attachment – Decode on MacOS

Take the attachment file which is Base64 encoded. The section should look like below. There is an opening string “–00000000000039139405d8b03aff” and closing with the same string “–00000000000039139405d8b03aff”. Your code will be different but beginning and ending will be always the same.

Content-Type: application/msword;
Content-Disposition: attachment;
Content-Transfer-Encoding: base64
Content-ID: <17f26f7ffc9d845639d2>
X-Attachment-Id: 17f26f7ffc9d845639d2




Get the encoded text which starts on a new line and ends on the line before the last string “-00xxxxxx” (Bolded text below).

Method 1 – Save to text file and decode it

Save it as text file (base64.txt) in a directory.

Open it in Terminal , go to this directory and execute the command replacing the filename properly:

base64 --decode base64.txt > File22.doc

Method 2 – all in one command

base64 --decode > File22.doc

and press [ctrl+d] to send the pasted text.

Method 3 – use site for files up to 2MB