Skip to content

Instantly share code, notes, and snippets.

@porteusconf
Last active March 6, 2023 15:16
Show Gist options
  • Save porteusconf/cd1de43d4cab3cce8a3454a672d550f7 to your computer and use it in GitHub Desktop.
Save porteusconf/cd1de43d4cab3cce8a3454a672d550f7 to your computer and use it in GitHub Desktop.
lauches gui-app qgle.app (should work if you choose newer/older versions of gle by `brew switch gle`) 64-bit gle 4.3.0 Tested on macos 10.15
#!/usr/bin/env bash
## Put this qgle.command in /Applications and in Terminal:
### chmod a+x /Applications/qgle.command
### assumes you installed gle in /usr/local/cellar and did brew link similar to following...
## brew diy --name=gle --version=4.3.0
## mkdir /usr/local/Cellar/gle
## cd /usr/local/Cellar/gle
## tar zxf gle_macosx_4.3.0_x64.tar.bz2 # download newest tarball from sourceforge
## mv /usr/local/Cellar/gle/gle-4.3 /usr/local/Cellar/gle/4.3.0
## brew link gle
### After you have done the above, then you should see a symlink like this:
### ls -l /usr/local/opt/gle ###
### lrwxr-xr-x /usr/local/opt/gle -> ../Cellar/gle/4.3
### And if so, then next line should open the gui qgle.app
export GLE_TOP=/usr/local/opt/gle; open /usr/local/opt/gle/bin/qgle.app
echo "/usr/local/opt/gle/qgle.app should be running..."
sleep 7
exit
@porteusconf
Copy link
Author

porteusconf commented Mar 6, 2023

=== Quick-start: How to setup a vm on macos to run qgle ===

  • To run vm (virtual machine) on macos host, we'll use free UTM.app. brew update utm-beta Note: You can buy for $10 the macos-version of UTM in the App Store. Or, get it free from https://mac.getutm.app/ where is says: "What's the difference in the Mac App Store version?
    UTM is and always will be completely free and open source. The Mac App Store version is identical to the free version and there are no features left out of the free version. The only advantage of the Mac App Store version is that you can get automatic updates. Purchasing the App Store version directly funds the development of UTM and shows your support." I think it relies on macos to check for updates, rather than the UTM.app checking on its own. In any case, the free version currently does not
    As of March 2023, there have been over 90 releases of new versions of UTM, lately more than one a month. So the beta versions may be worth checking out! You can manually download both stable and beta releases at https://github.com/utmapp/UTM/releases such as this 4.20-beta version:
    https://github.com/utmapp/UTM/releases/download/v4.2.0/UTM.dmg (newest beta released as of 2023-Mar-6). If you manually copy the UTM.app from the dmg to /Applications, you'll have to check the releases site to find new releases. Or if you have (home)brew, you can just brew update utm or brew update utm-beta.

  • Get a minimal debian11-xfce, like UTM-provided vm at https://mac.getutm.app/gallery/debian-11-xfce, which is for arm64 (and not for intel amd64/x86) and so best used only on apple-silicon macs (or ios!). (For intel, as of Mar 2023 there was not any amd64/x86 debian-11 UTM bundle in the gallery for intel macs, but I'll try to get one added. A bundle is simply an item whose name ends in .utm such as debian-11.5-xfce-arm64-utm inside https://github.com/utmapp/vm-downloads/releases/download/debian-11.5/debian-11.5-xfce-arm64-utm4.zip And/or I will post post how to create an intel-debian-vm from scratch using appropriate iso from https://www.debian.org/CD/netinst/ which for amd64/x86 is currently https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso file.)

  • Open a terminal In the deb11 vm. For example, right-click on desktop -> Open Terminal here.

  • Optional but nice: create account with same (short) username as on macos host: In vm:

sudo adduser     _mac-user_
sudo passwod   _mac-user_

Be sure you substitute your actual short username on mac for _mac-user_. This way when you ssh/scp to/from vm/mac, you won't have to specify username). In vm, do id debian and id mac-user then add mac-user to appropriate groups:

sudo usermod -a -G examplegroup mac-user
  • In vm: sudo visudo then add lines like:
%admin          ALL = (ALL) ALL
mac-user       ALL = (ALL) ALL
  • Create, copy or download a file in /var/tmp/ called gle-packages.txt with the following contents:
apt-listchanges
atril
bind9-dnsutils
deborphan
discover
dkms
doc-debian
dpkg-repack
featherpad
gle-graphics
ifupdown
init
installation-report
iputils-ping
liblockfile-bin
lightdm
nano
netcat-traditional
nftables
seetxt
task-english
task-laptop
task-ssh-server
telnet
texlive-latex-base
traceroute
usbutils
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        14G  3.7G  8.9G  30% /   # 3.7gb used before install

/dev/sda2        14G  4.1G  8.6G  33% /  #  4.1gb used after install
  • sudo apt-get -y --no-install-recommends install git
    then cd /var/tmp; git clone https://github.com/vlabella/gle-library.git

If on apple-silicon (m1) then
sudo apt-get -y --no-install-recommends install linux-image-arm64
If in intel vm/mac (x86/amd64) then
sudo apt-get -y --no-install-recommends install linux-image-amd64

Now, in terminal type qgle and you should be able to open files in this tree: /var/tmp/gle-library/examples After qgle exports to a pdf, it can optionally automatically open in the viewer. We installed "Atril Document Viewer" which seems to do a good job of displaying pdf. Set that as default app for opening pdfs if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment