Arch Linux - etswitch
Jul 16, 2015

It is incredibly annoying not being able to alt-tab out of old SDL games. I found ‘etswitch’ in the AUR but was unable to compile it due to the file locking permissions not being set as the 3rd parameter for the open() function.

  1. Download the etswitch package from the AUR https://aur.archlinux.org/packages/etswitch/

  2. Extract

  3. cd to etswitch/

  4. Download the source code (should throw a compile error) makepkg

  5. Move to the source directory
    cd src/etswitch-0.1.14/src
    nano etswitch.c
    

    Find:

    lock_fd = open(lock_file, O_CREAT | O_RDWR);
    

    Replace with:

    lock_fd = open(lock_file, O_CREAT | O_RDWR, 0666);
    
  6. Save and move back one directory cd ..

  7. Compile make -j4

  8. Move back to the main package folder

  9. Install
    makepkg
    makepkg -i
    

Run ‘etswitch’ in a terminal before starting your game, and use Super + Z to minimize/maximize the game.

Comments