Author Topic: Alternative Linux available  (Read 4231 times)

skmakine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Alternative Linux available
« on: June 26, 2018, 03:21:53 pm »
Hey all!

Personally I wouldn't have known this was possible without stumbling on to it some time earlier, so here's something for you all to consider.

The Debian TP leaves much to desire at it's present state, with so many things just plain not working. For me, it's not really useful now, but for sure it's interesting and for now I'm keeping it installed to play around with.

However I'm reasonably happy with running Ubuntu virtually under Android. It does those things I need it to do, when I'm not using it my device is a normal Android device, and while running virtual Linux I can just instantly alt-tab between Linux and Android applications. For me at this time, it's the best of both worlds.

Here's how it works:
  • root your Android. This is required. I also installed the Magisk Manager to control root access.
  • install LinuxDeploy by meefik from Google Play
  • use the GUI to set up a new virtual Linux system (VNC is probably the only useful choice for desktop GUI)
  • start the VM, and connect to it with any VNC client
There you go. It will download and setup your new virtual Linux and prep it for use.

For myself, I installed Ubuntu/MATE into an image file in internal storage, added a bunch of softwares I need, and the bonus: I've set up an SDCard with a LUKS encrypted partition, and I can use that within the virtual Linux, to have a relatively safer encrypted storage, which is not accessible to Android OS at all, without some further special tricks. Now I dare to keep some confidential material on my device: Android snoopware can't access it, it's in encrypted storage, and best of all: if my device HW fails, I can just pop out the SDCard and mount it on an Ubuntu desktop.

I also made the VM desktop about half of the Gemini screen resolution, and then I have the VNC client scale it up to full screen. This way all the scrollbars etc are usable directly via touch screen, without having to figure out how to make the desktop environment make everything super-sized, which doesn't quite work with many softwares.

Using bVNC as the VNC client, I can toggle live between different modes for the touch screen, e.g. change from direct mode to simulated touchpad mode.

