0

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.

  • Well, it has that cmake file. Have you tried to run cmake .? – Dmitry Grigoryev Jan 29 '18 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 – Pankaj Kumar Jan 29 '18 at 15:26
1

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!

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

  • 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 – Pankaj Kumar Jan 29 '18 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 '18 at 14:11
  • I have checked it now, and i don't understand how to pair my phone with command... what should i do? – Pankaj Kumar Jan 29 '18 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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