2019年5月29日 星期三

Hide black console window

Step1: First package according to common procedures

Need pyinstaller
example:
First reach the location of this scripts
cd C:\Python27\Scripts
Then enter

pyinstaller -F D:\Wayne\file.py --distpath D:\Wayne
At this time, the folder will be generated on the desktop. build, dist
There is also a protagonist of "Archive.spec"
Open "Profile.spec" with Notepad
One of them is like this

Exe = EXE(pyz,
          A.scripts,
          A.binaries,
          A.zipfiles,
          A.datas,
          [],
          Name='my file',
          Debug=False,
          Bootloader_ignore_signals=False,
          Strip=False,
          Upx=True,
          Runtime_tmpdir=None,
          Console=True )
Change the console=True to console=False

Step2: Repackageirst

Note that this packaged project is a .spec file.
First reach the location of this scripts

cd C:\Python27\Scripts
Then enter
pyinstaller -F D:\Wayne\file.spec --distpath D:\Wayne

You're done, your file will not have a small black frame when you go down.

2019年5月2日 星期四

Ubuntu server 安裝 teamviewer 和使用 teamviewer

Step1: create a folder to save, download the TeamViewer installation package

mkdir ~/downloads/ 
cd ~/downloads/ 
wget https://download.teamviewer.com/download/teamviewer_i386.deb

Step2: TeamViewer installation package

sudo dpkg -i teamviewer_i386.deb
cd /opt/teamviewer/tv_bin
Teamviewer --setup console #Set the startup mode to console startup
Teamviewer --daemon restart #restart teamview service
Sudo teamviewer --passwd 112358 #Set password
Teamviewer --info #teamview # View id

If you get an error, and the content is as follows:
Sudo apt-get install libdbus-1-3:i386 libasound2:i386 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libjpeg62:i386 libpng12-0:i386 libsm6:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i

Then execute the command:
sudo apt-get update
sudo apt-get install -f

These two commands are fine.
After this, it will not succeed. When you log in, you will get an error. Failed to start session You can use Ctrl + Alt +F1 to enter the command line and login is OK.

 Ubuntu has a mechanism, that is, the installed network card (NIC) will be renamed to another name when the system is booted. Although there...