Ubuntu 管理心得

搜尋此網誌

2022年9月9日 星期五

table uppercase capitalized

 Put \def\tablename{TABLE} in front of Table, e.g.

 

Then the output is 


2022年8月27日 星期六

wake on lan ubuntu

 cf: https://necromuralist.github.io/posts/enabling-wake-on-lan/

  1. Use ip a to find ether device, e.g. enp2s0
  2. sudo ethtool --change enp3s0 wol g
  3. Check with: sudo ethtool enp3s0| grep Wake
    Supports Wake-on: pg
    Wake-on: g
  4. If Wake-on: d then it does not work. It should be Wake-on: g.

 

2022年8月13日 星期六

grub command line boot windows 10

 

insmod part_gpt
insmod chain
set root=(hd0,gpt1)
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
 

2022年7月15日 星期五

Single click desktop icons

Open nemo, 編輯 -> 偏好設定 -> 行為 -> 單擊以開啟項目


2022年7月12日 星期二

Octave plot and print with latex code

#Maybe need to do this first:
#sudo ln -s /usr/bin/latex /usr/local/bin

x = 1:10;
plot (x, x.^2)
title ("$x^2$", "interpreter", "latex")
print -svgconvert 'test_latex.pdf'

2022年6月28日 星期二

Set mail.au.edu.tw as email server

 The username should be au4051 or au4051@mail.au.edu rather than chiao@mail.au.edu.tw.

drupal smtp server settings

 


2022年6月22日 星期三

2022年6月19日 星期日

firefox desktop icon

 /snap/firefox/current/default256.png

2022年6月17日 星期五

dynamic wallpaper background

  1. sudo apt install mcron
  2. Create a script, say /home/chiao/scripts/dynwall:
    #!/bin/bash
    sleep 3
    IMG=`find  /home/chiao/圖片/wallpaper/dawn/*.jpg | shuf -n 1`
    gsettings set org.gnome.desktop.background picture-options 'stretched'
    /usr/bin/gsettings set org.gnome.desktop.background picture-uri file:///${IMG}
  3. Create /home/chiao/.config/cron/job.vixie
    5 * * * * /home/chiao/scripts/dynwall
  4. Create /home/chiao/.config/autostart/mcron.desktop
    [Desktop Entry]
    Type=Application
    Exec=/usr/bin/mcron -d
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name[zh_TW]=mcron
    Name=mcron
    Comment[zh_TW]=
    Comment=
  5. Reboot

2022年6月12日 星期日

Disable motion service

sudo update-rc.d motion disable
 

Missing figure caption

 While making pdf inside kile for book_chapterxx.tex for my /home/chiao/QuantitativeProgramming/LectureNotes/chapter11/ lecture note. The LaTeX src file exported from Jupyter cannot show the figure title.

 To fix this: comment out (put %) the 36th and 37th lines in book_chapter11.tex, e.g.

 %\DeclareCaptionFormat{nocaption}{}
 %\captionsetup{format=nocaption,aboveskip=0pt,belowskip=0pt}

The figure cation shows up now.

2022年6月8日 星期三

Add utf-8 in case of Chinese cannot be read by Python IDLE

Put the lines at the first:

#!/usr/bin/env python
# coding: utf-8

2022年5月18日 星期三

中文節名 section 亂碼

在 hyperref 前加上 unicode option, e.g

 \usepackage[unicode,pdftex]{hyperref}

cf: https://www.twblogs.net/a/5e4f26dcbd9eee101df702ee

2022年5月12日 星期四

Disable Spyder help hover

Tools > Preferences > Completion and linting > Introspection

Deactivate the option: "Enable hover hints"

2022年5月11日 星期三

Boshiamy for ibus cache and restart

  1. Use vim to edit liu_LA.txt. DO NOT use kate.
    Make sure press tab following the Chinese chars, e.g.

    elm     基本矩陣        100
     
  2. ibus-table-createdb -s liu_LA.txt -n liu_LA.db 
  3. sudo cp -f liu_LA.db /usr/share/ibus-table/tables/ 
  4. /bin/rm -rf ~/.local/share/ibus-table ~/.config/ibus ~/.cache/ibus ~/.cache/ibus-table
  5. Run ibus-setup to delete 嘸蝦米:
  6. Then, logout and login (It needs to do this!)


2022年5月4日 星期三

ubuntu 22.04 need php fpm

 Otherwise, the html lines inside php file would have error.

sudo apt install php8.1-fpm
sudo a2enconf php8.1-fpm
sudo systemctl reload apache2

clonezilla to small disk

Expert mode: 

  1. select -icds
  2. select -k1 (next window)

2022年5月2日 星期一

Array and string offset access syntax with curly braces is no longer supported

cd /usr/share/php/Spreadsheet/Excel/Writer/
Edit Parser.php, change all $xxx{yyy} to $xxx[yyy]
Inside vim, search, eq, $col_ss{$i}, using this
/\$.*{.*}
then relplace { and } with [ and ], using 
qqf{r[f}r]
then / -> enter -> @q

cd /usr/share/php
Edit OLE.php, change all $xxx{yyy} to $xxx[yyy]

網誌存檔