OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> TUTORIAL - complete DEBIAN INSTALL with 4G working
geminifrench
post Mar 28 2020, 01:45 PM
Post #1





Group: Members
Posts: 28
Joined: 17-December 19
From: France
Member No.: 861,498



Hello.

I've just finished to install my gemini with DEBIAN. (only one partition / no android or other os)
I have past many days to do it.
The 4G is working but it was not easy.
So i publish all the step that i used to have a complete gemini working on debian.
I think it could be helpful for new people who want to have a complete working gemini.
Have a great reading.

Steph



[1] FLASHING GEMINI
[1.1] INSTALL DEBIAN ONLY (only one partition (no other os))
[1.1.1] INSTALL FLASHTOOL
-go here : http://support.planetcom.co.uk/index.php/L..._Flashing_Guide
The first step to install FlashTool on a Windows PC is to install the flash tool drivers. The drivers are needed for your Windows PC to communicate with your Gemini, the minimum requirement is to have a 64bit Windows operating system (Windows 7 or later supported).
You can find the latest drivers here: Windows Flash Tool Drivers
Once downloaded, unzip the archive. You will find a folder called FlashToolDrivers, open the folder and double click on the Install (install.bat) file. Allow the installation to complete by clicking Yes when asked to make changes.
Now that the drivers have been installed, you can download the latest Windows flash tool: Windows Flash Tool
Once downloaded the Windows FlashTool, please unzip it to reveal the FlashToolWindows folder. Next, run the flash tool by double clicking on flash_tool (flash_tool.exe) file in the FlashToolWindows folder.

[1.1.2] CHOOSE GEMINI PARTITION
-go here : http://support.planetcom.co.uk/partitionTool.html
-select gemini version (4G or wifi)
-boot 1 : select Sailfish (no this is not an error)
-move cursor to reserve all partition to linux
-download scatter file
-download base firmware
-boot 1 : select android standard
-boot 2 : select debian
-move cursor to reserve partition for debian & android
-download aditional debian firmware

so you have 3 files :
-scatter file for selfish os
-base firmware
-debian firmware

-create a folder
-dezip base firmware inside
-dezip debian inside
-copy scatter file inside

download Notepad++ (or something like this and make sure the file Line ending is set to Unix (LF))

-go inside created folder
-open scatter file with notepad++
-search for ALL sailfishos_boot.img and replace it with debian_boot.img. Save the file

-open flashtool
-go to « download » tab
-download-Agent : should be set to the file MTK_AllInOne_DA.bin (which is located in the FlashToolWindows or FlashToolLinux folder).
-scatter loading file : choose the scatter file that you have modifyed just before

all the files in colums must be checked and location not empty

[1.1.3] BACKUP NVRAM
-go to « readback » tab
-click « add » button. A row will appear in the table under.
-click « Read Back » button
connect your PC to the left end USB-C port on your Gemini and restart the Gemini. Once booted, the flash tool will detect the unit and will write the NVRAM partition on a file on your hard disk called NVRAM0. It’s a good idea to keep this file as a backup, together with the customised Scatter file.

[1.1.4] FLASHING FIRMWARE
-click « Download » tab.
-drop-down list : select « Firmware Upgrade » option from the drop down menu
-click big « download » button
-connect your PC to the left end USB-C port on your Gemini and restart the Gemini. Once booting, the flash tool will detect the unit and will start flashing the device with the selected firmware.
-wait the end of flashing
-deconnect gemini of pc



[2] LAUCH DEBIAN
-press esc button a long time, and wainting for the login page
-on login page, select your country in « layout » drop-down list and enter password « gemini » under the username




[3] ENTER DEBIAN

[3.1] CHANGE LOCALE PARAMETERS
-go to the menu -> preferences -> LXQT settings -> keyboard and mouse
in « keyboard layout », click on « add » button. Select your contry, and click « ok ». In « keyboard model » select « planet computer gemini ». Select the the first layout « english » and click on « remove » button. Close the window.
-go to the menu -> preferences -> LXQT settings -> locale
in « region » select your country. Close the window.

