Mac OS Mac Ports deleted bash (no command line available) [closed] - bash

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I've upgraded my Mac OS, and have been now following these instructions to upgrade my Mac Ports too. After I deleted all installed ports (step 3.c) my terminal app suddenly stopped responding. I've spent quite some time trying to decrypt what's happened, and I now believe that this is because I had /opt/local/bin/bash installed via Mac Ports, and this is now uninstalled ... So, when launching the Terminal or iTerm2 app, the apps simply crash not being able to find bash (I think, it's very difficult to understand any of this from the logs that Mac OS makes avail in the Console app).
So with all this, and command line not working, how can I undo the harm? Was thinking about somehow telling Terminal/iTerm2 to use another shell (for the time until I will have reinstalled bash over Mac Ports)? I assume there's something like ksh installed on my Mac by default? But how would I do that?

Answering Community Wiki because the question is off-topic here.
In Apple's Terminal
Go to Terminal > Preferences > Profiles > Shell; check "Run command"; enter /bin/bash -li; uncheck "Run inside shell"; and then open a new window or tab.
In iTerm2
Go to Profiles -> Open Profiles -> Edit Profiles...; under "Command" change from the default of "Login Shell" to "Custom Shell", and enter /bin/bash.

Related

How to run an app always admin mode in Mac? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
Improve this question
I need to run DBeaver admin mode but instead of running the app via terminal, I need to run via shortcut as admin mode.
So, is it possible in Mac as in Windows?
Yes, you can run the app with sudo(admin mode in your word) permission with the help of the built-in App: Script Editor.
With Script Editor app open, paste this line:
do shell script "open /System/Applications/Stickies.app" user name "YOUR_USER_NAME" password "YOUR_PASSWORD" with administrator privileges
I'm taking the app Stickies.app as an example. Replace it with your own user-mode app
When edit is done, choose Menu -> File -> Export to export it as an Application.
Then you will get an executable "sudo" version of your application at your exported location.
Congrats

Unable to recover my login shell [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm experiencing a problem with my shell (Iterm+zsh).
I had zsh 4.3.1 installed and I was trying to install the 5.0.2 version then, in the middle of the installation process (I was doing it with Homebrew) I closed the Iterm window and then, at the next opening, the window started closing automatically after one/two seconds.
I've tried to log-out and then log-in again but nothing happened.
I've tried to restart my machine and then...nothing!
Iterm keeps starting and then switching off and, after some times, a pop up comes out saying :
" Short-Lived Session Warning " and the Iterm window was displaying login: /usr/local/bin/zsh: No such file or directory.
An other point in favor to my dumbness: I uninstalled the official Terminal app (which occasionally, gives me the ability to, at least, switch to different shell) just before starting to upgrade to zsh 5.0.2.
Now I tried to remove all the zsh files (I know, second dumb move) and I don't know how to switch my login shell back to bash to reinstall properly the updated version of zsh.
Here you can find a link with the code of some of my shell configuration files:
etc/zshenv
etc/zprofile
etc/shells
etc/paths
Users/myusername/.login
https://gist.github.com/omargourari/7587930
Thank you
Create a new iTerm profile which runs something like /bin/bash or /bin/zsh instead of your login shell, then open a window with that profile.

What are these hidden files in my home directory? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
A friend of mine is showing me how to use the shell (on my mac) and I used ls -a to look at all of the files in my home directory and there are a few that I'm wondering if they're garbage.
The ones that seem non-native to the computer (I'm running Mountain Lion)
.cups
.drjava
.nbprofiler
.netbeans
.profile
I googled netbeans (and "cups" unsuccessfully) and it seems like netbeans is an IDE, but I never installed it and it's not on my computer. I'm just curious if some of these files are garbage that piggybacked here on other downloads. Thanks for any knowledge you guys might have of this!
All of the files that you mentioned are part of Mac OS X already. Cups is to manage printers, netbeans is an IDE, drjava is for writing java applications, nbprofiler is to uncover memory leaks, and .profile can be used to set up aliases that act as shortcuts to commands. It is an optional file which tells the system which commands to run when the user whose profile file it is logs in. Hope this helped!

MacVim: How to automatically return to the command line on exit from mvim [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I run mvim from OS X's Terminal.app command line, it brings up the GUI version of Vim. But, when I close the GUI Vim widow (via :q), the window focus is left on the MacVim app (even though there is no open window). This quite annoying, as it means I have to then refocus to the terminal window I ran the app from so I can continue to use the command line.
This is also different from the default way it works in Windows XP and Linux (at least in Ubuntu & RHEL).
I can see maybe some hack ways of doing this - like changing the mvim script to run vim with the "-f" (foreground) option, and then running some Mac command to refocus the Terminal. Anyone have a simple way to do this?

Access Windows VM command prompt from Mac OSX Terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have VMware Fusion 5 installed on my Mac, and have software installed on the Windows partition, that for various reasons, I would like to use via the Mac OSX Terminal rather than going through the VMware Fusion GUI of logging into my Windows VM and running command prompt and then running the software. I would prefer it if Terminal could access the windows command prompt of the vm machine, so that I can run the software from my Mac directly. I am happy to have them/would expect the Mac and Windows machines to be running side by side simultaneously.
Is this possible? I.e. can the Mac OSX Terminal access the VM Windows partition command prompt directly? And if so, how would one do this?
I had considered ssh but that seemed long-winded sending data backwards and forwards via the internet given that it is on a local machine and considered that there must be another/smarter alternative...also wasn't really sure it would work ssh'ing into from a Mac to Windows machine...
p.s. Sorry if SO isn't quite the right forum, and that there isn't quite a reproducible example, but have tried to explain the situation carefully to allow the community to help if possible. But if there is a better way to get a solution to my problem by either migrating or suggesting edits to the question that will make it a better question I would be more than happy to do so.
vmrun is the function that needs to be use used. I found it after a bit more searching...so the following will pretty much do the job...
/Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion -gu <user\ name> -gp <password> runProgramInGuest /Users/<hostUserName>/Library/Application\ Support/VMware\ Fusion/Virtual\ Machines/Boot\ Camp/Boot\ Camp.vmwarevm/Boot\ Camp.vmx -interactive -noWait -activeWindow C:\\Windows\\Notepad.exe C:\\testing.txt
This link is quite useful http://www.vmware.com/pdf/vix162_vmrun_command.pdf

Resources