Window name shows the current directory path. If we rename the window name, then whenever we change a path in that window, the name always reverts back to the current directory path.
I tried updating set-window-option -g automatic-rename on to set-window-option -g automatic-rename off in /usr/share/byobu/profile/tmux with no effect.
It looks like the config set-window-option -g automatic-rename off
doesn't work. When I added the following configuration:
set-option -g allow-rename off
in /usr/share/byobu/profiles/tmux, automatic renaming was turned off.
Related
My $PATH comes up as:
/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
I'm not sure how this happened but how do I change it back to the default PATH?
What is your system?
Ubuntu default path is
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
if you want to change this back to the default, you need to opne your .bashrc file on your home and change it in there:
vim ~/.bashrc
I created a user environment variable name: teamf and its value as C:\Program Files\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\
This is working since from run I can open the folder by merely typing %teamf%
Now I want to change the directory from root to to this folder location in command prompt (cmd). How can I do that? I have tried:
%teamf% cd teamf
but I get errors (see attached image please)
This should do it:
CD "%teamf%"
I'm new to tmux and trying to understand it's configuration. I've started with looking at some pre-existing .tmux.conf files and whatever documentation I can find but it still leaves me wondering about the flags. I've seen the following so far:
A few examples from the ArchWiki entry on tmux
set -g prefix C-a
set -ga terminal-overrides ",xterm-termite:Tc"
set-option -g xterm-keys on
And one line from a .tmux.conf file
set-window-option -g
What do the flags mean and are there any particular cases when one flag one flag is preferable over another?
set is the alias of set-option.
set -g is used to set global options and -ga appends values to existing settings.
From Tmux's man page:
With -a, and if the option expects a string or a style, value is
appended to the existing setting. For example:
set -g status-left "foo"
set -ag status-left "bar"
Will result in ‘foobar’. And:
set -g status-style "bg=red"
set -ag status-style "fg=blue"
Will result in a red background and blue foreground. Without -a, the
result would be the default background and a blue foreground.
set-window-option (alias setw) is used to configure window options (allow-rename, mode-keys, synchronize-panes, etc.) and the same flag options are available.
See:
https://linux.die.net/man/1/tmux
https://superuser.com/questions/758843/difference-between-global-server-session-and-window-options
I'm using this article as a source to get me half way there, but I cannot figure out how to run supervisor with a custom config file path.
When I want to run supervisor manually, I just do:
supervisord -c /home/test/_app/supervisord.conf
When I implemented the auto start up script, it runs the default supervisor config file which is located in /etc/ directory. I don't want to use that one because it separates it from the core project folder and makes it hard to maintain and keep track of.
Try this:
In /etc/rc.d/init.d/supervisord, add prog_opts variable like this:
prog_opts=" -c /home/test/_app/supervisord.conf"
prog_bin="${exec_prefix}/bin/supervisord"
Then in start() function, change the call to:
daemon $prog_bin --pidfile $PIDFILE -- $prog_opts
I was able to fix this issue by simply deleting the default supervisord.conf file and then making a sym link with that default location and my custom conf file path.
On OS X Mountain Lion The source command only seems to update my path when I have added something to it in .bashrc or .bash_profile. If I delete a path from either of these files, then use source to update, the deleted path remains. An example...
Adding to my PATH in .bash_profile
In terminal
> echo $PATH
> "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
Add to path in .bash_profile
export PATH=$PATH:~/Desktop
Back in terminal
> source .bash_profile
> echo $PATH
> "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myname/Desktop"
So, all that went as expected; my Desktop has been added to my PATH. Now after I delete the previously added path from .bash_profile, leaving this file empty
> source .bash_profile
> echo $PATH
> "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myname/Desktop"
As you can see the 'deleted' path '/Users/myname/Desktop' remains. Am I misunderstanding what
source does? I thought It was equivalent to opening a new terminal window (which does return
the result I was expecting - i.e. no Desktop path)
When you use source .bash_profile first time, because of export PATH=$PATH:~/Desktop line from .bash_profile file, your PATH is reassigned to old PATH to which is added ~/Desktop directory.
When you use source .bash_profile second time, the PATH is not anymore reassigned because you delete export PATH=$PATH:~/Desktop line. So, this time the value of your PATH remains unchanged (like before).
You have to restart your terminal (current shell) if you want that the value of your PATH to return to its initial value. Or you can source your /etc/environment file:
source /etc/environment