[CentOS7][setting] after install
7 月 29
GUI遠端桌面(RDP協定)
yum install xrdp
yum groupinstall “Desktop” “Xfce”
增加倉頡
http://oldgrayduck.blogspot.tw/2016/12/centos7.html
add display resolution in the list
隨手筆記
7 月 29
GUI遠端桌面(RDP協定)
yum install xrdp
yum groupinstall “Desktop” “Xfce”
增加倉頡
http://oldgrayduck.blogspot.tw/2016/12/centos7.html
add display resolution in the list
7 月 19
環境
1. 目錄 01-src 為資料來源
2. 目錄 02-dst 為資料備份
3. 目錄 03-bak 為備份過程中, 因備份動作產生的增刪檔案暫存區
情境一
[說明] 當 01-src 裡面有檔案被刪除時, 02-dst 在備份時也跟著要刪除同一檔案時, 會將被刪除的檔案, 利動到 03-bak
[指令]
rsync -av --delete ./01-src/ ./02-dst --backup --backup-dir=../03-bak
[結論] backup-dir 若不特別指定路徑的話, 就會被02-dst這個目錄做為當前目錄, 以我們的範例而言, 就是要用兩個點來退到上一層目錄去
7 月 13
REF: https://askubuntu.com/questions/760952/slow-shutdown-on-ubuntu-16-04-lts-stopping-thermal-daemon-running-fit-make-remo
I have got the same Problem. It occurred after clean install Ubuntu 16.04. Finally I figured out, after lots of troubleshooting, that (after disable the Ubuntu boot splash screen) a certain stop-job was running that made the shutdown slow. (Thanks to Alex!) Then I got this error report:
a stop job is running for make remote cups printers available locally
Then I tried this:
sudo systemctl stop cups-browsed.service sudo systemctl disable cups-browsed.service
To verify:
sudo systemctl status cups-browsed sudo systemctl is-enabled cups-browsed
and it finally worked! Shutdown was now as good and fast as ever. (You can find this troubleshooting on: “The Annoying Cups Browsed” at the ec-cwang´s Blog!)
6 月 29
PyDev.nic.twbbs.org
Installed CentOS 7 (64bit) mini-install
log:
yum update -y ; yum upgpgrade -y yum install vim
REF:https://www.liquidweb.com/kb/how-to-install-pip-on-centos-7/
Step #1: Add the EPEL Repository
yum install epel-release yum -y update ; yum -y install python-pip pip install mechanize pip install --upgrade pip
建立一個以python自動登入的小程式
REF: https://blog.ephrain.net/webpython-%E4%BD%BF%E7%94%A8-mechanize-%E8%87%AA%E5%8B%95%E7%99%BB%E5%85%A5%E7%B6%B2%E7%AB%99-/
# codning: UTF-8 import mechanize br = mechanize.Browser() br.set_handle_robots(False) br.set_debug_http(True) br.set_debug_responses(True) br.set_debug_redirects(True) # Add br.addheaders = [("Accept-Language", "zh-TW,zh;q=0.8")] # Add User-Agent br.addheaders = [("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.11 5 Safari/537.36")] # Browse to login page #br.open('https://login.yahoo.com/config/login') #br.open('https://nm.udn.twbbs.org/cacti/') #br.open('https://member.pixnet.cc/login/verify') br.open('https://shopping.udn.com/mall/cus/meb/Cc1m02.inw?dc_btn_0=Func_Logon_QuickView') # Select login form #br.select_form(nr=0) br.select_form(nr=0) # Fill in username and password, submit br["dc_email_0"] = "joe.chc@udngroup.com" br["dc_pswd_0"] = "uIM106Joe" br.submit() print("#####################################################") links = br.links() print(links) member_center = [l for l in br.links() if l.url.startswith("https://shopping.udn.com/mall/cus/meb/Cc1m05")][0] # Browse to memberpage br.follow_link(member_center) webcontent = br.response().get_data() print(webcontent) #webcontent = br.response().get_data() #print(webcontent) ## Find out the link to mail #link_mail = [l for l in br.links() if l.url.startswith("http://mail.yahoo.com")][0] ## Browse to mail page #br.follow_link(link_mail) #with open("output.htm", "w") as f: #f.write(br.response().get_data())