kde-connect and IPtables save

mark@lucy:~$ sudo ufw allow 1714:1764/udp
[sudo] password for mark:
Rule added
Rule added (v6)
mark@lucy:~$ sudo ufw allow 1714:1764/tcp
Rule added
Rule added (v6)
mark@lucy:~$ sudo ufw reload
Firewall reloaded
mark@lucy:~$ sudo iptables -S


 

Also see https://technetset.com/install-kde-connect-1-0-kubuntu-16-04/


indicator-kdeconnect for 16.04 general Ubuntu releases, not KDE

September 16th, 2016 at 20:37 | #9

If it is just notifications you want then install an older version of kdeconnect along with indicator-kdeconnect and it works fine to share notifications between devices, share a clipboard, send files between devices and usesthe phone as a keyboard/mouse – plus browse device if it on kittkat or lower (doesn’t seem to work for android 5 or 6.

https://code.launchpad.net/~vikoadi/+archive/ubuntu/ppa/ has up to version 0.8, along with the indicator required for unity/gnome/pantheon/anything else not kde.
http://www.cnx-software.com/2016/09/15/receive-android-sms-call-notifications-in-ubuntu-16-04-with-kde-connect-or-not/

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys D05009CB


kde-connect v1 now part of kubuntu

###

kde-connect on Linux Mint 18 xfce - 16th Sept 2016

sudo apt-get install kdeconnect-plasma -y
sudo add-apt-repository ppa:lutostag/indicator-kdeconnect-test [lxle, hmmm]
or
sudo add-apt-repository ppa:vikoadi/ppa        [Official v1 ppa]
sudo apt-get update
sudo apt-get install indicator-kdeconnect -y

[lxle trying to get notifications on PC end to work]
@bam80 yeah unfortunately it is still a bit finicky.
The only way I get it to work currently is to run:
kcmshell5 kcm_kdeconnect 
# make sure it it connected to your device,
then only after that...

indicator-kdeconnect
#works for me and shows up in the system tray.

https://github.com/vikoadi/indicator-kdeconnect/issues/31

Added KDEConnect daemon in start up
Added indicator-kdeconnect in start up
https://forums.linuxmint.com/viewtopic.php?t=224013#p1205714

https://ubuntu-mate.community/t/kde-connect-indicator/634
-> Connect Indicator, you can now use KDE Connect in desktops which support
 Ubuntu AppIndicators, such as Unity, Pantheon (elementary OS), Xfce 
(Xubuntu) and so on.
http://www.makeuseof.com/tag/kde-connect-sync-android-linux/

https://code.launchpad.net/~vikoadi/+archive/ubuntu/ppa/

#########
14.04 – lxle install

sudo add-apt-repository ppa:vikoadi/ppa
sudo apt-get update ; sudo apt-get install indicator-kdeconnect -y

#########

 

ADD to LXsession configuration in AUTOSTARTUP!!!!

sudo iptables -A INPUT -i eth0 -m iprange --src-range 192.168.0.1-192.168.0.254  -p tcp --match multiport --dports 1714:1764 -j ACCEPT

sudo iptables -A INPUT -i eth0 -m iprange --src-range  192.168.1.1-192.168.1.254 -p udp --match multiport --dports 1714:1764 -j ACCEPT

sudo iptables -A INPUT -i eth0 -m iprange --src-range  10.64.64.64-10.64.64.254 -p udp --match multiport --dports 1714:1764 -j ACCEPT

####

https://www.digitalocean.com/community/tutorials/how-to-migrate-iptables-firewall-rules-to-a-new-server

 

List Rules by Specification

To list out all of the active iptables rules by specification, run the iptables command with the -S option:

sudo iptables -S

sudo iptables-save > iptables-export_base
sudo iptables-restore < iptables-export_base

 

https://www.thomas-krenn.com/en/wiki/Saving_Iptables_Firewall_Rules_Permanently#iptables-persistent_for_Debian.2FUbuntu

 

sudo apt-get install iptables-persistent -y

 

During the installation, you will asked if you want to save your current firewall rules. Response yes, if you want to save the current rule set.

 

If you update your firewall rules in the future, and want to save the changes, run this command:

 

sudo invoke-rc.d iptables-persistent save

Swaping lines in VIM

~/.vim/plugin/swap_lines.vim

CTRL-J
CTRL-K

source: http://stackoverflow.com/questions/741814/move-entire-line-up-and-down-in-vim

function! s:swap_lines(n1, n2)
    let line1 = getline(a:n1)
    let line2 = getline(a:n2)
    call setline(a:n1, line2)
    call setline(a:n2, line1)
endfunction

function! s:swap_up()
    let n = line('.')
    if n == 1
        return
    endif

    call s:swap_lines(n, n - 1)
    exec n - 1
endfunction

function! s:swap_down()
    let n = line('.')
    if n == line('$')
        return
    endif

    call s:swap_lines(n, n + 1)
    exec n + 1
endfunction

noremap <silent> <c-j> :call <SID>swap_up()<CR>
noremap <silent> <c-k> :call <SID>swap_down()<CR>

My notes to getting plug-ins working under Ubuntu with KeePass (OtpKeyProv)

This method does not work with KeePassX, plugins only work with KeePass2/?1 with mono underneath

http://maxolasersquad.blogspot.co.uk/2013/10/install-keepasshttp-on-ubuntu.html
cd /usr/lib/keepass2/
sudo mkdir plugins

cd plugins

https://sourceforge.net/p/keepass/discussion/329221/thread/d6f5b5b5/
you don’t need mono-complete
you only need a fitting compiler which is in the mono-dmcs package in ubuntu oneiric or newer and mono-gmcs in natty or older
sudo apt-get install mono-dmcs

https://launchpad.net/~jtaylor/+archive/ubuntu/keepass
sudo add-apt-repository ppa:jtaylor/keepass
sudo vi /etc/apt/sources.list.d/keepass2.list

then ADD for example:
**deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu utopic main **
**deb-src http://ppa.launchpad.net/jtaylor/keepass/ubuntu utopic main**

My goal was to get OtpKeyProv 2FA working