Mac Change the name of mac application

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
How do i change the name of an application?
I tried changing the name in right click and "show info", but it would not open then. I also read somewhere online to open the plist file in package contents and change the bundle name, but that does not work either, that makes the application crash.

So how do one go about to change the name, that does not sound as it should be so hard, but maybe it is.
 

chabig

macrumors 603
Sep 6, 2002
6,060
3,296
You can change the name in the Finder the same way you'd change the name of any file.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
You can change the name in the Finder the same way you'd change the name of any file.
No, if i change the name through finder the application is not opening, nothing happens when i double click on the application then.
 

chabig

macrumors 603
Sep 6, 2002
6,060
3,296
Then you're probably dealing with a poorly coded app. Most apps don't care what they are called. You might need to speak to the developer about it.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
Then you're probably dealing with a poorly coded app. Most apps don't care what they are called. You might need to speak to the developer about it.
Oh okay, so there is no other way to change the name that could work?
 

chabig

macrumors 603
Sep 6, 2002
6,060
3,296
That's my guess. If it doesn't run when you change the name, there is nothing you can do about it. The developer probably hard coded the name somewhere and it breaks when you change it.

You can always create an alias to the application, name if anything you want, and pretend that it is the app.
 

Red Menace

macrumors 6502
May 29, 2011
390
52
Littleton, Colorado, USA
What exactly is the application? The name of a normal Cocoa application bundle can be changed like any other file, but if you are messing with the Info.plist all bets are off, as that sets up application properties.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
What exactly is the application? The name of a normal Cocoa application bundle can be changed like any other file, but if you are messing with the Info.plist all bets are off, as that sets up application properties.
Well i´m trying to help a friend changing the name of an application she has on her mac which is called secret folder and which makes files invisible, we wanted to change the name since the current application name gives a clue about the computer having hidden/secret files.

When changing the name through finder only nothing at all happens when double clicking on the Application, but when changing the bundle name in Xcode and then double clicking the application it does not open either but it throws the error message saying that the application has quit unexpectedly.

Anyways, so she was thinking better if the application can be named something else?
 

Red Menace

macrumors 6502
May 29, 2011
390
52
Littleton, Colorado, USA
You don't need an application to make files invisible, although trying to hide stuff won't work against anyone that knows their way around the command line.

You shouldn't be doing anything with items in the application bundle, as that can break it. Is this just a helper app for another application (e.g. a related application that calls the one you are trying to rename)?
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
You don't need an application to make files invisible, although trying to hide stuff won't work against anyone that knows their way around the command line.

You shouldn't be doing anything with items in the application bundle, as that can break it. Is this just a helper app for another application (e.g. a related application that calls the one you are trying to rename)?
Well it´s mainly to protect against the average layman person, not against the computer savvy person.

The software keeps the files in one place so to speak, or actually the hidden files are scattered everywhere on the computer but the software shows the locations of the hidden files and you can easily toggle between visibility and hidden, also a password can be set in order to open the application.
Now as far as i know it´s an actual application, but i can be wrong? It´s purchased from the Appstore, so it´s available there.
 

casperes1996

macrumors 601
Jan 26, 2014
4,098
1,995
Horsens, Denmark
Now as far as i know it´s an actual application, but i can be wrong? It´s purchased from the Appstore, so it´s available there.
It may very well be, but the functionality can be replicated entirely without writing an app. I think you might be able to create an Automator Workflow that does this exact thing, or at the very least a bash-script.

Unless you're willing to roll your own or can get someone to do it for you either for free or with a small bribe so to speak, I recommend contacting the 'app' developer about making the tool not care about its name
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
It may very well be, but the functionality can be replicated entirely without writing an app. I think you might be able to create an Automator Workflow that does this exact thing, or at the very least a bash-script.

Unless you're willing to roll your own or can get someone to do it for you either for free or with a small bribe so to speak, I recommend contacting the 'app' developer about making the tool not care about its name
Yeah i might contact him, although my first thought was that he doesn´t want to give instructions how to alter his application, even if it´s only the name?
I don´t know how app developers generally look at those kind of things?

I´m not a mac guru, although i have a bit more knowledge than my friend, so i don´t know if i could easily help her with the bash-script or the Automator workflow solution, probably not?
 

casperes1996

macrumors 601
Jan 26, 2014
4,098
1,995
Horsens, Denmark
Yeah i might contact him, although my first thought was that he doesn´t want to give instructions how to alter his application, even if it´s only the name?
I don´t know how app developers generally look at those kind of things?
Changing the name, assuming a well behaved app, is not altering the app at all. It is just a label that points to the inode of the data/code of the program. With .app bundles that's even more so the case, since a .app is just a container format, and the actual binary would maintain the same name within it.
No reasonable developer would care, and would see it as a bug in their code if you can't change the name of the app.

I´m not a mac guru, although i have a bit more knowledge than my friend, so i don´t know if i could easily help her with the bash-script or the Automator workflow solution, probably not?
For Bash; Do you know about chflags, how filenames starting with a . are handled, echo'ing to a file, reading from a file and creating bash-scripts? You don't really need more than that. When the program is run with a file as input, set its chflag to hidden and write the path to another hidden file that's always stored the same place. When the user wants a list of hidden files, retrieve the text file with the paths and present it. If run with a path from the list set unhidden as the chflag.

For Automator; Just open up Automator and have a look through it to see if there are any functions that'd fit the need. This could likely even end up having a nice easy to use GUI.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
Changing the name, assuming a well behaved app, is not altering the app at all. It is just a label that points to the inode of the data/code of the program. With .app bundles that's even more so the case, since a .app is just a container format, and the actual binary would maintain the same name within it.
No reasonable developer would care, and would see it as a bug in their code if you can't change the name of the app.



