I downloaded a package that contains a bunch of executables. When I try to run any of them from the terminal, I get the "cannot be opened because the developer cannot be verified" thing, so I cannot run it. I know I can go in the Security settings to allow this one app to run. But this requires doing it one by one. Is there something I can do from the terminal to allow all apps in a directory (say) to run?
I found an answer. To allow unverified “program” to run, from the terminal, you can do:
xattr -d com.apple.quarantine “program”
Also works for multiple binaries within a directory,
xattr -d com.apple.quarantine *
Related
I am running Fedora 36. On my way to install Discord, I came through a process, here it is:
Downloaded discord.rar.gz
Unpack the file
Open the extracted directory
Found the file Discord with no extension:
I just double-clicked the file, it started installing (in GUI).
After it was installed, I still could not find it in App Drawer and when I run the same Discord file with no extension, it just opens the Discord app.
I am curious to know what's happening here. How can I get the app in the app drawer? Note that I tried copying the file to another location and then double-clicking it. It did nothing.
I clicked the file Discord in the directory. I was expecting that it was an installer and it would install the application, and it would be available in the app drawer. But, after it was installed, it didn't appear in the app drawer. Also double-clicking the same file again, opens the Discord app.
These are the steps to take if you want to keep changes to a minimum:
Download Discord for Linux tar.gz
Create the directory where you will install Discord
sudo mkdir /usr/share/discord
Extract and store in the directory created in the previous step
sudo tar xvzf discord-0.0.17.tar.gz -C /usr/share/discord
Copy the application launcher to the right place
sudo cp /usr/share/discord/Discord/discord.desktop /usr/share/applications
Point the icon to the right location
sudo sed -i 's|Icon=discord|Icon=/usr/share/discord/Discord/discord.png|g' /usr/share/applications/discord.desktop
Now if you go to Applications > Internet should be there.
Uninstall the app, or delete everything associated with it. Redownload, move to applications, and there open it for the first time (install it), that should do the work
After downloading BloomRPC from the github repo and running brew cask install bloomrpc, when I try to open the BloomRPC application I get "BloomRPC cannot be opened because the developer cannot be verified." I've tried going to Security and Privacy -> Developer Tools -> and enabling BloomRPC under "Allow the apps below to run software locally that does not meet the system's security policy", but I still get the same error message.
I'm on macOS Catalina 10.15.5. How do I open the BloomRPC application?
You can try to build BloomRPC from source (as they mentioned in their repo) Or you can simply bypass this error go navigate to SystemPreference -> Security&Privacy.
Under General tab, you will see a statement about BloomRPC, click on Open Anyway to suppress the warning and continue to use.
Follow these steps:
Type the following command in terminal - sudo xattr -rd com.apple.quarantine
Add space at the end of command
Drag and drop the app into the terminal window right after the command and hit 'return' key
Enter password and you are good to go.
For Bloomrpc the command will look like this:
sudo xattr -rd com.apple.quarantine /Applications/BloomRPC.app
I have an OS X app which uses a custom built flow outside of XCode. Therefore, I have to use the codesign tool in command line mode to sign everything within the app. The command line I used is:
codesign -f -s "Developer ID Application: MyCompany Inc" -i com.mycompany.myapp -v $Path_To_App
I first signed every binary, framework and plugins within the app by passing the path of each one of them as $Path_To_App. Then I signed the whole app by passing the path of the app folder MyApp.app.
After that, I used the following command to build a dmg file:
hdiutil create -format UDBZ -srcfolder path_to_app_folder myapp.dmg
If I install this dmg file locally, everything is fine. I believe OS X doesn't even check the certificates in this case. But after I upload the dmg file to the web server, download it with a browser and extract the app into the Applications folder, the OS rejects the app as damaged. The message is:
"MyApp" is damaged and can't be opened. You should move it to the trash.
If I check the signature like this, it is fine:
codesign --verify --verbose /Applications/MyApp.app
/Applications/MyApp.app: valid on disk
/Applications/MyApp.app: satisfies its Designated Requirement
However, if I check it with spctl, it does complain:
spctl -a -v /Applications/MyApp.app
/Applications/MyApp.app: a sealed resource is missing or invalid
I am not sure where I do wrong here. Here is the url of the signed dmg file on the web: http://www.slimjet.com/test/slimjet1.dmg .
Thanks a lot for helping!
Here is an update. The damage warning only shows up when I extract the app into the /Applications folder and run it from there. If I drop it into any other folder and run, or directly run it from mounted dmg archive, it is able to run just fine.
It turned out the gatekeeper keeps cached information about previous failures. Even if you fix the problem by applying all the correct signatures later on, spctl command still reports the same error without actually checking it again. The codesign command doesn't use cache but spctl does. I had to reset the system policy database by the following command:
sudo cp /var/db/.SystemPolicy-default /var/db/SystemPolicy
After that, I restart the OS. Then my app runs just fine. Although spctl has a "--ignore-cache" switch, it doesn't have any effect in this case.
You forgot to also codesign:
FlashPeak Slimjet.app/Contents/Versions/13.0.6.0/FlashPeak Slimjet Helper.app
FlashPeak Slimjet.app/Contents/Versions/13.0.6.0/FlashPeak Slimjet Framework.framework/Resources/app_mode_loader.app
Since they not codesigned this is probably the issue; there could be others, but check these first.
Whenever I attempt to open the ShoesRB install files for Linux, which are both "script.run" and "script.install" files, they open in a text editor instead of an installer. When I attempt to run them in the terminal, I'm getting strange root authentication errors. I know the root password is correct.
Does anybody know how to correctly install ShoesRB in Ubuntu 14?
First of all download the executable from http://shoesrb.com/downloads/ according to your linux machine. This you have already done. On double clicking the downloaded .run file (say filename.run), you might not be able to run it because it would not be having executable permission -
This you can change by right clicking the script -> properties -> permissions -> Check the 'Allow executing file permission'
Or
from terminal by
chmod +x filename.run
Next you need to run this by:
sudo ./filename.run
Enter correct root password and you are good to go. This script actually make a hidden .shoes directory in your home and all shoes related files and executable are present in there. It also copies a desktop entry for shoes to /user/share/application, which you open to open shoes applications.
Moreover you can copy that desktop entry to your desktop and make it executable by:
cp /usr/share/applications/shoes.desktop ~/Desktop/shoes.desktop
chmod +x ~/Desktop/shoes.desktop
All done! Just double click the shoes icon on your desktop you can open your shoes apps now.
Hope it Helps :)
I fondly remember working with WinSCP and using the fully automated local-to-remote syncing functionality, where the app would monitor a directory hierarchy and send changes to the remote server as they happened.
Is there an app available on OSX that accomplishes the same thing? I haven't really been able to find anything. When I do find something promising, it always turns out to be a traditional syncing app, where you need to initiate the sync command manually and it then scans the hierarchy to find changed files. That takes too long and isn't automated.
Been looking at the File System Events API, wondering if a small app could be pieced together with a small utility to trigger hierarchy changes and feed the changed directory to rsync or something.
Thanks for any leads!
There are two Mac-specific utilities you may be able to utilize to make your job easier:
Automator (link and link)
Folder Actions (link link and link)
Both tools have AppleScript as a common thread (which can be used to execute shell commands). You might be able to write a small AppleScript that is launched when a folder changes to call rsync and perform the service you require.
Well, I had the same kind of problem and it is possible using these together: rsync, SSH Passwordless Login, Watchdog (a Python sync utility) and Terminal Notifier (an OS X notification utility made with Ruby. Not needed, but helps to know when the sync has finished).
I created the key to Passwordless Login using this tutorial from Dreamhost wiki: http://cl.ly/MIw5
1.1. When you finish, test if everything is ok… if you can't Passwordless Login, maybe you have to try afp mount. Dreamhost (where my site is) does not allow afp mount, but allows Passwordless Login. In terminal, type:
ssh username#host.com
You should login without passwords being asked :P
I installed the Terminal Notifier from the Github page: http://cl.ly/MJ5x
2.1. I used the Gem installer command. In Terminal, type:
gem install terminal-notifier
2.3. Test if the notification works.In Terminal, type:
terminal-notifier -message "Starting sync"
Create a sh script to test the rsync + notification. Save it anywhere you like, with the name you like. In this example, I'll call it ~/Scripts/sync.sh I used the ".sh extension, but I don't know if its needed.
#!/bin/bash
terminal-notifier -message "Starting sync"
rsync -azP ~/Sites/folder/ user#host.com:site_folder/
terminal-notifier -message "Sync has finished"
3.1. Remember to give execution permission to this sh script. In Terminal, type:
sudo chmod 777 ~/Scripts/sync.sh
3.2. Run the script and verify if the messages are displayed correctly and the rsync actually sync your local folder with the remote folder.
Finally, I downloaded and installed Watchdog from the Github page: http://cl.ly/MJfb
4.1. First, I installed the libyaml dependency using Brew (there are lot's of help how to install Brew - like an "aptitude" for OS X). In Terminal, type:
brew install libyaml
4.2. Then, I used the "easy_install command". Go the folder of Watchdog, and type in Terminal:
easy_install watchdog
Now, everything is installed! Go the folder you want to be synced, change this code to your needs, and type in Terminal:
watchmedo shell-command
--patterns="*.php;*.txt;*.js;*.css" \
--recursive \
--command='~/Scripts/Sync.sh' \
.
It has to be EXACTLY this way, with the slashes and line breaks, so you'll have to copy these lines to a text editor, change the script, paste in terminal and press return.
I tried without the line breaks, and it doesn't work!
In my Mac, I always get an error, but it doesn't seem to affect anything:
/Library/Python/2.7/site-packages/argh-0.22.0-py2.7.egg/argh/completion.py:84: UserWarning: Bash completion not available. Install argcomplete.
Now, made some changes in a file inside the folder, and watch the magic!
I believe transmit does this.