rclone and symlinks: a good news

with -l you can copy (i.g. on Mega) your symlinks (as a file with .rclonelink as extension).
When you will sync from remote, that symlink will be created in your local system as symlink.


groups in nextcloud

Nextcloud is a very interesting, open source online platform. With /e/ you have a cloud of 5 free Gb with calendar, contacts and tasks shareable between PC and smartphone.
1) First of all you should export your data (calendar, tasks, contacts) from Google; a problem arises with contacts because Google export your contacts in a vcf file without groups.
2) So you have to import your contacts from vcf google file in nextcloud and re-create groups, which this time could be saved in a vcf file with groups (as categories).
3) To see your contacts and groups you have to use DAVx5 and in account settings - > cardDAV -> group organization you have to choose as in the following image:

not [ ] groups are separated vcards
but [x] groups are per-contact categories
4) This way you will be able to see your contacts and groups in your phone app (or in whatever other app).


edit views in phpmyadmin

You can go in view -> structure and find (below) "edit view". Then you can change something, i.g. adding a new field, not yet present when that view was created.


test sddm screen, without logging out

this is the code (in terminal):
sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze


phpmyadmin relations in views

You can create a relation between two tables, or better between a table and a view (more flexible), so that you can use data of related table/view in the table you are using.

But if you create a view from that table (a table whose structure is "related" to another one) you have to repeat (in structure view) the relation settings.


field name containing "-" not accepted in a mysql query

You have to put the field name into quotes "`" some-text (not working) -> `some-text` (working)


if Kodi doesn't resume your videos

You can try adding in .kodi/userdata a file named «advancedsetting.xml», whose content is something like:

batch convert absolute symlinks to relative

You can use the small program "symlinks" (i.e. in Kubuntu). Remember to indicate the complete path, i.g.
symlinks -rc /your/path


jobs in avidemux

Load 1st video, When finished making changes:

Avidemux menu: File -> Queue
in window "Queue job to joblist"
 Job name   : Job1 (name for job in joblist)
 Output file: click [Open] and choose name for saved video
Close that video (unless you want append the next)

Load 2nd video, When finished making changes
Avidemux menu: File -> Queue
in window "Queue job to joblist"
 Job name   : Job2 (name for job in joblist)
 Output file: click [Open] and choose name for saved video

Exit avidemux

Then, to avoid a bug, go in usr/bin, open a terminal and do
sudo ln -s avidemux2.7_cli avidemux3_cli
sudo ln -s avidemux2.7_qt5 avidemux3_qt5 
Start avidemux jobs (separate executable, same location where avidemux sits)

mark [v] use QT4 version (bottom of window)
press [Run jobs]


reference mode in epub

Because Calibre viewer doesn't support any more reference mode, we can do this workaround: add a css rule, like the following
body {
  counter-reset: section; }
h2 {
 counter-reset: paragraph; 

 counter-increment: section;
p::before {counter-increment: paragraph; content: "[cap." counter(section) ", para." counter(paragraph) "] ";
  color: gray; font-size: 70%;

This is an example of the result (the small text in gray is the css result):


re-color a whole image (in Gimp)

Colors -> Map -> Color Exchange

customize stamps (annotations) in Okular

  1. Create the icon you want to use for your own stamp and save it in any graphics format supported by Okular (as png)
  2. Click the Add button, select type Stamp and enter a name for your stamp.
  3. Enter the full path to your custom icon into the dropdown box in the Stamp Symbol group.


Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in

A possible reason is a lack of ' after SELECT from when you have a double undescore '__': i.g. "SELECT * from bibliografie__Taylor" could be wrong, try with SELECT * from `bibliografie__Taylor`.

msql order by several fields

You can separe the fields by a comma: .g. "ORDER by author, date"

symlinks on linux decoder

You need to have a relative (like "../../folder/file" or "folder/folder/file"), not an absolute one /(like "/mnt/your-path/file"): this latter indeed is effectual only in your computer, not on decoder.


set links as not visited

You must clear not the cache or cookies, but the browser history.


whatsapp web e social: a capo senza inviare

se premete enter vi parte il messaggio. Per andare a capo continuando a scrivere un messaggio: shift+enter


convert an ics file (exported from web calendar) as textual diary

  • sudo apt install python3-pip
  • pip3 install ics 
  • create the bash executable file, like this

se avete google

wget -O diario.ics https://calendar.google.com/calendar/ical/[remote path]/basic.ics
python3 convert-ics.py > /home/[local path]/local-file.md

se avete nextcloud

wget -O diario.ics https://ecloud.global/remote.php/dav/calendars/[vostra user(ad esempio la mail]/personal/?export --user=[il vostro user, come prima]--password=[la vostra password]

See also here.


embed database data in odt file

 the problem

In odt it is possible to insert some database data as fields in a odt file, but when you change data in phpmyadmin I get
1) a correct update in the data source view above the text,
2) not in the odt file (body: where are the fields): the fields texts remain unchanged, even after doing the command "update fields" (both from menu and from keyboard: F9, or shift+ctrl+F9).

