I want to run this command:
chcp.com 1253
permantly in msys2 terminal.
I don't want to write this command every time a msys2 mingw 64 terminal is open.
Χρήστος Παππάς#DESKTOP-8T1C1VF MINGW64 ~
$ cd /c/Users/Χρήστος\ Παππάς/Desktop/
Χρήστος Παππάς#DESKTOP-8T1C1VF MINGW64 /c/Users/Χρήστος Παππάς/Desktop
$ python ελληνικά.py
▒▒▒▒▒▒▒▒
Χρήστος Παππάς#DESKTOP-8T1C1VF MINGW64 /c/Users/Χρήστος Παππάς/Desktop
$ chcp.com 1253
Active code page: 1253
Χρήστος Παππάς#DESKTOP-8T1C1VF MINGW64 /c/Users/Χρήστος Παππάς/Desktop
$ python ελληνικά.py
Εληννικά
Χρήστος Παππάς#DESKTOP-8T1C1VF MINGW64 /c/Users/Χρήστος Παππάς/Desktop
$
Thanks in advance,
Chris Pappas
Run vim ~/.bashsrc
Press I key (goes from read mode to insert mode for edit the file)
Move at the bottom of the file and type chcp.com 1253
Then press Esc, w key, q key, ! key and press Enter
That's it.
Every time I open the msys console i see something like:
Active code page: 1253
Χρήστος Παππάς#DESKTOP-8T1C1VF MSYS /c/Users/Χρήστος Παππάς/Documents/projects/Papinhio player
Related
I was trying to install a plug-in "vim-surround" but it doesn't work after executing the following commands on my terminal.
$ mkdir -p ~/.vim/pack/tpope/start
$ cd ~/.vim/pack/tpope/start
$ git clone https://tpope.io/vim/surround.git
$ vim -u NONE -c "helptags surround/doc" -c q
I'm new to Vim and I was wondering if there's more to just typing those commands on the terminal? Do I have to add some lines on the config file to make it work?
Thank you in advance.
During an attempt to remove zsh from Ubuntu running on WSL, I ran:
sudo apt-get --purge remove zsh
Foolishly, I did not reset my default shell, so I cannot access WSL. The windows flashes open and then closes.
I can see from powershell that all of my files in WSL are still available, but I do not know how to reset the default shell in WSL from Powershell.
How can I reinstall bash or zsh from Powershell?
So I figured this out. From an 'elevated' powershell I executed the following commands:
cd \wsl$<distro name>
wsl -e bash
sudo vipw
From there, I went to /etc/passwd and changed the shell on my username to bash.
When i try to install mupdf-tools, it won't install mudraw.
If i type in terminal "dpkg -L mupdf-tools" i get the following output:
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mupdf-tools
/usr/share/doc/mupdf-tools/README
/usr/share/doc/mupdf-tools/copyright
/usr/share/doc/mupdf-tools/changelog.Debian.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/mutool.1.gz
/usr/bin
/usr/bin/mutool
As can be seen, mudraw don't appear in the list.
How can i fix this so i will have mudraw?
I'm using ubuntu.
You've not said which version of ubuntu or which version of the mupdf-tools package.
Ubuntu 15.10 (Wily) contains mupdf-tools package 1.7-1, and that contains mudraw:
# dpkg -l mupdf-tools
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================-===================-===================-=============================================================
ii mupdf-tools 1.7-1 i386 commmand line tools for the MuPDF viewer
# dpkg -L mupdf-tools
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mupdf-tools
/usr/share/doc/mupdf-tools/README
/usr/share/doc/mupdf-tools/changelog.Debian.gz
/usr/share/doc/mupdf-tools/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/mudraw.1.gz
/usr/share/man/man1/mutool.1.gz
/usr/bin
/usr/bin/mutool
/usr/bin/mudraw
For mupdf 1.8 or later, mudraw is now invoked via 'mutool draw' and there is no separate mudraw binary.
Because compatibility issue, I was to mantain the mudraw command temporally in Ubuntu 17.04.
My solution: create a bash file named "mudraw" that performs "mutool draw":
$ echo '#!/bin/sh' >> mudraw
$ echo 'mutool draw "$#"' >> mudraw
$ chmod +755 mudraw
$ sudo mv mudraw /usr/bin
$ mudraw -v
I have installed MPI and GCC seperatly using yum commands,
And now when I use following command:
mpic++ first.c -o first
it says:
bash: mpic++: command not found
Can somebody please help me? I will be very thankful.
Background: I am using centos 6.5, and i am new on linux, however I have good understanding of terminal.
Mpi environment is controlled by module in CentOS so you first have to load the mpi/openmpi-x86_64 module:
module load mpi/openmpi-x86_64
In my case (Centos 7.5) the module command was not available, so I just needed to add the MPI executables to my path.
I found their location by looking at the output of this command:
rpmquery -l openmpi-devel | grep cc
And then added the following to my path:
export PATH=$PATH:/usr/lib64/openmpi/bin/
See it: https://courses.cs.washington.edu/courses/csep524/13wi/mpi/mpi_setup.txt
I also install mpi from yum, but it can't help me. I use:
download mpich
cd
wget http://www.mpich.org/static/tarballs/3.0.2/mpich-3.0.2.tar.gz
tar xzf mpich-3.0.2.tar.gz
build mpich and install in home (can also see mpich-3.0.2/README)
cd mpich-3.0.2
./configure --prefix=$HOME/mpich-install 2>&1 | tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt
put mpi binaries (e.g. mpicc, mpirun) on your PATH
add the following line to your ~/.bashrc:
export PATH=$PATH:~/mpich-install/bin
source ~/.bashrc
compile hello world:
mpicc helloworld.c -o helloworld
I get: cc: error: helloworld.c: No such file or director
I am having trouble accessing Coda from command-line. I installed the "command-line coda" plug-in, verified that my installation is in the correct location, yet I still can seem to access Coda. Coda sits in my "Applications" folder which is the default location for the plug-in.
Anyone have have this problem? Any tips? On the their site it is recommended that you change the path.
export CODEPATH=/Applications/Coda.app
So I included the above line in my .bash_profile which did not help.
$ Coda -v
-bash: Coda: command not found
Thanks for any direction you can provide.
The default way to open an application on a Mac is to use open -a AppName so you should be able to change your bash profile to use that:
$ open -a Coda
I've created a bash script (as opposed to using the plugin) that Gregory Tomlinson originally posted about (it looks like he's since taken it down but it looks like the following).
Create a new file in /bin called coda:
$ cd /bin
$ sudo touch coda
$ vim coda
Hit an i to enter insert mode. Then include the following code:
#! /bin/bash
if [ "$1" = "" ]; then
echo "Please specify a file to open or create"
exit 0
else
for ARG in $*
do
touch -a $ARG && open -a Coda $ARG
done
exit 0
fi
Save and quit (hit the esc to exit insert mode then type :w !sudo tee % >/dev/null followed by the return key, press L for load when prompted, then type :q to quit). Then give that file execute permissions:
$ chmod u+x coda
Start a new Terminal window and you should be able to use:
$ coda filename.foo
Or just:
$ coda
For some strange reason, my paid registered Coda 2 app just wouldn't open for me this morning. I found this terminal command that worked for me:
open -a Coda\ 2
You can also put the following in your ~/.bash_profile file:
alias coda='open -a "Coda 2"'
I had a similar problem. After installing the plug-in, I still couldn't launch coda from the command line. I took a closer look at /user/local/bin and somehow the permissions had gotten reset so I didn't have execute permissions for /user/local/bin.
I updated my permissions with:
sudo chmod o=rx,g=rx /usr/local/bin
This solved my problem. However, Coda won't launch if the specified file does not exist, which makes it hard to create a file from the command line.