Posts

Mount Ext4 partition

I'm sure I've previously found a solution to this that worked right in the file manager, but I can't find it this time, so here's what I finally did: Open `disks` and select my SD card. Select the partition I need (ROOTFS).  Click the 'Play'-lookin' icon (>) to mount. Now I can see the mounted partition in Nemo.

retropie pico-8 on 1:1 lenovo monitor take 2

 Setting up retropie for my square monitor. Problems: - flashing screen on both batocera and rteropie images. solved by editing `/boot/config.txt` to include `hdmi_group=2 hdmi_mode=9`  - add pico-8. needed to add the rpi version of the softwaree then update `/etc/emulationstation/es_systems.txt` with the following:  <system>     <name>pico8</name>     <fullname>PICO-8</fullname>     <path>/home/pi/pico-8</path>     <extension>.sh .SH</extension>     <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/pico-8/pico8 -draw_rect 0,0,800,600 -splore "</command>     <platform>pico8</platform>     <theme>pico8</theme>   </system> getting to `-draw_rect 0,0,800,600` took a bit of trial and error and I'm still not sure it's right because the monitor is 1:1 ...
hdmi_mode Resolution Frequency Screen Aspect Notes 1 VGA (640×480) 60Hz 4:3 2 480p 60Hz 4:3 3 480p 60Hz 16:9 4 720p 60Hz 16:9 5 1080i 60Hz 16:9 6 480i 60Hz 4:3 7 480i 60Hz 16:9 8 240p 60Hz 4:3 9 240p 60Hz 16:9 10 480i 60Hz 4:3 pixel quadrupling 11 480i 60Hz 16:9 pixel quadrupling 12 240p 60Hz 4:3 pixel quadrupling 13 240p 60Hz 16:9 pixel quadrupling 14 480p 60Hz 4:3 pixel doubling 15 480p 60Hz 16:9 pixel doubling 16 1080p 60Hz 16:9 17 576p 50Hz 4:3 18 576p 50Hz 16:9 19 720p 50Hz 16:9 20 1080i 50Hz 16:9 21 576i 50Hz 4:3 22 576i 50Hz 16:9 23 288p 50Hz 4:3 24 288p 50Hz 16:9 25 576i 50Hz 4:3 pixel quadrupling 26 576i 50Hz 16:9 pixel quadrupling 27 288p 50Hz 4:3 pixel quadrupling 28 288p 50Hz 16:9 pixel quadrupling 29 576p 50Hz 4:3 pixel doubling 30 576p 50Hz 16:9 pixel doubling 31 1080p 50Hz 16:9 32 1080p 24Hz 16:9 33 1080p 25Hz 16:9 34 1080p 30Hz 16:9 35 480p 60Hz 4:3 pixel quadrupling 36 480p 60Hz 16:9 pixel quadrupling 37 576p 50Hz 4:3 pixel quadrupling 38 576p 50Hz 16:9 pixel quadrupl...

Windows kill port process

  netstat -ano | findstr :8080 (the port number) This should give you the process to kill. You can then run: taskkill /F /PID 12017(or whatever the process ID is)

Stop vs code opening shit

  xdg-mime default nautilus.desktop inode/directory This sets nautilus as the default app for opening directories instead of vs code. I actually set  xdg-mime default nemo.desktop inode/directory I'm guessing at some point I'll want to refer back to this because vs code will try to open some other thing I don't want it to 🙄

XPS Manjaro lag and freezing

 Have had lagging and freezing since switching to Manjaro. Turns out I don't have a swap partition - how could that have happened?!  I've added a swapfile since I don't want to mess around with my partitions https://wiki.manjaro.org/index.php?title=Swap#Using_a_Swapfile

Enable touchpad while typing - Gnome Manjaro XPS

 https://ostechnix.com/configure-touchpad-settings-using-gsettings-commandline-utility/ gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false

PICO-8 run fullscreen

 Not just fullscreen windowed, but with the actual console display area maximised inside the window.  This is intended for my 1:1 ratio lenovo monitor ON RASPBERRY PI. The key is to run the launch command with the following arguments: $ home/pico-8/pico8 -draw_rect 0,0,1920,1920 The config.txt file does not accept this flag as far as I've been able to determine, so you need to do the following: Create a new pico8.desktop file in /usr/share/applications and use the following config: [Desktop Entry] Type=Application Name=Pico-8 Comment=Pico-8 Fantasy Console Icon=/usr/share/pixmaps/lexaloffle-pico8.png Exec=/home/mitch/pico-8/pico8 -draw_rect 0,0,1920,1920 Terminal=false Categories=Development; Then add the icon png from the folder to /usr/share/pixmaps reboot, or restart the window manager with lxpanelctl restart Use the menu entry for pico8 to create a desktop icon Hopeully that'll save you some time