a solution

A workaround is to use insert - section to insert a part of a php file via localhost.
  1. you will see in your odt file the content of the (section=div, of the) php file, as in the picture following:
    image description
  2. insert -> section -> link -> file name "http://localhost/[path]/[filename].php" -> section (the "id" name you have chosen in php file, i.g. inserting a <div id="biblio">[php/mysql code]</div> the section name will "biblio")
Of course, you must previously
  • activate a php/mysql server in local
  • and possibly have some knowledge of html/php source code.

avidemux too slow

It's better use (one of) the following codecs for encoding
  • x264
  • libavcodec MPEG-1/MPEG-2
  • libavcodec MPEG-4
  • Xvid 
so Avidemux will be able to optizmize the CPU usage and will be much faster. And the CPU temperature will be lower.

share (embedding) text between odt documents (librewriter)

Impossible use cross-reference or dde-link for more than a paragraph.
So the only way (to share more than a paragraph) are sections:
  1. define the area you want share in the file A as a bookmark;
  2. in the file B insert -> section -> as link - choose the file and the bookmark
  3. the text boormarked in A will be visible in B
It is not necessary a master document.


avoid b/w photos in librebase

You must set read-only the field of linked pictures, as in the image below:

problems with "locale"

In case of problems with locale (i.g. autokey not starting, or a file with non-latin characters not opening) you can try these commands
  • export LC_ALL="en_US.UTF-8"
  • export LC_CTYPE="en_US.UTF-8
  • sudo dpkg-reconfigure locales


calculate age from year of birth

There are two ways:

via php

## 2. in php
You can also use php code, as in the following way
(inspired from this page (https://stackoverflow.com/questions/3776682/php-calculate-age), and _slighty modified_: 

    $dob ="$row[anno_nascita]";
    $age = date_diff(date_create($dob), date_create('now'))->y;
    echo "age: $age years

via mysql in phpmyadmin

1.do this sql query:
     select *,year(CURDATE())-year(anno_nascita) age from studenti__classi; 
2. save the result as view
3. and so you will have, in the view, the age (of your students, i.g.) that can work in LibreBase (to connect with that view).


insert a text as field from an odt to another odt

0. Avoid to copy more than one paragraph: in that case the whole original file will be insert in the destination file.
1. copy an area in original file
2, paste special in destination file (as DDE link)


convert big (text) pdf files to word

This website has converted a big (5mb) text pdf file to word in a very good way.


symlinks on fat32 devices

You can use posixovl:
  • install posixovl (i.g. via synaptic);
  • rename /sbin/mount-posixovl -> mount-posixovl.orig;
  • create a new mount-posixovl in sbin:

# wrapper for mount.posixovl to conform with common mount syntax
# with this wrapper posixovl can be used in fstab

# location of the original mount.posixovl

# gather inputs
while [ $# -gt 0 ]; do
        if [[ "$1" == -* ]]; then
                # var is an input switch
                # we can only use the -o or -F switches
                if [[ "$1" == *F* ]]; then
                if [[ "$1" == *o* ]]; then
                        optsfuse="-- -o $1"
                # var is a main argument
                if [[ "$1" != -* ]]; then

# verify inputs
if [ "$sourcedir" == "" ]; then
        echo "no source specified"
        exit 1
if [ "$targetdir" == "" ]; then
        echo "no target specified"
        exit 1

# build mount.posixovl command
"$origposixovl" $optsF -S "$sourcedir" "$targetdir" $optsfuse

  • add to /etc/fstab something like this (depending on the name of your device):

LABEL=Basic\0402 /media/duns/basic2 vfat user,rw,noauto,uid=1000,gid=1000,iocharset=iso8859-1,shortname=mixed,showexec,utf8 1 2
/media/duns/basic2 /mnt/e-reader posixovl noauto 0 0

  • create a script, like this:

wmctrl -c mount.posixovl.orig
mount /media/duns/basic2
mount.posixovl -F /media/duns/basic2 /mnt/e-reader
krusader --left /mnt/e-reader/ebooks --right /mnt/zippati/eBooks


view djvu files with okular

Add "okular-extra-backends" in Synaptic.


customize grub in KDE Neon

0) Avoid Grub customizer: absolutely useless.

1) You can modify /etc/default/grub uncommenting GRUB_THEME="/boot/grub/themes/breeze/theme.txt"

2) Then you can modify /boot/grub/themes/breeze/theme.txt: for example you can
  • add a background: adding, in # General settings, a line such as "desktop-image: "your-image-in-the-same-folder.png" (obviously you have to put, as root, that image into the folder);
  • reducing the height for menu items, in "+ boot_menu": "item_height = 15" (not: 33)
