Author Topic: Linux auto reinstaller | Support for right click on long press | Trackpad mode  (Read 2439 times)

M600

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hello,

I got a Cosmo recently and I managed to break my Linux within hours trying to install docker so I had to reinstall everything I did which is time consuming... Since I'm an SRE (apparently), I had to automate the process.

https://github.com/m600x/cosmo-installer

This is still a WIP (partial doc) but it's an ansible playbook (within docker for ease of use) that will reconfigure Linux to a more usable state. From the readme:

What it will do in short:
- Install bunch of crap (git, curl, htop, zsh, etc...)
- Remove cosmo user and add yours
- Change root password
- Set the keyboard layout, hostname and timezone
- Create a mounting point for the microSD card
- Optional: Add right click on long press
- Optional: Touchscreen as touchpad (relative positioning)
- Optional: Set back your SSH settings
- Optional: Add VNC server
- Optional: Add all your OpenVPN profile
- Optional: Add support for LTE connexion

TL;DR:
- Install Linux v3 from Planet Computers
- Connect your wifi, get the IP
- Adjust settings in cosmo.yml, add your files following the README.md
- Run ./start.sh

Voila, your Cosmo is automatically set back to your liking. Next time your break it, reinstall Linux, connect, ./start.sh.

TODO:
- KDE customization restore
- Any suggestion?



Additionally, I got the right click on long press almost fully working using the default xorg driver at https://github.com/m600x/cosmo-rightclick
There's still bug but for the most part it work as expected.
- Can't right click twice in a row
- Can't right click on the taskbar

I also have relative positioning working with mtrack if you use the installer (right click with 2 fingers, screen act like a trackpad).
If you want to test that alone, instructions at: https://github.com/m600x/cosmo-installer/blob/master/MTRACK.md

Cheers from France!
« Last Edit: December 07, 2020, 05:12:58 pm by M600 »

peter

  • Newbie
  • *
  • Posts: 17
    • View Profile
I realize the short answer is, "If you don't understand what you're doing, don't do it."  That said, I don't know where to start looking for answers. 

I appreciate the automation your solution provides, but I couldn't get it to work for me.  Instead I've been tweaking individual items -- many thanks for the mtrack relative positioning fix!!!

What I'm struggling with now is creating a mount point for the microSD card.  I'd like to access the files I've placed on it from Android.  Is this even possible, or would I have to create a new partition on it to access it from Gemian?

Running "fdisk -l" only shows the partitions on the mmc block device, and the microSD card is also invisible to GParted.  I didn't recognize any unmounted devices when I searched dmesg for "sd."

So, is it even possible to mount the file system on the microSD card created under Android?  And where can I learn how to do it if it is?

Thanks in advance for any help or advice you share!

- peter

tigas

  • Newbie
  • *
  • Posts: 5
    • View Profile
Great work, M600. I'm not going to use it because Docker flows over my head (and since I'm on Windows, it not only is a pain to install but by needing WSL2 and therefore Hyper-V it breaks all my virtual machines) but I'm sure someone will.

Can't you convert that to shell scripts? Shell scripts only depend on /bin/(ba)sh... That's what I'll do eventually, but right now I'm fighting my Cosmo/KDE on pure basics like how the heck to connect a USB mouse.

Edit: in case someone searchers for "mouse" and stumbles on my post:

After some more digging on the forum, I found a thread explaining the relation between the right USB port and the CoDi. I had tried to move the mouse to the left port but it had just stayed there and didn't even turn on.

However, I tried it again a second time and validated that the mouse worked properly if connected on the left port. Not ideal, but doable.

I've since booted into Android and turned CoDi off to see if I can get the right USB port working as well. But first I have to charge the Cosmo again...
« Last Edit: January 11, 2021, 03:04:39 pm by tigas »
--- Got my Cosmo!; previous PDAs: Psion S3a, Ericsson MC216 (Psion 5mx with Symbian 1.0); didn't get my hands on a Nokia N950 but used the N9 equivalent for years

asyik

  • Newbie
  • *
  • Posts: 7
    • View Profile
my work around for right click:

Use KDE connect
And right click from another android phone...

I dont really use much right click for now.
Except when i messed up with my bottom bar. Use right click to remove unwanted widget.

TheNetEffect

  • Newbie
  • *
  • Posts: 25
    • View Profile
I installed mtrack to try it but it did not work. The touchscreen became unusable.

I uninstalled it but touchscreen still does not work.

What else do I need to do?

TheNetEffect

  • Newbie
  • *
  • Posts: 25
    • View Profile
For reference for anyone who has this issue, after un-install of mtrack, you also have to remove the config file:

/usr/share/X11/xorg.conf.d/50-mtrack.conf

otherwise you end up with no default touch or mouse.