/gnde

Gemini New Debian Experience

Primary LanguageC

GNDE: Gemini New Debian Experience

Description:

Debian on Planet's Gemini computer is great but in my opinion, a taskbar as well as overlapping windows is not a good thing for such a small screen. In addition, the Gemini has the great advantage of having a real keyboard, it must be used.

So I tried to get closer to the use of a smartphone, with windows that appear on the entire screen without overlapping and that we switch one behind the other without a taskbar but with effective keyboard shortcuts. All with an auto login so you do not waste time on startup.

This procedure is for install LightDM and DWM on Planet Gemini computer (tested on wifi only model) for a new user experience, namely:

  • auto login as gemini user;
  • no task bar;
  • by default, windows are managed in monocle mode, they are displayed on totality on the screen same as a mobile device;
  • easy control with keyboard;
  • Rofi application launcher;
  • preconfigured shortkeys:
    ALT + SHIFT + ENTER : Terminal with konsole
    ALT + SHIFT + W : Chromium
    ALT + SHIFT + M : PulseAudio Volume Control
    ALT + SHIFT + C : Libre Office Calc
    ALT + SHIFT + T : Libre Office Writer
    ALT + SHIFT + L : Connman UI Setup
    ALT + SHIFT + P : SMPlayer
    ALT + SHIFT + F : PCManFM File Manager
    ALT + SHIFT + I : LXImage
    ALT + SHIFT + S : Screenshot
    ALT + SHIFT + E : Kwrite
    ALT + P : Rofi applications launcher

Here you can see the desktop, on top at left, you have 2 workspaces; at right the status bar with lan, battery, audio and time informations: desktop

Here you can see Chromium on workspace 1: chrome

Here it's the terminal Konsole with application launcher Rofi on workspace 2: terminal and rofi

In bonus:

  • battery level works;
  • wifi works;
  • brightness keys works:
    Fn + B : brightness -
    Fn + N : brightness +
  • audio volume keys works:
    ALT + CTRL + M : mute
    Fn + C : volume -
    Fn + V : volume +
  • shortkeys to reboot and shutdown (immediately):
    Fn + S : shutdown
    ALT + CTRL + R : reboot

Various informations:

All commands prefixed by a $ can be launched in user;
All commands prefixed by a # must be launched in root.
Sorry for my english, it's not my native language.

Reflash:

We start from a fresh install of Gemini Debian Linux. If you have used the online partition tool (http://support.planetcom.co.uk/partitionTool.html), you can reflash your Debian OS without touch other OS with this method :
$ cd FlashToolLinux/
$ ./flash_tool.sh
Select scatter-loading-file. Select Download tab. Select download only. Unset all lines and select only linux. Plug USB. Click on Download. Turn off Gemini whith long press on ESC key.

Flashing processus will normaly start and you can unplug USB when download will be OK.

Prepare:

Connect to Wifi.
# apt update
# apt upgrade

If LibreOffice is broken:

# cd /var/cache/apt/archives/
# dpkg -i --force-overwrite libreoffice*
# apt install -f
# apt upgrade

# dpkg-reconfigure locales
# dpkg-reconfigure tzdata

# apt install git

Download there necessary file:

$ cd ~
$ git clone https://github.com/yannclement.com/gnde.git

Install LightDM:

First, remove SDDM:
# apt remove --purge sddm*

Now install LightDM:

# apt install lightdm

If Connman loose Wifi:

# dpkg-reconfigure connman

Install DWM:

# apt install make gcc libx11-dev libxft-dev libxinerama-dev
$ git clone git://git.suckless.org/dwm
$ cp gnde/config.h dwm
$ cd dwm

Si vous êtes Français avec un clavier AZERTY, modifiez le fichier config.h tel qu'indiqué dans celui-ci pour bénéficier d'un fonctionnement correcte des touches 1 à 9.

Add autostart patch:

$ wget https://dwm.suckless.org/patches/autostart/dwm-autostart-20161205-bb3bd6f.diff
$ patch -p1 < dwm-autostart-20161205-bb3bd6f.diff

Compile DWM:

# make clean install

Configure all that:

$ cd ~
$ mkdir .dwm

Configure autostart:

$ cp gnde/autostart_blocking.sh .dwm
$ chmod +x .dwm/autostart_blocking.sh

Configure backlight:

$ cp gnde/backlight.sh .dwm
$ chmod +x .dwm/backlight.sh

Configure status:

$ cp gnde/status.sh .dwm
$ chmod +x .dwm/status.sh

Modify your Xsession for LightDM by creating a new .xsession file:

$ nano .xsession

And copy and paste these two lines of code:

while true; do xsetroot -name "$(.dwm/status.sh)"; done &
exec /usr/local/bin/dwm

Modify sudo to shutdown and reboot without password:

# nano /etc/sudoers

Add these two lines of code:

# Allow user to shutdown with no password
gemini ALL=NOPASSWD: /sbin/shutdown

Add some applications to complete:

# apt install konsole
# apt install alsa-utils
# apt install rofi
# apt install fonts-symbola
# apt install feh

Create a subdirectory wallpapers in ~/Pictures and copy there your favorite wallpapers:

$ mkdir Pictures/wallpapers
$ cp gnde/moon.jpg Pictures/wallpapers

Reboot

Testing:

In lightDM, select Default Xsession and log in.

Other things to know with DWM:

  • ALT + SHIFT + K: close application
  • ALT + SHIFT + SPACE: toggle floating / Monocle
  • ALT + click and move mouse: move floating windows
  • ALT + SHIFT + Q: quit DWM

For PCManFM File Manager et LXImage, if icons missing, select Breeze in Edit, Preferences.

Finishes:

If DWM work correctly, you can active auto login in LightDM:
# nano /etc/lightdm/lightdm.conf

Set autologin-user variable to gemini:

autologin-user=gemini

Set autologin-user-timeout variable to 0:

autologin-user-timeout=0

Facultatif:

If you want to remove LXDE:
# apt remove --purge lxappearance lxde lxde-* lxinput lxmenu-data lxpanel lxpolkit lxrandr lxsession* lxsession lxshortcut lxtask lxterminal