For Bash; Do you know about chflags, how filenames starting with a . are handled, echo'ing to a file, reading from a file and creating bash-scripts? You don't really need more than that. When the program is run with a file as input, set its chflag to hidden and write the path to another hidden file that's always stored the same place. When the user wants a list of hidden files, retrieve the text file with the paths and present it. If run with a path from the list set unhidden as the chflag.

For Automator; Just open up Automator and have a look through it to see if there are any functions that'd fit the need. This could likely even end up having a nice easy to use GUI.
Thanks, yes i will have check those things out to try to get a solution.
 

mfram

macrumors 65816
Jan 23, 2010
1,056
138
San Diego, CA USA
Standard behavior in XCode is to sign applications. When applications are signed, you can't change their contents (like the name) or they won't run. That's probably why it doesn't work when you try to change things inside the .app folder.
 

casperes1996

macrumors 601
Jan 26, 2014
4,098
1,995
Horsens, Denmark
Standard behavior in XCode is to sign applications. When applications are signed, you can't change their contents (like the name) or they won't run. That's probably why it doesn't work when you try to change things inside the .app folder.
As far as I've gathered though, he didn't just try changing things inside the .app container, but the name of the .app container itself, which as far as I'm aware shouldn't be a problem. The signing shouldn't depend on the name of the .app packaging. Fair enough of a hash of the actual binary's name is used from within the .app package, but the name of the .app package should not be involved in the signature.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
Yes i tried both to change the name from finder, but also to change the bundle name in the plist file through xcode, but none of the methods works.
So are you saying that should normally not be a problem and that this application is poorly coded?

When we first started out trying to change the name we had no idea that it should be a problem or that it would be a hard thing to do, it sounds as such an easy thing to do. But i guess we compared it to how easy it is to change the name of a file or folder in MacOS X.

So is there any other easy solution for this problem (the bash script sounds a bit too complicated for me, maybe it isn´t though?)
Maybe hide the whole application icon or something like that (make it invisible), without scripts etc.?
 

casperes1996

macrumors 601
Jan 26, 2014
4,098
1,995
Horsens, Denmark
So are you saying that should normally not be a problem and that this application is poorly coded?
Well, normally you can change the name of the app no problem. An admin password may be needed, but no problem.
I don't feel comfortable making a blanket statement that it's been coded badly though. Just that the programmer behind it made some assumptions that he/she probably shouldn't have. Most programs are full of assumptions though and whilst they should generally be avoided to allow the software to be more flexible, we sometimes just forget to consider that something we expect to be a certain way, may not always be that way.

When we first started out trying to change the name we had no idea that it should be a problem or that it would be a hard thing to do, it sounds as such an easy thing to do. But i guess we compared it to how easy it is to change the name of a file or folder in MacOS X.
Well it usually is just like changing the name of a file.

So is there any other easy solution for this problem (the bash script sounds a bit too complicated for me, maybe it isn´t though?)
Maybe hide the whole application icon or something like that (make it invisible), without scripts etc.?
Sooo. Your friend who'll use the program isn't so technical I take it? The easiest approach would be to hide the program and then launch it via Terminal, but I don't think he/she would feel at home launching the program through a command line interface, so I suggest symlinking to the file first, then hiding it and then changing the name of the symlink.

Start off by alt-clicking the app and selecting "Make Alias" or whatever it's called. Create Alias maybe. Name this "copy" whatever you want. Remember, this is not a duplicate - it's a symlink. It's like a shortcut, so if the original is deleted the link won't work either.
Now open Terminal, and write "chflags hidden [PATH TO APP]" replace the path to the app with, well, the path to the original app. Now the app is hidden and you have a symbolic link that you should be able to name anything that then refers back to the hidden .app

If your friend ever wants to delete the app, deleting the alias is not enough. It only removes the "shortcut". You'll need to run chflags unhidden on the path to the file to make it visible again, or delete it directly through Terminal with rm.
 

MacUse-R

macrumors regular
Original poster
Dec 24, 2017
152
18
Well, normally you can change the name of the app no problem. An admin password may be needed, but no problem.
I don't feel comfortable making a blanket statement that it's been coded badly though. Just that the programmer behind it made some assumptions that he/she probably shouldn't have. Most programs are full of assumptions though and whilst they should generally be avoided to allow the software to be more flexible, we sometimes just forget to consider that something we expect to be a certain way, may not always be that way.



Well it usually is just like changing the name of a file.



Sooo. Your friend who'll use the program isn't so technical I take it? The easiest approach would be to hide the program and then launch it via Terminal, but I don't think he/she would feel at home launching the program through a command line interface, so I suggest symlinking to the file first, then hiding it and then changing the name of the symlink.

Start off by alt-clicking the app and selecting "Make Alias" or whatever it's called. Create Alias maybe. Name this "copy" whatever you want. Remember, this is not a duplicate - it's a symlink. It's like a shortcut, so if the original is deleted the link won't work either.
Now open Terminal, and write "chflags hidden [PATH TO APP]" replace the path to the app with, well, the path to the original app. Now the app is hidden and you have a symbolic link that you should be able to name anything that then refers back to the hidden .app

If your friend ever wants to delete the app, deleting the alias is not enough. It only removes the "shortcut". You'll need to run chflags unhidden on the path to the file to make it visible again, or delete it directly through Terminal with rm.
Thanks, we will try your solution.