It's not 100% perfect, but for now works well enough for me. Some issues FYI:
  • with the VNC setup, I can't alt-tab inside the VM. Alt-tab switches between VNC client and other Android apps
  • when I use alt-drag to move windows, after the operation the Planet app bar always pops up, so I have to press the Planet key again to close it
  • no HW acceleration in the VNC desktop
  • no XRANDR extension (or I don't know yet how to achieve it)
  • home, end, pg up, pg down don't work so far
  • can't get FB to work as display method; the screen just keeps rotating till I kill it, or if I kill Android UI I get a very small popup error, and then have to force a hard reboot...
If you're interested, and end up trying this, please share your experiences! Particularly since it seems like there's not much good documentation about LinuxDeploy...

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Alternative Linux available
« Reply #1 on: June 26, 2018, 04:20:02 pm »
I've done that before. On my other phone, there's a 6GB partition on the memory card with  a Debian install in it. To use it, I get a root shell on android, then mount the partition and chroot.

These days I find termux to give me a lot of what I want.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Alternative Linux available
« Reply #2 on: June 27, 2018, 07:40:08 am »
Thanks for that info. I probably look into this later. For the time being I am quite satisfied with gemian and am quite confident it will soon bring me a workable device usable for daily life. But I encountered a few things (like battery life) which absolutely needs fixing for that, but I presume these have to do with configuration issues I missed so far.
Quote from: skmakine
The Debian TP leaves much to desire at it's present state, with so many things just plain not working. For me, it's not really useful now, but for sure it's interesting and for now I'm keeping it installed to play around with.
Maybe you like to mention the most important missing 'desires' for using Gemian/DebianTP, it will help people who are fiddling around with Gemian right now.
« Last Edit: June 27, 2018, 07:41:26 am by psionlover »

skmakine

  • Newbie
  • *
  • Posts: 11
    • View Profile
Alternative Linux available
« Reply #3 on: June 28, 2018, 02:06:04 pm »
Quote from: psionlover
Maybe you like to mention the most important missing 'desires' for using Gemian/DebianTP, it will help people who are fiddling around with Gemian right now.

to be honest, there's so many really major things not working at all or usably enough to even be able to make a proper list... but here's some major and minor things that work in Android but not so much in Debian TP1
  • I can trivially get 10+ days of stand-by time without a restart, while still having an instant-on device. In Deb, I can't even get a day. Plus trying to put the device to sleep just crashes it, requiring a hard reboot. This is so very important.
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
  • Android gives me 4G networking at the press of a button. I haven't even dared to attempt this in Debian, after looking at the instructions and the disclaimers in it.
  • overall the Android GUI is user friendly, whereas the Debian TP1 desktop simply isn't designed for this kind of device. It would be very interesting to get Ubuntu Touch running in Gemini. Maybe I'll try that next... but for now, without attaching a mouse, many things are quite difficult. Maybe a stylus would also help.
  • terminal is optimized for touch use
  • I can use Firefox in Android. It runs very bad in Debian. Probably fixable, but I don't know how, yet.
  • in Android I have a fully featured Skype client. In Debian I have to settle for a partially functional web skype, or Pidgin with extremely bad GUI. While I'm not all happy about my dependence on Skype, unfortunately this remains important for now
I know it's a preview of course, so it's not to be expected for everything to be working yet.

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Alternative Linux available
« Reply #4 on: June 28, 2018, 02:42:06 pm »
Thanks for replying

Quote from: skmakine
Quote from: psionlover
Maybe you like to mention the most important missing 'desires' for using Gemian/DebianTP, it will help people who are fiddling around with Gemian right now.

to be honest, there's so many really major things not working at all or usably enough to even be able to make a proper list... but here's some major and minor things that work in Android but not so much in Debian TP1
  • I can trivially get 10+ days of stand-by time without a restart, while still having an instant-on device. In Deb, I can't even get a day.
This is my main dissatisfaction also. If I keep wifi/bluetooth off I get two full days of battery life. But as I understand a 2-3% drain pro day should be possible, so I keep trying

Quote
Plus trying to put the device to sleep just crashes it, requiring a hard reboot. This is so very important.
Good to know I am not the only one experiencing this. Indeed very often I can't just ordinary turn off the device. But mine does not crash, it mostly hangs.

Quote
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
well this is strange, absolutely no problem with this. When I close the lid screen get's black and device get's locked as expected
Quote
  • Android gives me 4G networking at the press of a button. I haven't even dared to attempt this in Debian, after looking at the instructions and the disclaimers in it.
I can wait for the 4G.
Quote
  • overall the Android GUI is user friendly, whereas the Debian TP1 desktop simply isn't designed for this kind of device.
It probably helps me that I never had an android or ios phone before. I love the idea having an ordinary linux desktop in my trousers which I can just tweak like I am used to on my other systems.

Quote
It would be very interesting to get Ubuntu Touch running in Gemini. Maybe I'll try that next... but for now, without attaching a mouse, many things are quite difficult. Maybe a stylus would also help.
touchscreen as a touchpad really helped me a lot navigating the device.

Thanks for listing these Gemianism's  
« Last Edit: June 28, 2018, 02:44:31 pm by psionlover »

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Alternative Linux available
« Reply #5 on: June 28, 2018, 02:50:58 pm »
Quote from: skmakine
I can trivially get 10+ days of stand-by time without a restart, while still having an instant-on device. In Deb, I can't even get a day. Plus trying to put the device to sleep just crashes it, requiring a hard reboot. This is so very important.

I'm currently trying to get to the bottom of this. It seems there is no button bound at the kernel level to actually wake the device when it enters full suspend (either via manually forcing it into suspend, or disabling wifi and letting it autosleep its way into suspend). Or maybe it really is hard freezing, impossible to tell

Quote from: skmakine
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
This stuff seems to be a bit unreliable. I've hacked in xscreensaver locally, but it's not at a state where I consider it stable enough to share

Quote from: skmakine
  • overall the Android GUI is user friendly, whereas the Debian TP1 desktop simply isn't designed for this kind of device. It would be very interesting to get Ubuntu Touch running in Gemini. Maybe I'll try that next... but for now, without attaching a mouse, many things are quite difficult. Maybe a stylus would also help.
https://www.oesf.org/forum/index.php?showtopic=35185

Quote from: skmakine
I can use Firefox in Android. It runs very bad in Debian. Probably fixable, but I don't know how, yet.

This can be resolved by disabling glamor, but it comes at the cost of nerfing apps that use opengl es (eg VLC, chromium) and making SDDM invisible. The proper fix would be to optimise glamor for the hardware so that apps that don't use any hardware acceleration (such as firefox, since there's no full GL support) have an equally efficient render pipeline
« Last Edit: June 28, 2018, 02:53:56 pm by Kiriririn »

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
Alternative Linux available
« Reply #6 on: June 28, 2018, 02:55:27 pm »
Quote from: skmakine
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
Have you flashed the community kernel as described here: https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP
Otherwise lid close won't work. @see section "Update the kernel"

