Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

8/19/2025

ติดตั้ง Theme, Icon, เมาส์ Style สำหรับ Linux, Ubuntu, Debain

 

ติดตั้ง Theme, Icon, เมาส์ Style สำหรับ Linux, Ubuntu, Debain
1. ติดตั้ง Program
apt install nala

2. Theme ARC
nala install arc-theme

3. เมาส์ Style
nala install oxygencursors

4. Icon mint และอื่น ๆ
nala install mint-y-icons
nala install papirus-icon-theme

Upgrade Debian 12 To Debian 13

 Upgrade Debian 12 To Debian 13 

ทุกคำสั่งทำใน root
1. ปรับปรุงระบบ Debian 12 ให้สมบูรณ์

apt update
apt upgrade
apt full-upgrade

2. กำจัดแพ็กเกจที่ไม่จำเป็น
apt --purge autoremove
apt autoclean

3. ตรวจสอบว่าแพ็กเกจใดมาจากแหล่งภายนอก (เช่น Chrome, Docker)
sudo apt list '?narrow(?installed, ?not(?origin(Debian)))'


4. เปลี่ยน sources.list ไปใช้ "trixie" และ สำรองไฟล์ repo
mkdir ~/apt-backup
cp /etc/apt/sources.list ~/apt-backup/
cp -r /etc/apt/sources.list.d/ ~/apt-backup/

แก้ไข sources ให้เปลี่ยน bookworm → trixie
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*

ดูใน sources.list จะต้องมี
deb http://deb.debian.org/debian/ trixie main contrib non-free
deb http://security.debian.org/debian-security trixie-security main contrib non-free
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free

5. อัปเดตเป็น Trixie: ขั้นตอนแบบแบ่งเป็นสองส่วน
5.1. Minimal Upgrade ช่วยลดความเสี่ยงจากการติดตั้งแพ็กเกจใหม่ที่ไม่จำเป็นทันที
apt update
apt upgrade --without-new-pkgs
หรือ
5.2. Full Upgrade ยืนยัน (Yes) เมื่อมี prompt ให้รีสตาร์ท Service และเลือกเก็บคอนฟิกเดิมเมื่อถูกถาม
sudo apt full-upgrade --autoremove -y

6. Reboot เครื่อง
7. ตรวจสอบว่ามีการติดตั้ง linux-image-xxx-metapackage หรือไม่
dpkg -l 'linux-image*' | grep ^ii | grep -i meta

ถ้าไม่มี ให้ติดตั้ง linux-image-amd64
apt install linux-image-amd64

8. ทำความสะอาดหลังอัปเกรด
apt autoremove
apt autoclean

9. ตรวจสอบว่าอัปเกรดสำเร็จ
lsb_release -a
หรือ
cat /etc/debian_version


ควรเห็นว่าเป็น Debian 13 (Trixie) หรือดูในโปรแกรม System Info


 

5/15/2025

ปิด auto add printer ใน network เข้า debian auto

 ปิด auto add printer ใน network เข้า debian auto
แนวทางแก้ไข: "ปิด auto-add แต่ยังให้ add เองได้"
คุณสามารถ เปิด cups-browsed แต่สั่งให้มันไม่ auto-add printer ได้ โดยแก้ไฟล์ cups-browsed.conf
1. แก้ไขไฟล์ตั้งค่า:

sudo nano /etc/cups/cups-browsed.conf

2. ค้นหาบรรทัดที่เกี่ยวกับ BrowseRemoteProtocols และ CreateIPPPrinterQueues
ตั้งค่าแบบนี้:
BrowseRemoteProtocols none
CreateIPPPrinterQueues No

ความหมาย:
BrowseRemoteProtocols none: ไม่ต้องค้นหาเครื่องพิมพ์จาก network
CreateIPPPrinterQueues No: ไม่ต้องสร้าง printer queue อัตโนมัติ

3. บันทึกไฟล์ แล้วรีสตาร์ท cups-browsed และ cups
sudo systemctl restart cups-browsed
sudo systemctl restart cups

4. แล้ว Add printer ที่ต้องการใช้งานเอง โดย
connect ผ่าน /run/cups/cups.sock ที่หน้าโปรแกรม Printer