Summary of various ubuntu problems

1. Minimize on click

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

2. Install pycharm

sudo snap install pycharm-professional --classic

ModuleNotFoundError: No module named 'distutils.core'It may be the reason why the python interpreter was not found

3. Failed to load module "canberra-gtk-module", Failed to load module "xx-gtk3-module"

sudo apt-get install libcanberra-gtk-module
sudo apt-get install xx-gtk2-module

4. Solve some problems after uninstalling python on Ubuntu###

There is only one desktop after entering the system, the solution:
Press ctrl+alt+f1 enters the console
After logging in, enter sudo apt-get install ubuntu-minimal ubuntu-standard ubuntu-desktop, press enter
Wait for the installation to end and restart, the problem is solved

5. Virtual Environment Management###

pip3 install virtualenv virtualenvwrapper(Virtual Environment Manager)
Create one in your account directory.virtualenvs folder to store virtual environments
virtualenwrapper needs to be added to environment variables

# virtualenv
export WORKON_HOME=/home/rottengeek/.virtualenvs
source /home/rottengeek/.local/bin/virtualenvwrapper.sh

//Then you can create a virtual environment
mkvirtualenv directory name
mkvirtualenv directory name-p /usr/bin/python2
Exit deactivate
Delete can be deleted directly to the directory

6. command 'sudo' is available in '/usr/bin/sudo'

First check echo$PATH
Then add the path export PATH=$PATH:/usr/bin

7. Install pip

sudo apt-get install pip
sudo apt-get install python3-pip

8. There is no password prompt for mysql5.7 installation###

1、 Enter configuration file view

sudo vi /etc/mysql/debian.cnf

display:
# Automatically generated for Debian scripts. DO NOT TOUCH![client]
host = localhost
user = debian-sys-maint
password = fPw**********22
socket =/var/run/mysqld/mysqld.sock
[ mysql_upgrade]
host = localhost
user = debian-sys-maint
password =fPw**********22
socket =/var/run/mysqld/mysqld.sock

2、 Find the user name: debian-sys-maint password: fPw**22 (random secret key)

3、 To exit, press Esc and enter ":q!"

*4、 Enter *mysql as user debian-sys-maint

mysql -u debian-sys-maint -p

5、 Enter password: Enter the password you just found

6、 After entering mysql, start to set the root user password

mysql>update mysql.user set authentication_string=PASSWORD(“123456″) where User=’root’;

Change the root password, and then appear
Query OK,1 row affected,1warning(0.00 sec)

Rows matched:1  Changed:1  Warnings:1

7、 Resolve warning issues

mysql> update mysql.user set plugin='mysql_native_password';

appear
Rows matched:4  Changed:1  Warnings:0

8、 Update all permissions and exit

mysql> flush privileges;
mysql> quit;

9、 Restart MySQL and log in

service mysql restart
mysql -u root -p

9. Install WeChat

# Download the latest version of tar.gz compressed package https://github.com/geeeeeeeeek/electronic-wechat/releases/download/V2.0/linux-x64.tar.gz
wget https://github.com/geeeeeeeeek/electronic-wechat/releases/download/V2.0/linux-x64.tar.gz
# Unzip the compressed package
sudo tar zxvf linux-x64.tar.gz
# Put the unzipped folder in/under opt
sudo mv electronic-wechat-linux-x64//opt/electronic-wechat-linux-x64
# Create a quick start command under the terminal
sudo ln -s /opt/electronic-wechat-linux-x64/electronic-wechat /usr/bin/electronic-wechat
# Quick launch icon created under Dash Home
sudo vi /usr/share/applications/electronic-wechat.desktop

# Add the following content
[ Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Electronic WeChat
# Put a WeChat png icon in the resources directory by yourself
Icon=/opt/electronic-wechat/resources/electronic-wechat.png
Exec=/opt/electronic-wechat-linux-x64/electronic-wechat
StartupNotify=false
StartupWMClass=electronic-wechat
OnlyShowIn=Unity;
X-UnityGenerated=true

Recommended Posts

Summary of various ubuntu problems
Summary of ubuntu usage
Summary of Ubuntu commonly used commands
ubuntu16.04 security summary-01
Summary of methods to use Evernote under Ubuntu 14.04
Summary of Ubuntu system and privacy cleaning tools
3D effect of ubuntu
ufw of ubuntu firewall rules
Initial setup of Ubuntu 16.04 server
Summary of logarithm method in Python
Detailed explanation of ubuntu using gpg2
Installation of deb package under Ubuntu
Overview of the Ubuntu file system
[Linux] Some high-efficiency tools of Ubuntu
A summary of 200 Python standard libraries!
Coexistence of CUDA8.0 and CUDA9.0 under Ubuntu 16.04