3) do "sudo update-grub"

fine tuning

a) you can change the screen resolution (in /etc/default/grub);
  • give this command "xrandr" in order to know the supported resolutions 
  • then uncomment/modify GRUB_GFXMODE="your desired resolution"
b) you can create your own pf2 font file, with grub-mkfont:
for example "sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSans-10.pf2  --size=10 /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"

c) per installare nell'mbr
sudo grub-install /dev/sda

thermal monitor plasmoid not working

As explained here, if you have a bug in the thermal monitor plasmoid, to fix it you can change main.qml in .local/share/plasma/plasmoids as following (updated 22 feb 2020, adding ": []" after "property var systemmonitorAvailableSources"):

 * Copyright 2015  Martin Kotelnik
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import "../code/model-utils.js" as ModelUtils
import "../code/config-utils.js" as ConfigUtils

Item {
    id: main

    anchors.fill: parent

    property bool vertical: (plasmoid.formFactor == PlasmaCore.Types.Vertical)
    property bool planar: (plasmoid.formFactor == PlasmaCore.Types.Planar)

    property bool initialized: false

    // configuration
    property int temperatureUnit: plasmoid.configuration.temperatureUnit
    property string configuredResources: plasmoid.configuration.resources
    property int baseWarningTemperature: plasmoid.configuration.warningTemperature
    property int baseMeltdownTemperature: plasmoid.configuration.meltdownTemperature
    property int updateInterval: 1000 * plasmoid.configuration.updateInterval

    property int itemMargin: 5
    property double itemWidth:  0
    property double itemHeight: 0

    property color warningColor: Qt.tint(theme.textColor, '#60FF0000')
    property var textFontFamily: theme.defaultFont.family

    Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation

    property double aliasFontSize: itemHeight * plasmoid.configuration.aliasFontSize * 0.01
    property double temperatureFontSize: itemHeight * plasmoid.configuration.temperatureFontSize * 0.01
    property double iconFontSize: itemHeight * plasmoid.configuration.iconFontSize * 0.01
    property double temperatureRightMargin: itemHeight * plasmoid.configuration.temperatureRightMargin * 0.01
    property double iconBottomMargin: itemHeight * plasmoid.configuration.iconBottomMargin * 0.01
    property bool enableLabelDropShadow: plasmoid.configuration.enableLabelDropShadow

    property var systemmonitorAvailableSources : []
    property var systemmonitorSourcesToAdd

    property int numberOfParts: temperatureModel.count

    property double parentWidth: parent !== null ? parent.width : 0
    property double parentHeight: parent !== null ? parent.height : 0

    property double widgetWidth: 0
    property double widgetHeight: 0

    Layout.preferredWidth: widgetWidth
    Layout.preferredHeight: widgetHeight

    property bool debugLogging: false

    function dbgprint(msg) {
        if (!debugLogging) {
        print('[thermalMonitor] ' + msg)

    onParentWidthChanged: setWidgetSize()
    onParentHeightChanged: setWidgetSize()
    onNumberOfPartsChanged: setWidgetSize()

    function setWidgetSize() {
        if (!parentHeight) {
        var orientationVertical = false
        if (planar) {
            var contentItemWidth = parentHeight
            var contentWidth = numberOfParts * contentItemWidth + (numberOfParts-1) * itemMargin
            var restrictToWidth = contentWidth / parentWidth > 1
            itemWidth = restrictToWidth ? (parentWidth + itemMargin) / numberOfParts - itemMargin : contentItemWidth
        } else if (vertical) {
            orientationVertical = true
            itemWidth = parentWidth
        } else {
            itemWidth = parentHeight
        itemHeight = itemWidth
        widgetWidth = orientationVertical ? itemWidth : numberOfParts * itemWidth + (numberOfParts-1) * itemMargin
        widgetHeight = orientationVertical ? numberOfParts * itemHeight + (numberOfParts-1) * itemMargin : itemHeight

    FontLoader {
        source: '../fonts/fontawesome-webfont-4.3.0.ttf'

    Image {
        id: noResourceIcon;

        anchors.centerIn: parent

        visible: temperatureModel.count === 0

        height: itemHeight
        width: height

        source: '../images/thermal-monitor.svg'

    ListView {
        id: listView

        anchors.centerIn: parent
        width: widgetWidth
        height: widgetHeight

        orientation: !planar && vertical ? ListView.Vertical : ListView.Horizontal
        spacing: itemMargin

        model: temperatureModel

        delegate: TemperatureItem {}

     * One object has these properties: temperature, alias and other
    ListModel {
        id: temperatureModel

    Component.onCompleted: {
        plasmoid.setAction('reloadSources', i18n('Reload Temperature Sources'), 'system-reboot');

    onBaseWarningTemperatureChanged: {

    onBaseMeltdownTemperatureChanged: {

    onConfiguredResourcesChanged: {
        dbgprint('configured resources changed')

    function tryReloadSources() {
        if (!initialized) {
            dbgprint('applet not initialized -> no reloading sources')

    function getSystemmonitorAvailableSources() {
        if (!systemmonitorAvailableSources) {
            systemmonitorAvailableSources = systemmonitorDS.sources
        return systemmonitorAvailableSources

    function action_reloadSources() {

    function reloadAllSources() {

        dbgprint('reloading all sources...')

        var resources = ConfigUtils.getResourcesObjectArray()


        if (!systemmonitorSourcesToAdd) {
            systemmonitorSourcesToAdd = []

        if (systemmonitorDS.connectedSources === undefined) {
            systemmonitorDS.connectedSources = []

        if (udisksDS.connectedSources === undefined) {
            udisksDS.connectedSources = []

        if (nvidiaDS.connectedSources === undefined) {
            nvidiaDS.connectedSources = []

        if (atiDS.connectedSources === undefined) {
            atiDS.connectedSources = []

        systemmonitorSourcesToAdd.length = 0
        systemmonitorDS.connectedSources.length = 0
        udisksDS.connectedSources.length = 0
        udisksDS.cmdSourceBySourceName = {}
        nvidiaDS.connectedSources.length = 0
        atiDS.connectedSources.length = 0

        ModelUtils.initModels(resources, temperatureModel)

        for (var i = 0; i < temperatureModel.count; i++) {
            var tempObj = temperatureModel.get(i)
            var source = tempObj.sourceName

            if (source === 'group-of-sources') {

                dbgprint('adding group: ' + tempObj.alias)

                for (var childSource in tempObj.childSourceObjects) {

                    dbgprint('adding source (for group): ' + childSource)



            } else {




        initialized = true

        dbgprint('reloadAllSources() DONE')

    function addSourceToDs(source) {

        if (source.indexOf('udisks/') === 0) {

            var diskLabel = source.substring('udisks/'.length)
            var cmdSource = ModelUtils.getUdisksTemperatureCmd(diskLabel)
            udisksDS.cmdSourceBySourceName[cmdSource] = source

            dbgprint('adding source to udisksDS: ' + cmdSource)

            addToSourcesOfDatasource(udisksDS, cmdSource)

        } else if (source.indexOf('nvidia-') === 0 && nvidiaDS.connectedSources.length === 0) {

            dbgprint('adding source to nvidiaDS')

            addToSourcesOfDatasource(nvidiaDS, nvidiaDS.nvidiaSource)

        } else if (source.indexOf('aticonfig') === 0 && atiDS.connectedSources.length === 0) {

            dbgprint('adding source to atiDS')

            addToSourcesOfDatasource(atiDS, atiDS.atiSource)

        } else {

            dbgprint('adding source to systemmonitorDS: ' + source)

            if (getSystemmonitorAvailableSources().indexOf(source) > -1) {
                dbgprint('adding to connected')
                addToSourcesOfDatasource(systemmonitorDS, source)
            } else {
                dbgprint('adding to sta')



    function addToSourcesOfDatasource(datasource, sourceName) {
        if (datasource.connectedSources.indexOf(sourceName) > -1) {
            // already added
            dbgprint('source already added: ' + sourceName)

    PlasmaCore.DataSource {
        id: systemmonitorDS
        engine: 'systemmonitor'

        property string lmSensorsStart: 'lmsensors/'
        property string acpiStart: 'acpi/Thermal_Zone/'

        onSourceAdded: {

            if (source.indexOf(lmSensorsStart) === 0 || source.indexOf(acpiStart) === 0) {

                var staIndex = systemmonitorSourcesToAdd.indexOf(source)
                if (staIndex > -1) {
                    addToSourcesOfDatasource(systemmonitorDS, source)
                    systemmonitorSourcesToAdd.splice(staIndex, 1)



        onNewData: {
            var temperature = 0
            if (data.value === undefined) {
                dbgprint('data for source ' + sourceName + ' not yet available')
            } else {
                temperature = parseFloat(data.value)
            ModelUtils.updateTemperatureModel(temperatureModel, sourceName, temperature)
        interval: updateInterval

    PlasmaCore.DataSource {
        id: udisksDS
        engine: 'executable'

        property var cmdSourceBySourceName

        onNewData: {

            dbgprint('udisks new data - valid: ' + valid + ', stdout: ' + data.stdout)

            var temperature = 0
            if (data['exit code'] > 0) {
                dbgprint('new data error: ' + data.stderr)
            } else {
                temperature = ModelUtils.getCelsiaFromUdisksStdout(data.stdout)

            ModelUtils.updateTemperatureModel(temperatureModel, cmdSourceBySourceName[sourceName], temperature)
        interval: updateInterval

    PlasmaCore.DataSource {
        id: nvidiaDS
        engine: 'executable'

        property string nvidiaSource: 'nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader'

        onNewData: {
            var temperature = 0
            if (data['exit code'] > 0) {
                dbgprint('new data error: ' + data.stderr)
            } else {
                temperature = parseFloat(data.stdout)

            ModelUtils.updateTemperatureModel(temperatureModel, 'nvidia-smi', temperature)
        interval: updateInterval

    PlasmaCore.DataSource {
        id: atiDS
        engine: 'executable'

        property string atiSource: 'aticonfig --od-gettemperature | tail -1 | cut -c 43-44'

        onNewData: {
            var temperature = 0
            if (data['exit code'] > 0) {
                dbgprint('new data error: ' + data.stderr)
            } else {
                temperature = parseFloat(data.stdout)

            ModelUtils.updateTemperatureModel(temperatureModel, 'aticonfig', temperature)
        interval: updateInterval

    Timer {
        interval: updateInterval
        repeat: true
        running: true
        onTriggered: {



gdrive su dolphin

In Kubunti o Neon: 
sudo apt install kio-gdrive


link, rather than embed images in odb file

Today I followed this way: link rather than embed the images, so that the odb file can remain of small size.
1. in edit view add a text box in your form and
2. convert it (replace with) to a image control
3. in normal view double click on the new box and select the image, which will not embedded, but linked.

with mysql

If you use a mysql database you can set the field as varchar (at least 150 char) and insert the location, such as http://localhost/your-path/yourfile.jpg.
Then you can add this field as data in the text box (as above).


avoid blur in sddm screen and lock screen

1) login screen

SDDM Breeze 5.13.0 main.qml has:

Code: Select all
        WallpaperFader {
            visible: config.type == "image"
            anchors.fill: parent
            state: loginScreenRoot.uiVisible ? "on" : "off"
            source: wallpaper
            mainStack: mainStack
            footer: footer
            clock: clock

Code: Select all
visible: config.type == "image"

Code: Select all
visible: false


Testing - no blur at here.

2) lock screen

 You have to change LockScreenUi.qml in /usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen as well, adding the same row:

visible: false

in  WallPaperFader


adb connect via wi-fi

  • Connect Android phone and host machine to same WiFi network
  • Connect Android phone to host machine using USB cable (to start with)
  • Run adb tcpip 5555 from a command prompt
  • Run adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1" to obtain the phone's IP address
  • Disconnect USB cable and run adb connect < ip_address > :5555


videochiamate (whatsapp e simli) su linux

Sconsigliatissimo whatdesk (via snap): non fa video né audio chiamate; fa le stesse cose di whatsappweb, solo consumando molto più spazio e memoria.

Un po' meglio Franz, anche come appimage, che però fa videochiamate solo con Skype, non con Whatsapp o Icq (anche lì: fa lo stesso delle corrispondenti pagine web).

start autokey minimized

delete -c from command:

autokey-gtk -c -> autokey-gtk


programmare (schedule) un evento

Si può usare, in Linux, crontab. Così:

1. Create uno script. Ad esempio, se volete che vi sia ricordato di bere:


kdeconnect-cli --ping-msg "ricordati di bere!" -d d30fdc9ed6e2bf56
play /mnt/musica/avviso.wav &&
zenity --info --display=:0.0 \
    --text="Time is $(date +%Hh%M)\n\nricordati di bere." \
    --title="drink time"

2. creare un evento crontab
    a. in un terminale digitale crontab -e
    b. digitare, ad esempio in nano, 30 8-11,15-18 * * * /path/to/script

Per vedere se il sistema ha salvato correttamente il proprio file di cron, digitare il seguente comando:
crontab -l
3. Per avere anche sullo smartphone l'avviso dovete avere kdeconnect


start boot service in Linux

  1. Run this command
    sudo nano /etc/systemd/system/YOUR_SERVICE_NAME.service
  2. Paste in the command below. Press ctrl + x then y to save and exit
    ExecStart=/opt/lampp/lampp start
    ExecStop=/opt/lampp/lampp stop
  3. Reload services
    sudo systemctl daemon-reload
  4. Enable the service
    sudo systemctl enable YOUR_SERVICE_NAME
  5. Start the service
    sudo systemctl start YOUR_SERVICE_NAME
  6. Check the status of your service
    systemctl status YOUR_SERVICE_NAME
  7. Reboot your device and the program/script should be running. If it crashes it will attempt to restart

mount ntfs disk as non-root user

You can use udisksctl command.
udisksctl mount -b /dev/disk/by-uuid/40B133AC2360CFAF
udisksctl mount -b /dev/disk/by-label/hd.esterno

read text in LibreOffice

1) La soluzione  migliore non è espeak, ma pico (python -> pico). Bisogna ovviamente installare le librerie di pico (sudo apt install libttspico-utils).
2) per modificare le opzioni tootls -> add-ons-> read text
3) installare preferibilmente smplayer e settarlo per i files wav.
Cfr. qui.

condividere tags tra Digikam e Dolphin (/baloo)

Occorre avere una versione non-appimage di Digikam.
Poi andare in settings -> metadata -> baloo e selezionare la sincrinizzazione.


cambiare formattazione ai campi in LibreOffice

Change style in fields:
I campi in LibreWriter, a mio parere, hanno di default uno sfondo troppo scuro, che rende difficile la leggibilità del testo. Per cui si può modificarne lo sfondo, come segue:

Modify option Field Shadings in Option -> Tools -> LibreOffice -> Application Colors -> Cat: Text Document according to you preferred color (light grey, f.e.).

visualizzare il testo hidden in LibreWriter

Display hidden text: Tools -> Options -> LibreOffice Writer ->Formatting Aids > Hidden Text must be checked.


eliminare da thunderbird indirizzi sbagliati

Si veda questo thread. 
Ricordarsi poi di sincronizzare con Google contacts (se l'avete).


formattare codice in blogger

Si può usare questo sito.

python script per cycle case (lower - mixed - upper)

Utile con autokey. Eccolo:
 # Get the current selection.  
   if not store.has_key("textCycle"):  
 # get saved value of textCycle  
 state = store.get_value("textCycle")  
 # modify text and set next modfication style  
 if state == "title":  
   newstate = "lower"  
 elif state == "lower":  
   newstate = "upper"  
 elif state == "upper":  
   newstate = "title"  
   newstate = "lower"  
 # save for next run of script  
 # Send the result.  

convertire un documento in html/epub

E' meglio non farlo direttamente da LibreOffice, ma con FF Multiconverter, che usa i tag i e b, e non span. Il che permette di ripulire bene, successivamente,  il codice sorgente.


LO: tradurre una parola e scrievere quella tradotta a fianco di querla originale

Si tratta di una macro per LibreOffice, con l'estensione Traduttore; ho copiato, da un sito per imparare inglese, un elenco di verbi inglesi, non tradotti; così ho cercato di velocizzare il prcesso di traduzione e aggiunta della parola tradotta a fianco di quella originale.

Riporto la soluzioone, dal sito AskLibreOffice:

Solved, with the help of macro's author!
  • After inserting ~/.config/libreoffice/4/user/Scripts/python/TradutorLibreText.py
  • and after installing libreoffice-script-provider-python
This is my macro
sub translate_word rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "Language" args1(0).Value = "Current_Italian (Italy)" dispatcher.executeDispatch(document, ".uno:LanguageStatus", "", 0, args1()) rem--nuovo inserim inizio Dim oScriptProvider, oScript oScriptProvider = ThisComponent.getScriptProvider() oScript = oScriptProvider.getScript("vnd.sun.star.script:TradutorLibreText.py$TradutorLibreText?language=Python&location=user") oScript.invoke(array(), array(), array()) rem--nuovo inserim fine rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:WordLeftSel", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Undo", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Undo", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:GoToEndOfLine", "", 0, Array()) rem ---------------------------------------------------------------------- dim args7(0) as new com.sun.star.beans.PropertyValue args7(0).Name = "Text" args7(0).Value = " " dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args7()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array()) rem ---------------------------------------------------------------------- dim args9(0) as new com.sun.star.beans.PropertyValue args9(0).Name = "Text" args9(0).Value = ")" dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args9()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:GoToPrevWord", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:GoToPrevWord", "", 0, Array()) rem ---------------------------------------------------------------------- dim args12(0) as new com.sun.star.beans.PropertyValue args12(0).Name = "Text" args12(0).Value = "(" dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args12()) rem ---------------------------------------------------------------------- dim args13(1) as new com.sun.star.beans.PropertyValue args13(0).Name = "Count" args13(0).Value = 1 args13(1).Name = "Select" args13(1).Value = false dispatcher.executeDispatch(document, ".uno:GoLeft", "", 0, args13()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:WordRightSel", "", 0, Array()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:WordRightSel", "", 0, Array()) rem ---------------------------------------------------------------------- dim args16(1) as new com.sun.star.beans.PropertyValue args16(0).Name = "Count" args16(0).Value = 1 args16(1).Name = "Select" args16(1).Value = true dispatcher.executeDispatch(document, ".uno:GoRight", "", 0, args16()) rem ---------------------------------------------------------------------- dim args17(0) as new com.sun.star.beans.PropertyValue args17(0).Name = "Color" args17(0).Value = 8421504 dispatcher.executeDispatch(document, ".uno:Color", "", 0, args17()) rem ---------------------------------------------------------------------- dim args18(2) as new com.sun.star.beans.PropertyValue args18(0).Name = "FontHeight.Height" args18(0).Value = 8 args18(1).Name = "FontHeight.Prop" args18(1).Value = 100 args18(2).Name = "FontHeight.Diff" args18(2).Value = 0 dispatcher.executeDispatch(document, ".uno:FontHeight", "", 0, args18()) end sub


rippare sottotitoli da video online

Anche con Firefox si può:
  • attivare inspect element (ad esempio ctrl+shift +I)
  • scegliere network 
  • dare eventualmente F5 
  • cercare la riga con estensione vtt
  • tasto destro del mouse: apri in una nuova scheda
  • salvate il testo che vi apparirà (con un po' di pazienza) come .srt
  • aggiungetelo al video con il programma apposito
Cfr. https://www.youtube.com/watch?v=rzkqJLEIPOQ


Krusader: per sincronizzare


si può aprire da terminale Krusader scegliendo quale pannello debba stare a sinistra e quale a destra, ad esempio
"krusader --left /path --right /media/path"

escludere certi (tipi di) files dalla sincrinizzazione

In file filter anteporre | al tipo di file. Ad esempio "| *.ini" per escludere dalla sincro i files con estensione ini.


LibreOffice: vedere a che punto della struttura dei capitoli siamo

Dobbiamo premere su "Content navigation view", cioè l'icona nell'immagine qui sotto:


android iphone-like

Se uno vuole rendere il proprio smartphone android il più possibile simile a un iphone può provare a) a ragguppare le apps in modo personalizzato e b) ad avere notifiche a schermo non attivo.

launcher iphone-like

La prima cosa si può fare con X Launcher: che permette di creare dei folder a vostra scelta, dentro cui potere mettere le apps che volete, così da avere uno smartphone perfettamente ordinato.

notifiche iphone-like

La seconda cosa è più ardua: ho tentato con Dynamic notifications, con Floatify e con Lockscreen notifications, ma non ho trovato quello che cercavo; queste apps creano una nuova schermata di blocco che si accende quando arriva una notifica, non mostrano le notifiche a schemo (parzialmente) spento.
A questo punto tanto vale usare Glimpse notifications che ha meno pretese, è più leggero e aggiornato, e usa la normale schermata di blocco dello smartphone, accendendola quando arrivano delle notifiche.

In conclusione: pare che su android non sia possibile avere la funzionalità dell'iphone, di avere notifiche a schermo (parzialmente) spento, ma all'arrivo delle notifiche lo schermo si accende (totalmente).


usare un range extender tp-link per ampiare la rete wifi

Si può accendere l'apparecchio, collegare via cavo ethernet a un computer e usarlo come connessione internet digitando nel browser:
Si aprirà una finestra dove inserire le credenziali (admin/admin), e poi potrete settare a quale "fonte" wifi l'extender deve collegarsi; vi sarà cheisto ovviamente di digitare la password del wifi "originante". Due minuti di attesa e la connessione è fatta.
Almeno a me ha funzionato.


exclude a program from autokey

Per settare più programmi con autokey, in window filter

per escludere un programma da un item di autokey 

Si può usare questa regex: ^((?!.*Firefox).)*$
In questo caso escludiamo Firefox: non occorre mettere tutto il nome della window, ma solo la parte finale (senza spazi o punti). In effetti la finestra di Firefox sarebbe "Navigator.Firefox", ma così non funzionerebbe.

un bug 

L'esclusione suddetta non funziona per il terminale (konsole). Speriamo che risolvano. Per aggirare questo ostacolo si possono indicare (positivamente) tutti gli altri programmi in cui si usa quella abbreviazione.


css: applicare o rimuovere una classe all'elemento "parent"

Si può ricorrere a jquery.
Mettiamo che io voglia applicare la class "noquote" (che toglie le virgolette all'inizio del paragrafo) a un p al cui interno si trova uno span. La sintassi è questa:
    $( "p:has(> span)" ).addClass( "noquote" );
Se invece io voglio che p abbia le virgolette all'inizio se lo span ha una certa classe (mettiamo "evid"), la sintassi è la seguente:

Blog Archive