install .deb package to arch

 Read around the various different methods, but the best option seems to be using debtap to convert, then pacman to install. This is for the Aseprite sprite editor, for future reference. Steps: - download snapshot of debtap from the AUR - install it in the usual way - update it: debtap -u - run  debtap Aseprite-[whatever the filename is].deb - install the resulting .zst package with (sudo) pacman -U aseprite[whatever].pkg.tar.zst ...and it works straight off the bat. Pleasing.

Keybindings XPS

TL;DR xmodmap -e 'keycode 135=' Might need to add it to .xinitrc or .bashrc for permanence Backstory Wanted to also disable caps lock and context menu in Arch. Capslock can be disabled with setxkbmap -option ctrl:nocaps which maybe should be in .xinitrc but I just put it in .bashrc because I don't care any more. [Update: found I could disable it in keyboard settings! Doh. no option for context menu however] Trying to do the same with context menu key was harder, since I couldn't identify a setxkbmap  option for it (see this gist and localectl list-x11-keymap-options for why). So then I'm looking for a utility that'll give me the key when I hit it in the terminal, so I end up installing xorg-xev  and its output is not readily comprehensible but it seems that this is the data: KeyPress event, serial 38, synthetic NO, window 0x4800001,     root 0x55c, subw 0x0, time 1940314, (592,577), root:(657,1719),     state 0x0, keycode 135 (keysym 0xff67, Menu), same_...

Dual screen settings XPS

- join displays - set both to 16:9 - make built in display primary - put external display on top (current setup) Sometimes the setup is correct but it *looks* wrong because on-screen stuff like conky gets smeared out over the displays.  Pkill conky and restart it in a background thread with terminal: conky && exit

Windows context menu key

I spent an hour trying to figure out how to do this via the registery, but in the end I installed sharpkeys https://github.com/randyrants/sharpkeys/releases

just in case

 https://itsfoss.com/solve-open-shared-object-file-quick-tip/ ran the sudo /sbin/ldconfig -v command  It hasn't solved my problem, but it might just fuck my shit up

Week of year

Sometime I like to use the week of the year instead of the date. Until today I've been searching up a webpage every time - I don't need it often enough to bookmark, even. Anyway, today TIL that bash will return the week from  date +%U 😲 Looks like JS is not so straightforward tho - you can google that if you need it. 😉 UPDATE: although the above usually works fine for me, I discovered that the U command assumes that weeks begin on a SUNDAY when, as we know, they actually begin on MONDAY. The correct command is therefore date +%W

record system sounds in powerpoint

 https://superuser.com/a/1133762 After enabling stereo mix and setting it as the source - default and app specific - I was still not picking up system sound on the PP recording.  I had to point the output to speakers, which seemed to make the difference, and then plug headphones directly into the machine rather than through the USB adaptor which seemed to re-brand them as a Jabra device. 

Youtube audio renderer

This worked for me (Windows 10) - Win+R - devmgmt.msc - find the sound list - right-click the device, disable - right-click the device, enable - refresh YT tab

changing rtrio to boot sonic pi

 after installing sonic pi, I try to run it, get error: `You don't appear to have a sane system configuration.` lol. yeah probably.  `It is very likely that you encounter xruns.` no idea what that means. anyway, I take the advice and add  `  @audio          -       rtprio          99` to `/etc/security/limits.conf` I note it here beccause I _suspect_ it's going to stop me pushing my volume levels over 100, which will probably baffle and anger me down the line. update:  as per my usual reckless approach, I've installed realtime-priveleges package and added my username to the realtime group. no diff that "sane system" and "realtime scheduling" message comes from jackd. running "jackd -d backend --help" shows it in the terminal. Now I'm thinking it's to do with pulsaudio settings maybe. did all this: https://github.com/sonic-pi-net/sonic-pi/issues/2341#issuecomment-628016039 which feels dumb...

youtube-dl

Audio only: youtube-dl -f 'bestaudio[ext=m4a]' 'https://www.youtube.com/watch?v=AA2iq5IspLI&ab&ab_channel=StoryTeller'

Arch XPS shut down on suspend

XPS is shutting down on every suspend action - closing lid, power button, manual select - instead of suspending following an arch upgrade. solution is just to go through a proper shutdown process and start up again.

detect printer on network

to detect the printer on my new WAN, I tried `avahi-browse -alr` but the demon wasn't running. `systemctl start avahi-daemon.service` sorted that.