Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

วิธีติดตั้ง Microsoft Office บน Linux ด้วย WinApps

Linux มีผู้ใช้จำนวนหนึ่ง ถ้าคุณใช้ Linux และอยากรันแอปพลิเคชัน Windows บนมัน โปรเจกต์ล่าบน Github ชื่อ WinApps สนใจมาก ใช้งาน Microsoft Office apps และ Adobe Apps รู้สึกเหมือน Native แม้จริงๆ แล้วเป็น Virtualized รองรับ IE, Explorer, PowerShell, Visual Studio, และ Windows Full RDP ด้วย

WinApps ทำงานอย่างไร?

เป็นเทคนิคที่ฉลาดและ Implement ดี ต้องติดตั้ง Windows บน Virtual Machine ใน Linux แล้วติดตั้งแอปที่รองรับ (Office, Adobe, etc.) ตั้งค่า Username/Password ของ Windows User เชื่อมต่อผ่าน RDP มีขั้นตอนเพิ่มเติมเล็กน้อย เมื่อเสร็จ จะเข้าถึงแอปได้โดยไม่ต้องผ่าน VM โดยตรง

วิธีติดตั้ง Office บน Linux

ก่อนอื่น ดาวน์โหลด WinApps จาก Github.com แล้วทำตามขั้นตอน:

1. สร้างไฟล์ Config ของ WinApps

ไฟล์ Config เก็บ RDP username/password เพื่อเชื่อมต่อ Windows บน VM ตำแหน่งและรายละเอียด:

ตำแหน่ง:

~/.config/winapps/winapps.config

Config File:

RDP_USER="MyWinUserName"
RDP_PASS="MyWinPassword"
#RDP_DOMAIN="MYDOMAIN"
#RDP_IP="192.168.123.111"
#RDP_SCALE=100
#MULTIMON="true"
#DEBUG="true"

ปรับค่าตาม Setup ของคุณบน Linux

2. Clone WinApps Git Repo และติดตั้ง KVM และ RDP

sudo apt-get install -y freerdp2-x11
git clone https://github.com/Fmstrat/winapps.git
cd winapps

3. ตั้งค่า Windows VM

ถ้ามี RDP Server หรือ VM อยู่แล้ว ข้ามไปข้อ 4 ถ้าไม่มี ให้ดูคำสั่งทั้งหมดที่ใช้ได้

4. Config Windows VM

ขั้นตอนต่อไป Merge Registry ใน Windows VM เพื่อให้แอปเปิดได้ ต้อง Rename PC Name เป็น RDPWindows ถ้าใช้ KVM เพื่อให้ WinApps ตรวจจับ Local IP

กดปุ่ม Windows พิมพ์ ABOUT ในช่องค้นหา คลิกเปิด About หรือไป Settings (Win+I) > System > About กด Rename this PC เปลี่ยนชื่อ

ในส่วน System คลิก Remote Desktop เปิด Enable Remote Desktop

สุดท้าย Merge kvm/RDPApps.reg เข้า Registry เพื่อเปิดใช้ RDP Applications

5. เชื่อม GNOME/KDE กับ Windows VM พร้อม Shortcuts และ File Associations

ตรวจสอบว่า FreeRDP เชื่อมต่อได้ด้วยคำสั่ง:

bin/winapps check

จะมี Output จาก FreeRDP ตามด้วย Prompt ยอมรับ Certificate เพื่อเพิ่ม Trusted Source ต่อมาควรเห็นหน้าต่าง Windows Explorer ยืนยันการเชื่อมต่อ ปิดและยกเลิก FreeRDP Output

6. รัน Installer

ขั้นสุดท้าย รัน Installer:

$ ./installer.sh --user
Removing any old configurations...
Installing...
Checking for installed apps in RDP machine (this may take a while)...
Finished.
Configuring Excel... Finished.
Configuring PowerPoint... Finished.
Configuring Word... Finished.
Configuring Windows... Finished.
Installation complete.

แอปที่รองรับอยู่ (บางส่วน):

  • Adobe Acrobat Pro, After Effects, Audition, Bridge, Creative Cloud, Illustrator, InDesign, Lightroom, Photoshop, Premiere Pro
  • Command Prompt, Windows Explorer, Internet Explorer
  • Microsoft Access, Excel, Word, OneNote, Outlook, PowerPoint, Project, Publisher
  • PowerShell, Visual Studio, Windows OS

ใหม่ไหม? รู้สึกไม่ใหม่แต่ Implementation ดีกว่า ต่างจาก WSL เพราะทำผ่าน VM มี Overhead และใช้ทรัพยากรเพิ่ม ต้องคำนึงถึง ถ้าไม่จำเป็น VirtualBox Seamless Mode หรือ VMware Unity Mode อาจดีกว่า