FreedomBox/Debugging: Difference between revisions

From Wiki
(Move Debugging to new page)
 
(Update command for debug mode)
Line 16: Line 16:




====To run in debug mode (doesn't work for files under actions/ folder)====
====To run in debug (autoreload) mode (doesn't work for files under actions/ folder)====
<pre>
<pre>
rm /etc/plinth/plinth.config cd /vagrant systemctl stop plinth ./run --debug
sudo -u plinth /vagrant/run --develop
</pre>
</pre>



Revision as of 09:56, 13 May 2019

Development and Debugging

start from scratch

vagrant destroy -f;
vagrant box remove freedombox/plinth-dev;
vagrant up;
vagrant provision


To uninstall diaspora

apt remove --purge diaspora diaspora-common && echo "delete from plinth_module where name='diaspora';" | sqlite3 /var/lib/plinth/plinth.sqlite3


To run in debug (autoreload) mode (doesn't work for files under actions/ folder)

sudo -u plinth /vagrant/run --develop 


To open a file in emacs as root@vagrant

mkdir /root/.ssh 
cp /home/vagrant/.ssh/authorized_keys /root/.ssh


Run only one test

./setup.py test -s plinth.modules.sso.tests.test_auth_pubtkt_util.TestAuthPubTKTUtil.test_create_key_pair


Vagrant box download for plinth-dev

wget -O ~/FreedomBox/plinth-dev.box https://app.vagrantup.com/freedombox/boxes/plinth-dev/versions/<version>/providers/virtualbox.box


To use the local box instead of downloading from repo

vagrant box add --name freedombox/plinth-dev <box name>


Turning off mac address randomization in Network Manager

Add this line to all files in /etc/NetworkManager/system-connections under wifi or ethernet or whatever.

mac-address-randomization=0


Login into ttrss Postgresql database

sudo -n -u postgres /bin/bash postgres
psql -d ttrss -U ttrss -h localhost