[3.2] CHANGE APPEARANCE
[3.2.1] GENERAL
-click right on panel on the bottom, and select « configure panel ».
Go to « alignment & position » and select « position » = « top of desktop ».
Select case "auto-hide". Close windows with cross in the top right of windows
-go to the menu -> preferences -> LXQT settings -> appaerance
in « widget style » select « fusion ».
in « lxqt theme » select « light ».
in « font » select " point size" = 9 .
Close window
-click right on the Desk, and select « Desktop preferences ».
Go to « General » and select « icon size » = « 20x20 ».
Go to « Label text » and select "select fonts" = « size 6 ».
Select another tab, and press "enter" to close windows.
[3.2.2] KWIN window manager
[3.2.2.1] change virtual desktop number
-open qTerminal
-go to admin :
enter :
sudo -s
gemini (it is the password)
cd /home/gemini/.config
nano kwinrc
change line :
[Desktop]
Number=NUMBER_OF_DESKTOP_YOU_WANT
save
logout
[3.2.2.2] Solve problem of window manager can't opened
if "window manager" not open when you click on it, you have to install "KDE system settings"
-open qTerminal
-go to admin : (see below)
enter :
apt install kwin-addons
apt install systemsettings
-go to the menu -> preferences -> LXQT settings -> sessions settings
in « basic settings» , in « window manager » select « kwin_x11» in the drop-down list. In « leave session » de-select « ask for confirmation to leave session ». Close the window
reboot
go to : menu -> preferences -> KDE System settings
[3.2.2.2.1] Change title bar apparence
go to : menu -> preferences -> KDE System settings
open apparences -> window decoration
-go to "themes" tab
choose theme
click on the small button in the theme window
choose button size : small
-go to "buttons" tab
organize the buttons as you want ((see here)
[3.2.2.2.2] Acceleration desktop rendering
-menu -> kde system settings -> harware -> compositor
check "enable compositor on startup"
(you can also now change options in kde system settings -> workspace -> desktop behavior -> desktop effects)
reboot
[3.2.2.2.3] Panel settings
-click right on panel
select : "show only windows from desktop " : "current
select : "windows grouping"
select : "apparence / button style " : "only icon". Width : 30 . Height : 30
[3.2.3] XFWM4 window manager
-go to the menu -> preferences -> LXQT settings -> sessions settings
in « basic settings » , in « window manager » select « xfwm4 » in the drop-down list. In « leave session » de-select « ask for confirmation to leave session ». Close the window
-go to the menu -> preferences -> LXQT settings -> window manager (only work if you have changed the window manager to xfwm4)
in « style » tab, select the theme and the layout that you prefer.
The shortcuts are in the « keyboards » tab. Change them as you want.
[3.2.4] choose between KWIN or XFWM4 window manager
-make the choice as below

-logout and login again


[3.3] WIFI
-go to menu -> internet. Drag and drop « connman ui setup » in the top panel in the « drop application zone ». Click on the new icon in the panel. In « status » tab, click on the wifi button « OFF ». The button goes to green. Go to « wireless » tab, ans select the name of your wifi by clicking on it. Click on « connect » button. A new window open. Enter passphrase of wifi. Click « ok » . You are connected to wifi.


[3.4] SYNC TIME
-go to the menu -> preferences -> LXQT settings -> date and time
go to « timezone » tab. Select your city.


[3.5] UPDATE
VERY important -> do not make apt update & upgrade before THIS. If not, you will break all the file system.
[3.5.1] ADD REPOSITORY ARCHIVE KEY
-open qTerminal
-go to admin :
enter 
sudo -s 
gemini (it is the password)
wget http://gemian.thinkglobally.org/archive-key.asc
apt-key add archive-key.asc

apt update
apt-upgrade

if system is brocken :
enter :
$ cd /var/cache/apt/archives/
$ dpkg -i --force-overwrite libreoffice*
$ apt install -f
apt update
apt upgrade
your system is up to go.

[3.5.2] LOCALE
if there is this messages when you made « apt upgrade » :
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
OR
LANGUAGE = (unset),
LC_ALL = (unset),

-go to terminal
-enter :
cd /home/gemini
nano .bashrc
and add this lines :
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"

save file.
Logout
login again
-go to terminal
-enter :
dpkg-reconfigure locales
and choose your local language

you can control result with « locale «  command



[3.6] CHANGE APPEARANCE LXQT
[3.6.1] LXQT CONFIG
-enter terminal
-go to admin (see before)
-go to « /home/gemini/.config/lxqt»
-all configuration files for LXQT are here

[3.6.2] MENU CONFIG
-go to « /usr/share/applications »
-all application configuration files are here. Name are all like this «  name_of_application.desktop « .
if you want to change menu order, you have to open the file of the application you want to change in the menu.
*For example to move « data » from «accessories » to «office» :
-open «data.desktop » in nano or vi (enter « nano data.desktop »)
-search « categories », change « Utility » into « office », and save file.
The menu has been changed.

[3.6.3] XTERM CONFIG
-go to terminal
-enter :
cd /home/gemini
touch .Xresources
nano .Xresources
-in the file enter :
XTerm.vt100.forground : white
XTerm.vt100.background : black
XTerm.vt100.faceName : terminal
XTerm.vt100.fontSize : 11
XTerm.vt100.scrollBar: true
XTerm.vt100.scrollBar.width: 10
XTerm.vt100.rightScrollBar: true
XTerm.maximized: true

-and save it
-load or reload the file with :
xrdb ~/.Xresources



[3.7] FIREWALL - INSTALL UFW
-open qTerminal
-go to admin :
enter : 
apt install ufw
ufw enable
ufw default deny incoming
ufw default deny outgoing
ufw logging on
ufw allow out 53
ufw allow out 20,21/tcp
ufw allow out 80/tcp
ufw allow out 443/tcp
ufw allow out smtp
ufw allow out 465/tcp
ufw allow out imap
ufw allow out imaps/tcp
ufw allow out ntp
ufw allow out 1863/tcp
ufw allow out 5222/tcp
ufw allow out 2628/tcp
ufw allow out 43/tcp
ufw allow out 11371/tcp


to allow ping inside to outside :
enter :
cd /etc/ufw
nano before.rules
add this lines :
# ok icmp codes output
-A ufw-before-output -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-output -p icmp --icmp-type source-quench -j ACCEPT
-A ufw-before-output -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-output -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-output -p icmp --icmp-type echo-request -j ACCEPT


to not allow ping outside to inside :
change this :
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
to :
-A ufw-before-input -p icmp --icmp-type echo-request -j DROP

enter :
ufw reload



[3.8] INSTALL FIREFOX
-open qTerminal
-go to admin :
enter : 
apt install firefox-esr



[3.9] CHANGE PASSWORD
-open qTerminal
-go to admin :
enter : 
passwd gemini
enter your new password



[3.9.10] CHANGE hostname
-open qTerminal
-go to admin :
enter :
cd /etc
nano hostname
enter the hostname you want
save it
nano hosts
enter the same hostname for 10.0.0.127
save it
reboot



[3.9.11] Suspend lid problem
[3.9.11.1] if when you close the lid of gemini, you have to enter the password
-open qTerminal
-go to admin :
enter :
cd /usr/share/polkit-1/actions/
nano org.freedesktop.login1.policy
search "<action id="org.freedesktop.login1.suspend">"
check if "yes" is like this :
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
save it
reboot
[3.9.11.2] if you want auto shutdown when close the lid
-open qTerminal
-go to admin :
enter :
cd /usr/share/polkit-1/actions/
nano org.freedesktop.login1.policy
search "<action id="org.freedesktop.login1.power-off">"
check if "yes" is like this :
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
save it
reboot
[3.9.11.3] disable the idle timeout display off
-open qTerminal
-go to admin :
enter :
cd /etc/X11/
nano xorg.conf
add this lines :
Section "ServerFlags"
Option "OffTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "BlankTime" "0"
EndSection

save
reboot


[3.9.13] desactivate bluethooth ON on start (seem to only work on "xwfm4" window manager)
-open qTerminal
-go to admin :
enter :
cd /etc/default
nano bluetooth
change ...._ENABLED=1 to 0
logout




[3.12] 4G DATA CONFIG
[3.12.1] Do you have a problem with 4G ?
-go to the menu -> internet -> connman ui setup
go to « mobile » tab
click « powered »
if you have this message :
« cmst warning
We received a DBUS reply message indicating an error.
Error Name: org.freedesktop.DBus.Error.UnknownObject
Error Message: Method "SetProperty"with signature "sv"on interface "net.conman.Technology" doesn't exist « 
you have to manualy install modem 4G

[3.12.2] INSTALL MANUALY 4G
[3.12.2.1] INSTALL 4G
-go to terminal
-go to admin :
-enter :
systemctl enable ofono
systemctl start ofono
apt install ofono-scripts
cd /usr/share/ofono/scripts
ofono-setup
./create-internet-context ebouygtel.com (change with your isp APN)
./create-mms-context wap.bouygtel.fr (change with your isp MMSC)
./activate-context
[3.12.2.2] ACTIVATE 4G (one time for each new session)
./enable-modem
./enter-pin pin 1234 (change with your pin number)
[3.12.2.2] TURN ON (each time you need)
./online-modem
[3.12.2.2] TURN OFF (each time you need)
./offline-modem


[3.12.3] CREATE SCRIPTS for automation
[3.12.3.1] CREATE .SH FILES
-go to terminal
-go to admin (see before)
-enter :
cd /home/gemini/
mkdir 4G
cd 4G

touch 4G-enable.sh
chmod 755 4G-enable.sh
nano 4G-enable.sh
in the file enter :
#!/bin/bash
xterm -e « cd /usr/share/ofono/scripts ; ./enable-modem ; ./enter-pin pin 1234 ; ./activate-context » &

touch 4G-on.sh
chmod 755 4G-on.sh
nano 4G-on.sh
in the file enter :
#!/bin/bash
xterm -e « cd /usr/share/ofono/scripts ; ./online-modem  » &

touch 4G-off.sh
chmod 755 4G-off.sh
nano 4G-off.sh
in the file enter :
#!/bin/bash
xterm -e « cd /usr/share/ofono/scripts ; ./offline-modem  » &

[3.12.3.2] COPY FILES .SH on the DESK
copy the .sh files on the screen, with the file manager
-go to : menu -> accessories
open file manager PCManFM
go to 4G directory
drag and drop 4G directory on the desk

[3.12.3.3] 4G ON / OFF
click on file « 4G-enable.sh » to initialize the modem (click on « execute » button in the window pop-up). (just one time on new session)
click on file « 4G-on.sh » to make 4G ON (click on « execute » button in the window pop-up)
click on file « 4G-off.sh » to make 4G OFF (click on « execute » button in the window pop-up)
Go to the top of the page
 
+Quote Post
ArchiMark
post Mar 28 2020, 04:34 PM
Post #2





Group: Admin
Posts: 1,727
Joined: 25-June 03
From: Silicon Valley
Member No.: 208



Thank you so much for taking the time to write this up and share with everyone!

Go to the top of the page
 
+Quote Post
Eric BF
post Mar 29 2020, 03:43 AM
Post #3





Group: Members
Posts: 84
Joined: 25-June 18
Member No.: 824,997



Thanks for this. Nice to have it all in one place.
Do you know whether the 4G support requires an up-to-date Android installation? I've not updated the Android side of my Gemini since I bought it almost 2 years ago (only booted into Android once)...
Go to the top of the page
 
+Quote Post
geminifrench
post Mar 29 2020, 07:35 AM
Post #4





Group: Members
Posts: 28
Joined: 17-December 19
From: France
Member No.: 861,498



QUOTE(Eric BF @ Mar 29 2020, 12:43 PM) *
Thanks for this. Nice to have it all in one place.
Do you know whether the 4G support requires an up-to-date Android installation? I've not updated the Android side of my Gemini since I bought it almost 2 years ago (only booted into Android once)...


No need to have an updated android.

Look at the first part (flashing gemini), i have only install one partition with DEBIAN. No other partition. So i do not have android on my gemini.
So you only need to install 4G on Debian with ofono has i made (if it not work at start) with the terminal.
I have made some script to an easy use of 4G.
Only click on the script, and 4G is ON. Click on other script, and 4G is OFF.
Go to the top of the page
 
+Quote Post
Eric BF
post Mar 29 2020, 07:56 AM
Post #5





Group: Members
Posts: 84
Joined: 25-June 18
Member No.: 824,997



Excellent. Thank you.
Go to the top of the page
 
+Quote Post
mibry
post Mar 30 2020, 03:58 AM
Post #6





Group: Members
Posts: 50
Joined: 18-May 18
Member No.: 822,788



Thanks for the Tutorial, works great. Apart from KDE is there another desktop that works with the gemini?
Go to the top of the page
 
+Quote Post
geminifrench
post Mar 30 2020, 06:53 AM
Post #7





Group: Members
Posts: 28
Joined: 17-December 19
From: France
Member No.: 861,498



QUOTE(mibry @ Mar 30 2020, 12:58 PM) *
Thanks for the Tutorial, works great. Apart from KDE is there another desktop that works with the gemini?


The desktop is LXQT.
It is a very lightweight Desktop. So i think it is a good Desktop.
The only thing i would to change, it is the menu. I would like to use a menu like "Whisker menu" but seems that it is not possible under LXQT. If someone know...

But you can change the window manager (as i made).
You cans see that in [3.2] section of tutorial. I have choose « xfwm4 » but you could add another one i think.
Go to the top of the page
 
+Quote Post
arthman
post Mar 31 2020, 11:27 PM
Post #8





Group: Members
Posts: 19
Joined: 31-March 20
Member No.: 867,778



Hi, just wondering. If I get a gemini, and follow the guide, will calling (with ringtone) and texting etc. work? Thanks
Go to the top of the page
 
+Quote Post
geminifrench
post Apr 1 2020, 12:26 AM
Post #9





Group: Members
Posts: 28
Joined: 17-December 19
From: France
Member No.: 861,498



QUOTE(arthman @ Apr 1 2020, 09:27 AM) *
Hi, just wondering. If I get a gemini, and follow the guide, will calling (with ringtone) and texting etc. work? Thanks


I don't know.
I have just used a sim with only data. I prefer use the gemini just for debian and a phone for the tel and android.
Go to the top of the page
 
+Quote Post
gemini_user_j
post Apr 1 2020, 09:36 AM
Post #10





Group: Members
Posts: 67
Joined: 9-August 18
Member No.: 827,849



Thank you very much for writing this together!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd June 2020 - 10:36 AM