psionlover

  • Newbie
  • *
  • Posts: 34
    • View Profile
Alternative Linux available
« Reply #7 on: June 28, 2018, 03:01:21 pm »
Quote from: Kiriririn
Quote from: skmakine
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
This stuff seems to be a bit unreliable. I've hacked in xscreensaver locally, but it's not at a state where I consider it stable enough to share
I also did a lot of fiddling with xscreensaver. but it made the device really more difficult to use. it made the device hanging and crashing all the time. I just deinstalled it and a lot of weirdness suddenly disappeared.

mithrandir

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • http://www.mygnu.de
Alternative Linux available
« Reply #8 on: June 28, 2018, 04:28:38 pm »
Quote from: psionlover
Quote from: Kiriririn
Quote from: skmakine
  • despite trying to follow instructions, I can't get the lid close functionality to work. Screen remains on, unless I manually execute gemian-lock
This stuff seems to be a bit unreliable. I've hacked in xscreensaver locally, but it's not at a state where I consider it stable enough to share
I also did a lot of fiddling with xscreensaver. but it made the device really more difficult to use. it made the device hanging and crashing all the time. I just deinstalled it and a lot of weirdness suddenly disappeared.

Yes, sometimes the lid close does not seem to work. Afair the lid close switch is just one of the F keys. I have got the feeling this gets sometimes overridden by keypresses from closing the scrreen. Maybe we could better use the proximity sensor for this, or additionally. Sth. like poximity sensor closed for 30 seconds or so...

frnzndr

  • Newbie
  • *
  • Posts: 13
    • View Profile
Alternative Linux available
« Reply #9 on: July 15, 2018, 10:15:35 am »
Hi, I've also currently resorted to using a Linux chroot instead of the native Linux due to problems with getting up-to-date packages and getting i3 to work in a clean way. So I'm using Linux Deploy to install Debian testing to the partition that the Gemian Linux normally goes to (/dev/block(mmcblk0p29).
Note that you can use this same method to chroot into the "native" Linux install as well (but then you are stuck with Debian stretch for now).

For accessing the chrrot I'm using a ssh app (ConnectBot) and for a desktop I'm using XSDL x-server instead of VNC. I'm using XFCE in this setup (not sure how well something like i3 would work in this context, ideally I'd like to get to the point where I could use i3 in the native Linux boot and XFCE for the Android chroot, but that will probably be a while)
Currently I have two main problems with that:
1) XFCE used to start without problems on installs on other Android devices, but currently I'm always getting an error when I start the chroot from Linux Deploy. (Currently cannot look up the error, but might supply that later if anyone's able to have a look at it). The easy, albeit a bit cumbersome workaraound is to use ConnectBot to ssh into the chroot (user@127.0.0.1) and run the relevant commands there:

export DISPLAY=:0
xfce4-session

This works ok, although it would be nice to fix the problem so that XFCE starts right away.

2) More seriously, the keymap seems to be slightly off. I haven't been able to figure out yet if that's a problem of my Linux install or of the settings of XSDL x-server app. I copied the /usr/share/X11/xkb/symbols/planet_vndr/gemini file into the relevant directory of the XSDL app and also added the gemian repository to my sources.list, so that I have the necessary files in place inside my Linux chroot as well, but there are still a few signs that are missing. I'm using a German keyboard layout, and it largely works (including the Umlaute öäü and the ß), what is not working are the following symbols that are produced with Fn-combinations:
(Fn+K) -  
(Fn+L) +
(Fn+3) \  
(Fn+8)  [
(Fn+9) ]

and additionally / (Shift+7) and = (Shift+0).

I've opened a ticket in the GitHub for XSDL X-server, but if anyone has hints concerning this issue, that would be great!