How do I disable Byobu? - byobu

When I try to disable Byobu on my Mac, all I get is
sed: -e: No such file or directory
What is this error?
I get the same message when I try to disable it from the menu.

Just had this problem myself. I don't know what's happening to cause the sed error, but I was able to disable Byobu on login by opening ~/.zprofile (I use zsh; try ~/.profile if you use bash) and deleting a line that looked like
_byobu_sourced=1 . /opt/homebrew/Cellar/byobu/5.133_1/bin/byobu-launch 2>/dev/null || true

Related

Why does start file in gitbash open the command prompt and not the file?

When i am in my project folder and use the command start index.html it works perfectly and opens up the file in my browser, however, when I use start new\ index.html it opens up the command prompt. Why?
Check first if adding quotes would help, in a git bash session:
start "new\ index.html"
Since it is not working, I tested successfully, after reading "mingw make can't handle spaces in path?", and using cygpath:
start $(cygpath -w -s "new index.html")
With:
cygpath -w -s "new index.html"
NEWIND~1.HTM

-bash: mysql: command not found

I have looked around at other questions that have been posed and they seem to all have the same answer however my issue seems to be unique.
I have installed MySQL to use in an Angular project and have been trying to run mysql -u root -p in order to get things moving but it throws back -bash: mysql: command not found even though I have also done export PATH=${PATH}:/usr/local/mysql/bin inside of my bash_profile.
This seems to be where it ends for a lot of troubleshooting but it seems I have something else wrong. I have tried adjusting the bash profile to where it is just export PATH=${PATH}:/usr/local/mysql just to see if it would work and there wasn't any difference so I changed it back.
My next thought it uninstalling MySQL and reinstalling but I wanted to see if there was a command I am missing.
Thanks for the help!
Turns out all I needed to do was source ~/.bash_profile so it would reload my profile environment.

How to start new process in terminal without kill the one which still running

ex. when i open google-chrome through terminal i can't write command lines anymore, is there a way to start new command line in same terminal window without closing chrome ?
use the & to put the process in the background. e.g.:
open google-chrome &
Or just open another terminal window and run your command

bash.exe: warning: could not find /tmp, please create

why my sublime text giving me warning: bash.exe: warning: could not find /tmp, please create
although it is building and running the code correctly.
Please help me just got irritated by seeing this warning.
I have searched the whole web but i couldn't find any solution
This error message is misleading. At least for me it did not solve the problem after creating /tmp directory. Problem was solved after I killed sh.exe.
To piggyback on Kode Charlie's answer:
Open Start Menu
Type "cmd"
Press Enter
type "bash"
Press Enter
type "mkdir /tmp"
Press Enter
Close the command prompt window
Solved the error for me in Sublime Text 2.
In my case I am using windows. My solution was:
Find "bash.exe" at git folder installation - default is
"C:\Program Files\Git\bin";
Double click bash.exe;
At the command line type: mkdir /tmp
And done.
Try opening a bash-shell, and then:
$ mkdir /tmp
See if that makes the warning go away.
If you're using Git for Windows, just create the directory:
C:\Program Files\Git\tmp
Rebooting Windows fixed it for me.
To add to Necros answer, Not all windows 10 builds even come with bash
https://www.windowscentral.com/how-install-bash-shell-command-line-windows-10
Seems like a harmless error that can be ignored. It also occurs when your /tmp/ is a mount to %TEMP%
C:\Program Files\Git\usr\bin>.\env bash
bash.exe: warning: could not find /tmp, please create!
bash: __git_ps1: command not found
/cygdrive/c/Program Files/Git/usr/bin
So for instance, you may get this error if you have a bash script with a shebang
#!/usr/bin/env bash
Although not SublimeText related, I had this warning when running make.exe from a "Git Bash" environment.
The cause ? Due to search path ordering, a different sh.exe was being executed. (I.e. not in /usr/bin)
$ sh
$ ps -s
4348 pty1 09:48:42 /usr/bin/ps
4836 pty1 09:48:40 /c/Users/Nigel/bin/sh
4400 pty1 09:48:36 /usr/bin/bash
4596 ? 09:48:36 /usr/bin/mintty
4808 ? 09:36:14 /usr/bin/mintty
512 pty0 09:36:14 /usr/bin/bash
After deleting the unwanted left-over C:\Users\Nigel\bin\sh.exe; the warning no longer appears.

How to install MySQL on Leopard, Mac OS X 10.5?

I followed this tutorial to the very end, then found out it didn't work right. I think I have everything installed but when I type
mysql -uroot
I only get
-bash: mysql: command not found
Note: I did not skip the "Setting the Path" step. Upon running this command for the first time:
mate ~/.bash_login
This brought up an empty file. So I added this line:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
I saved the file, closed TextMate, executed the following command:
. ~/.bash_login
...and continued with the tutorial. Based on your suggestions, I thought maybe the file didn't actually get saved. So I ran the following command to bring up the file again:
mate ~/.bash_login
...yet the contents of the file were as they should be.
Any suggestions?
You probably don't have the mysql binaries in your path.
The link you posted has a section on setting the path, titled "Setting the Path Do not skip this step! Most everything else will fail if you do."
EDIT: As debugging steps, try:
First launching a new terminal window. Does it run now?
Typing "echo $PATH" at the prompt. Does the path show up correctly as you've typed it in bash_profile?
Running it the long way: /usr/local/mysql/bin/mysql -u root
Does the application run?
Did you follow the step that says
Setting the Path
Do not skip this step! Most everything
else will fail if you do.
Did you close your terminal window and re-open it afterwards?
Update:
What does "which mysql" say? Does "ls /usr/local/mysql/bin" say?
Two things:
Try editing ~/.profile (rather than ~/.bash_profile or ~/.bash_login).
You may find it easier to use the native Mac style .dmg installer directly from Sun.
One nice thing about the dmg installer is that it automagically sets up symlinks to /usr/local/mysql (which means less - or no - fiddling with your $PATH).
Another option would be to use MAMP.
It has Apache, PHP and MySQL packaged with no further setup necessary.
MySQL is usually put in /usr/local/mysql/bin/
You need to add this to your PATH, you can do this by adding the follwoing lines to your .bash_profile
PATH=$PATH:/usr/local/mysql/bin/
export PATH
The .bash_profile file is located in the root of your username directory.
Make sure you restart your Terminal for the setting to take affect.
And if you're not a command-line person, I highly recommend you also install the MySQL Preference Pane to start/stop the server and install Sequel Pro to create databases and run queries.
ftp://ftp.mysql.com/pub/mysql/download/gui-tools/MySQL.prefPane-leopardfix.zip
http://www.sequelpro.com/