Setup Xubuntu Desktop in a Macbook Pro

Burn a bootable USB dongle and boot the macbook pro with it

Try and install

  1. Follow this link with mac book pro HW to setup Xubuntu. Pay attention to the describe on how to using private wifi driver:

    If you're WIFI is not working, then open the start menu, search "driver" and click on "Additional Drivers" and that should find what you need. Otherwise, you may need to resolving the missing driver issue using ethernet after installing. For me, simply clicking "Using Broadcom 802..." and applying those changes gets the WIFI working even when just "trying" xubuntu.

Keyboard tweaks for Mac Book Pro

After installation, make sure you can login successfuly. Then follow the same link. Pay attention to the describe on how to map the Mac command key with the control.

  1. edit /etc/default/keyboard with your favorite editor using sudo.

  2. find the line that has XKBOPTIONS and append ctrl:swap_lwin_lctl in the end of this line. Here’s my example of the full /etc/default/keyboard:

    # KEYBOARD CONFIGURATION FILE
    
    # Consult the keyboard(5) manual page.
    
    XKBMODEL="pc105"
    XKBLAYOUT="us"
    XKBVARIANT=""
    XKBOPTIONS="ctrl:swap_lwin_lctl"
    
    BACKSPACE="guess"
    
  3. run the command sudo dpkg-reconfigure keyboard-configuration and just follow the prompts.

  4. restart.

Setup Resolution and hardwares in Mac Book Pro

  1. Setup the resolution by Start->Settings->Display, select the best 2560x1600 one and keep scale = 1X
  2. The text and windows are too small, then select Start->Settings->Appearance->settings, Window Scale, 2X
  3. connect the bluetooth mouse.

Setup Resolution and backup in UTM VM

  1. The best resolution in UTM , right click the VM’s name, Edit,Display, then Select 2560x1600 - Macbook Pro/Air(13-inch,2012/208), and de-select HiDPI(Retina), select Dynamic Resolution.
  2. In the Xubuntu VM is the default value in the Start->Settings->Display, it is 1208*756,1X,59.99 Hz
  3. Back up the UTM files for the VM by: right click the VM’s name, and click Show in finder

Setup the native apt program

  1. Install google manually. Download it with the default brwoser in the google chrome official web site. and get the deb file. install it by sudo apt install ./filename.deb
  2. Setup the Chinese input method Fcitx5-rime by following this document.
  3. install cpu-checker and run kvm-ok to determine if this system is capable of running hardware accelerated KVM virtual machines. Then install virt-manager, do remember to reboot before using virt-manager.
  4. install podman to using docker. follow the official document. only sudo apt install podman podman-compose. setup the alias in .bashrc, in the end add one line: alias docker='podman'. Do remember to restart before using podman.
  5. install the remote desktop client, which support VNC and RDP, with the command sudo apt install remmina
  6. install the x2go client by sudo apt-get install x2goclient
  7. if this Xubuntu is in KVM or cloud, considering install the x2go server , see this document. x2go server is better than vnc.

Setup the AppImage program

  1. check this https://portable-linux-apps.github.io/, install appman by wget -q https://raw.githubusercontent.com/ivan-hc/AM/main/AM-INSTALLER && chmod a+x ./AM-INSTALLER && ./AM-INSTALLER. And see this Ubuntu blog to change the config for apparmor:

    sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
    sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
    

    And you can persistent this config in /etc/sysctl.d/99-sysctl.conf by adding these two lines in the end of the file

    kernel.apparmor_restrict_unprivileged_unconfined=0
    kernel.apparmor_restrict_unprivileged_userns=0
    
  2. install app with appman

    appman -ia pot-desktop joplin ghostty keeweb
    appman -ias cherry-studio
    
  3. more appman commands

    appman -q pot-desktop #search the app name
    appman -f #list all the installed appimage
    appman -r walc #remove the installed image
    
  4. For AppImage which is not in the list of https://portable-linux-apps.github.io/, you can use appman to help to add a launcher in your desktop start menu. This is an example.

    • Download the Appimages file from the vendor, like Tencent Weixin(Wechat), put it into a special directory like $HOME/MyApp, Attention this one must be different with the default directory of appman.
    • run command like this to help you to add the launcher only appman --launcher /home/yourid/MyApp/WeChatLinux_x86_64.AppImage

Restore the config from the github repository

  1. vim
  2. ghostty

Setup DNS manually in case of needed

  1. follow this instruction and pay attention to the follwoing steps.

  2. Update /etc/systemd/resolved.conf and add some DNS servers (in this example, 1.1.1.1 is CloudFlare, and 8.8.8.8 and 8.8.4.4 are Google.)

    [Resolve]
    DNS=1.1.1.1 8.8.8.8
    FallbackDNS=8.8.4.4
    

    Restart system-resolved:

    service systemd-resolved restart

Setup Git credential helper

  1. install https://github.com/hickford/git-credential-oauth
  2. config the .gitconfig file
  • This is an example for a Non-desktop environment without a browser.

    [credential]
    	helper = cache --timeout 21600
    	helper = oauth -device
    [user]
    	email = youeid@youremail.com
    	name = Foo Bar
    
  • This is an example for a desktop environment with a browser.

    [credential]
    	helper = cache --timeout 21600
    	helper = oauth
    [user]
    	email = youeid@youremail.com
    	name = Foo Bar
    

Do NOT Use! Failed settings notes about the 2K LCD monitor

  1. First try:
    cvt 2560 1440 60
    xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    xrandr --addmode HDMI-1 2560x1440_60.00
    xrandr --output HDMI-1 --mode "2560x1440_60.00"
    
  2. Second try:
    xrandr --newmode "2560x1440_60.00"  241.500   2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync
    xrandr --addmode HDMI-1 "2560x1440_60.00"
    xrandr --output HDMI-1 --mode 2560x1440_60.00
    
  3. Reference for the LCD monitor
comments powered by Disqus