1

I tried installing KDE Connect on my Raspberry Pi 3 with following command...which didn't work.

sudo add-apt-repository ppa:webupd8team/indicator-kdeconnect
sudo apt update
sudo apt install indicator-kdeconnect

It gave an error " No Package found for ARM based linux machine in repository " in simple words.

So, I went to compile KDE connect from source, but I can't figure out how to compile it (I am stuck at installing a cmake dependency named libkf5i18n-dev i cannot find its source code)

[https://github.com/KDE/kdeconnect-kde][1]

KDE Connect allows you to connect Android and Linux over Wifi providing many features but i am only interested in clipboard sync. Copy text on Android and Paste on linux directly.

I have also found clipbrd to sync clipboard, but this does so over Internet connection and not over local wifi network like KDE connect. [http://www.clipbrd.com/][1]. I am OK with installing chromium extension on my raspberry pi 3.

2
  • Well, it has that cmake file. Have you tried to run cmake .? Jan 29, 2018 at 15:08
  • yes! i am stuck at installing libkf5i18n-dev for arm... which i can't find... can't even find its source code Jan 29, 2018 at 15:26

3 Answers 3

2

I have KDE Desktop running on a Raspberry Pi2B

for good performance you need an mmc 16GB Class 10

install Raspbian Stretch Lite

sudo aptitude update sudo aptitude upgrade

reboot

check your logfiles and make sure there are no errors after initial running

sudo raspi-config

Advanced options

  • opengl
  • G1 GL (Full KMS) OpenGL desktop driver with full KMS
  • in case the filesystem has not been expanded automatically(default) do it now.
  • No Memory Split
  • No Overclocking

after
sudo raspi-config
verify with
sudo nano /boot/config.txt that there is a hash before gpu #gpu-mem=xx
you can use
dtoverlay=vc4-fkms-v3d instead of
dtoverlay=vc4-kms-v3d

now install bc, mc (midnight-commander is not required but allows easy editing, copying. moving etc.)
sudo aptitude install bc mc

install zram
look here for details: https://hackaday.io/project/29898-boost-your-raspberry-pi-in-minutes/details
sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/\zram.sh
sudo chmod +x /usr/bin/zram.sh

I recommend a dry run of /usr/bin/zram.sh with disabled commands, because some bash-versions are not calculating as needed.
Test it!
My testfile is /usr/bin/zramtest.sh:

#!/bin/bash  
#/usr/bin/zramtest.sh  
# echo "original calculation"  
cores=$(nproc --all)  
# modprobe zram num_devices=$cores  
# swapoff -a  
totalmem=`free | grep -e "^Mem:" | awk '{print $2}'`  
mem=$(( ($totalmem / $cores)* 1024 ))  
core=0  
counter=0
# I added a counter here just for the case that bash cannot execute 'let'.
# that would cause a never ending loop, which is being prevented after 4 cycles  
while [ $core -lt $cores ]; do  
  echo "mem: $mem"  
  # echo $mem > /sys/block/zram$core/disksize  
  # mkswap /dev/zram$core  
  # swapon -p 5 /dev/zram$core  
  let core=core+1  
  counter=$((counter+1))  
  if [ $counter -gt 4 ];then  
    break  
  fi  
done  
echo "---------------------"  
echo "modified calculation"  
cores=$(nproc --all)  
echo $cores  
# modprobe zram num_devices=$cores  
#swapoff -a  
tot=`free | grep -e "^Mem:" | awk '{print $2}'`  
memex=$(echo "scale=0;1*($tot/$cores)" | bc)  
echo "total: $tot"  
echo "memex:" $memex  
core=0  
while [ $core -lt $cores ]; do  
  echo "core: $core"  
  echo $memex  
  core=$((core+1))  
done  

This is what I am currently using. Zram size for KDE works well if it is 2 x free memory

#!/bin/bash
# /usr/bin/zram.sh

cores=$(nproc --all)
modprobe zram num_devices=$cores
swapoff -a
totalmem=`free | grep -e "^Mem:" | awk '{print $2}'`
mem=$(echo "scale=0;2048*($totalmem/$cores)" | bc)
core=0
while [ $core -lt $cores ]; do
  echo $mem > /sys/block/zram$core/disksize
  mkswap /dev/zram$core
  swapon -p 5 /dev/zram$core
  core=$((core+1))
#  let core=core+1
done

After verifying the proper working of memory-calculation in zram.sh you

  • add /us/bin/zram.sh as the forelast line in /etc/rc.local
  • comment all in /etc/dphys-swapfile
  • remove /etc/init.d/dphys-swapfile

reboot

doublechecking with

sudo fdisk -l | grep zram

Disk /dev/zram0: 463.4 MiB, 485863424 bytes, 118619 sectors
Disk /dev/zram1: 463.4 MiB, 485863424 bytes, 118619 sectors
Disk /dev/zram2: 463.4 MiB, 485863424 bytes, 118619 sectors
Disk /dev/zram3: 463.4 MiB, 485863424 bytes, 118619 sectors

Get the KDE Desktop

see https://www.rootusers.com/install-kde-gui-debian-9-linux/

sudo aptitude install ~t^desktop$ ~t^kde-desktop$

now you can walk your dog!

sudo aptitude update
sudo aptitude upgrade

Have a cup of covfefe ;-)!

after installing KDE modify
sudo nano /etc/X11/Xsession
look for
exec >>"$ERRFILE" 2>&1
and change it to
exec >"$ERRFILE" 2>&1

The command exec >>"$ERRFILE" 2>&1 appends by default setting unbelievable lots of information and is writing to ~/user/.xsession-errors. That will grow fast and makes the system hang soon. It contains many unsolvable errors since the Raspberry is not 100% compatible to all checks KDE is executing. This modification prevents appending and just causes rewriting of that file, it does not exceed 40kB on my system

You can't use all graphical KDE effects on the Raspberry!
It will cause a lot of trouble if you enable the compositor. The DisplayManager will continuously restart.
After the KDE-Desktop started, go to
System-Settings
Display and Monitor
Compositor
and in case it is enabled untick "Enable compositor on startup"

Disable with sudo systemctl all services you don't need

Do not use the Package-Manager. It will look for updates every minute and block your system

My Raspberry Pi2 is currently 24/7 connected to an internet Hotspot by USB Dongle,
is

  • AP by 2nd USB Dongle
  • Server, Samba Server
  • connected via ethernet to a further Raspberry B+
  • Router
  • accessible via TeamViewer and VNC
  • sharing my kontact mail-archive, located on a USB-Drive, all network computers with kontact installed can access the mail archive by mounting this drive via sshfs

uses

  • Chromium-Browser as default
  • Raspicomm for 2 outputs and RTC
    runs
  • MySql + phpmyadmin
    plays
  • video with a compiled older VLC version

it's a lot of fun!

update June 2020

Internet via Huawei Router "Humax" by True Thailand. Raspberry 2B replaced with Raspberry 3B+ (Raspberry 2B misses 2 gpio's but is still going strong, doing other tasks) Raspberry 2B SD-Card moved to Raspberry 3B+ without major problems.

Criteria:

IP address must always be the same, since this is a server for mysql, nfs

Issues

At start no wifi, Wlan0 accessible in Bash but not recognized by KDE.

Steps

Setting a reserved IP Address had no effect. Setting a static IP address in /etc/dhcpcd.conf helped. With that there was connectivity, so that apt-get, git etc could be used via wifi. But the Network-Manager-Applet in KDE was still showing a red icon and clicking on it produced an empty window. Digging deeper I learnt that the Mac-Address changed with every boot. I followed the hints on Network-Manager Mac Address in order to keep one Mac-Address and have the Network-Manager working. I stopped and disabled the dhcpcd.service, restarted wpa_supplicant.service and network-manager.service. After that the icon of Network-Manager changed and I could see several networks and connect to the router. In Wpa_supplicant.conf the password had been replaced with a link to a password-file. To make auto-connect work the link (not the password) needs to be used as passphrase in the Network-Manager

The difference between Raspberry 2B and Raspberry 3B+ is striking when using Chrome. For me less important since I am using this computer mostly heaadless but there is a visible clear improvement in overall performance.

There were some interesting reactions to my report about Raspberry 2B Some experts were telling me that it is not possible to run this KDE software on Raspberry 2B. That is funny. I still keep using it. All Computers in my network are using the same ui. Kontact archives located on a USB-drive are accessible from every PC in the network. There are more benefits. Cheers

update November 2020

My ISP TRUE-Thailand replaced the Huawei-router with a SKYWORTH GN542VF

  • Chromium-browser Version 84.0.4147.141 (Official Build) frequently caused crashes, remedy:
    zram.sh removed, replaced with zramswap
    settings:
    Allocated 1536Mb, Priority 25
    Solved, no more crashes so far.

  • Home-automation functions extended, switching off battery-charging and water-heater when off-grid (running on 3000 VA inverter), using ESP32 WiFi controllers w. Mosquitto,

  • Occasionally occurring undervoltage issues solved by connecting Pins 30 & 34 to GND terminal

KDE Desktop fully functional, including KDE Connect.

0

Command which is working:

sudo apt-get install kdeconnect

SOURCE

if you want to compile from source, so you have to do it with cmake

3
  • I did that and run it with kcmshell4 kdeconnect... but it opens up kde gui with not options or buttons in it... no way to pair a device... help me Jan 29, 2018 at 14:03
  • you can run in without gui. Look at this site community.kde.org/KDEConnect under Can I run KDE Connect without a display server
    – bierschi
    Jan 29, 2018 at 14:11
  • I have checked it now, and i don't understand how to pair my phone with command... what should i do? Jan 29, 2018 at 14:19
0

I installed KDE connect but it never opened, it shows blank gui with no buttons, maybe it needed some kde packages which are not available for arm raspberry pi yet...

Also, I was not able to cmake from source because cmake required some kde packages which were not available for arm raspberry pi (e.g. libkf5i18n-dev and many more)...

So, I made my own android app which syncs clipboard or text through wifi... I did that by using JSch library from Java to get SSH access and execute xclip command, You can see several such examples of JSch.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Jun 15, 2020 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.