poniedziałek, 13 lutego 2023

FOSDEM 2023

This year I had a talk on FOSDEM in Brussels about recent LibreOfficeKit improvements.
Slides:

Video:

poniedziałek, 28 listopada 2022

COOLDays 2022 - Berlin

This year Collabora Productivity organized hybrid conference in Berlin. I've participated virtually by presenting video with recent improvements in JSDialogs which provides dialogs knwon from the LibreOffice for Collabora Online. Second talk was a short case study / tutorial how to add new component based on a mentioned framework.



sobota, 12 listopada 2022

Raspberry Pi OS with LUKS

Short notes with setup for working remote LUKS decrypt. Unofrtunately after cryptroot-unlock success it shutdowns the system :) Maybe I will try again when will find some time.
    1. Burn Rasberry Pi OS Lite image

    2. Create additional partition for encrypted root partition.

    3. Update and restart:
    apt-get update && apt-get upgrade
    sudo shutdown -r now
    
    4. Install deps:
    apt-get install busybox cryptsetup dropbear-initramfs lvm2
    
    5. Prepare partition:
    cryptsetup -v -y --cipher aes-xts-plain64 --key-size 256 luksFormat <newroot>
    cryptsetup -v luksOpen <newroot> sdcard
    mkfs.ext4 /dev/mapper/sdcard
    cryptsetup luksClose /dev/mapper/sdcard
    
    6. Configure partition in the system: check :
    blkid | grep crypto_LUKS
    
    open /etc/crypttab and add:
    sdcard    <newroot>    none    luks,initramfs
    
    open /etc/fstab and replace original root partition with:
    /dev/mapper/sdcard      /       ext4    defaults        0       1
    
    open /boot/cmdline.txt and replace existing partition config with:
    root=/dev/mapper/sdcard cryptdevice=<newroot>:sdcard
    
    also add at the end of the same file dhcp configuration:
    ip=:::::eth0:dhcp
    
    7. Configure early decryption:
    echo 'DROPBEAR_OPTIONS="-RFEsjk -c /bin/cryptroot-unlock"' > /etc/dropbear-initramfs/config
    echo "CRYPTSETUP=y" >> /etc/cryptsetup-initramfs/conf-hook
    
    8. Fix issue with short timeout for decryption:
    sed -i 's/^TIMEOUT=.*/TIMEOUT=100/g' /usr/share/cryptsetup/initramfs/bin/cryptroot-unlock
    
    9. Configure early remote access over SSH:
    touch /boot/ssh
    echo '<your_public_ssh_key>' > /etc/dropbear-initramfs/authorized_keys
    
    10. Copy files from original root partition to the new encrypted partition. 11. Generate initramfs:
    sudo mkinitramfs -o /boot/initramfs.gz
    echo "initramfs initramfs.gz" >> /boot/config.txt
    
    12. Reboot and try to connect remotely. Configs for ssh:
    Host pi
        HostName <ip>
        User user
        PreferredAuthentications password
    
    Host pi-enable
        HostName <ip>
        User root
        StrictHostKeyChecking no
        UserKnownHostsFile /dev/null
        IdentityFile ~/.ssh/<your_public_ssh_key>
    




Links:

https://github.com/ViRb3/pi-encrypted-boot-ssh

https://www.paxswill.com/encrypted-raspberry-pi/

https://www.kali.org/docs/arm/raspberry-pi-with-luks-full-disk-encryption/

https://www.arminpech.de/2019/12/23/debian-unlock-luks-root-partition-remotely-by-ssh-using-dropbear/

poniedziałek, 6 czerwca 2022

New formulabar in Collabora Online

I still continue conversion of various UI components in Collabora Online to "native" HTML widgets. This helps us to get better user experience especially on touch / mobile devices. This time I converted formulabar which is used to edit data in cells in the spreadsheets.

Previous "tunneled" approach had some disadvantages like blurry look under some conditions and cursor position setup depending on a pixel based coordinates. Now it become edit field which is rendered by the browser - so we have always crisp text. Position of the carret is represented as a logical value and also handled by the browser - so on touch devices it is much easier to type.

Here you can see how it looks on a smartphone:


poniedziałek, 7 lutego 2022

FOSDEM 2022 - Building Collabora Online UI using LibreOffice Components

Last weekend I participated in online event - FOSDEM 2022. Well known conference in the Open Source community, as described on the webpage: "FOSDEM is a free event for software developers to meet, share ideas and collaborate.".

I've presented my work from the recent year. Video and slides can be found here:
https://fosdem.org/2022/schedule/event/lotech_buildingcoolui/

poniedziałek, 14 czerwca 2021

Sidebar converted to „native” HTML controls

In the past I’ve converted sidebar into contextual menus for mobile version of Collabora Online. Since that time I was waiting for a moment when it will be possible to do similar thing for the desktop version of Collabora Online, the one that you use in the browser on your laptop. It is a good step to make UI unified and more convenient for a user.

In the new approach we use HTML controls with „native” listboxes and spinfields instead of pictures generated by the server. The data transfer from the server to the browser for fields invalidation should be reduced as we don’t have to send images. Widgets can be now styled using the same CSS like other UI components what will improve look of the sidebar. Thanks to the conversion for a desktop I also improved the mobile menus and did few optimizations.

Sidebar is still under development but looks promising:



poniedziałek, 26 października 2020

LibreOffice & OpenSUSE Conference 2020

Recently I participated in the annual LibreOffice conference. This year it was different: first because it was done together with OpenSUSE community and second it was online event. I had two talks about features I implemented last year: mobile tool palette and notebookbar on desktop.

Notebookbar

Mobile tool palette - reused sidebar from the desktop application.

Here you can see my slides:

piątek, 20 września 2019

Native widgets on mobile for Online - prototype

In the desktop suite we have the sidebar which is a context dependant feature improving user performance eg. in chart editing. Unfortunately it's not the perfect UI for a mobile clients, so the new concept is to tunnel the UI description to the browser and create native widgets there. I did some prototyping work in this area and I can see first results:

As we can see all basic widgets and layout are preserved. All sections are visible, it will be possible to create an UI where user will see only one section at time for better mobile experience. Complex controls like color selectors are not available yet (I'm going to use our color selector present in the toolbar). The development takes place in the feature branch.

czwartek, 5 września 2019

Hackerspace 3city - August with Open Source

This year in local Hackerspace in Gdańsk there was a series of meetups about Open Source related topics. I participated in one of them - IoT workshop about The Things Network and LoRaWAN by Inżynier Domu.
To be short: LoRaWAN is an open network for IoT devices which provides possibility to communicate eg. with a server side application. Interesting standard, but unfortunately not so popular in Poland yet (only one gateway in hs range - at Gdansk University of Technology).

Links to remember:
http://www.inzynierdomu.pl/lora-i-lorawan-czesc-1/
http://www.inzynierdomu.pl/lora-i-lorawan-czesc-2/
Photos from: https://www.facebook.com/pg/hackerspacetrojmiasto/posts

czwartek, 21 lutego 2019

Hack Week - Browsersync integration for Online

Recently my LibreOffice work is mostly focused on the Online. It's nice to see how it is growing with new features and has better UI. But when I was working on improving toolbars (eg. folding menubar or reorganization of items) I noticed one annoying thing from the developer perspective. After every small change, I had to restart the server to provide updated content for the browser. It takes few seconds for switching windows, killing old server then running new one which requires some tests to be passed.

Last week during the Hack Week funded by Collabora Productivity I was able to work on my own projects. It was a good opportunity for me to try to improve the process mentioned above.

I've heard previously about browsersync so I decided to try it out. It is a tool which can automatically reload used .css and .js files in all browser sessions after change detection. To make it work browsersync can start proxy server watching files on the original server and sending events to the browser clients if needed.

What is the advantage? Developer tools in the browser are not good enough?

  • Changes tracked by git - no need to copy changes from the browser's developer tools to the source files
  • You can setup testing matrix with all apps (writer, calc, impress) and all is reloaded instantly at one time (even on other devices like tablet or smartphone)
  • Fast prototyping

Disadvantages

  • You have to remember to run syntax tests before commiting the changes

To integrate browsersync I needed to do some build system changes. First, all static files are served from 'loleaflet/dist' directory. These files are not the original sources but copies. I modified the Makefiles to create symlinks instead if the browsersync is activated. Thanks to that we can modify sources tracked by git and proxy can detect changes.

To try it out on your own:

  1. Delete your 'loleaflet/dist' folder or
    make clean
    you might need to delete generated 'Makefile' if repository was used before
  2. Install browsersync:
    npm install -g browser-sync
  3. Run 'configure' script with additional --enable-browsersync argument
  4. Run server with:
    LOOL_SERVE_FROM_FS=1 make run
  5. In the other console run browsersync:
    make sync-[writer|calc|impress]
More information can be found in: 'loleaflet/README'

In the video below you can see how it works:

Next step will be to allow browsersync usage with cloud storage integrations like richdocuments, I noticed also some issues with access from other devices (app is still using original server for some resources).

wtorek, 27 marca 2018

Highlight colors customization for Calc

In Calc it is possible to activate "Value Highlighting" mode (Ctrl + F8). When activated, Calc displays cell contents in different colors, depending on type. By default Text cells are formatted in black, formulas in green, number cells in blue, and protected cells are shown with light grey background, no matter how their display is formatted. There was no possibility to change default colors what could be a problem for a color blind person. During my work for Collabora Productivity I introduced new entries to the "Application colors" tab in Calc options to fix this issue:

czwartek, 15 lutego 2018

Nixie clock #3 - NodeMCU & auto time update

Previous post: Nixie clock #2

Recently I finished my clock (electronics). All the code is uploaded on my github profile: clock repo.
I added automatic time update done by NodeMCU which connects to my predefined WiFi Access Point and after receiving the time, sends it over UART to the atmega microcontroller.

Spaghetti for testing and results:

Now I should design a case for this device...

wtorek, 2 stycznia 2018

Connect to the bluetooth serial port in linux

From time to time I use my bluetoth module HC-05 to communicate with microcontroller. Every time I have the same problem because I don't remember how to do that. Short receipe working for me (at least for openSUSE):
 sudo bluetoothctl  
 power on  
 agent on  
 scan on  
 pair <MAC>  
Then:
 sudo killall rfcomm  
 sudo rfcomm connect /dev/rfcomm0 <MAC> 1  

/dev/rfcomm0 is ready to use now.

source

piątek, 22 grudnia 2017

Nixie clock #2 - multiplexing

Previous post: Nixie clock #1

I had to choose my project for embedded systems classes (containing some kind of display, communication module, some other parts like sensors, etc.) and I proposed to continue with my nixie clock. I will have to add automatic time downloading from the internet. I'm going to use cheap & popular wifi module esp8366:


Today I finished my second PCB for this project, board performing signal multiplexing for tubes. Inputs are HV from the boost converter, digit and tube activation signals. On the output correct tube gets power supply and specified number pin is driven. I put a lot of work into it (done in period of 2-3 weeks in the evenings), fortunately the board works:



Nice views by copper & salts during etching so waiting wasn't too boring :)

środa, 6 grudnia 2017

Serverless architecture

Recently I've heard about idea called "serverless architecture". This is the next architecture proposal for web applications after very popular in recent years microservices. To be short, in this approach developers don't have to care much about server-side infrastructure. Great description can be found at martinfowler.com. Serverless concepts can be found in big providers' platforms like AWS or Azure. As I see on Azure platform there is 1M free function invocations per month what allows to create & start small applications for free. Development can be rapid due to provided integrations (in Azure - Logic Apps) with popular services (Salesforce, Office 365, Twitter, Dropbox, Google services).

wtorek, 13 czerwca 2017

Watermark for LibreOffice Writer

Recently I was working on Watermark feature for LibreOffice Writer. In case of TSCP Classification it was possible to add "Confidential" watermark in the document background. I extended that with possibility to add custom text, font family, color, transparency level and angle. Additional dialog was introduced in the menubar under "Insert" > "Watermark...".


I improved also export and import for that kind of shapes from .dotx files. Now font-family is correctly loaded:


RTF import also was improved, before Watermark was visible as a plain text:

czwartek, 4 maja 2017

AutoText import from .dotx and .dotm files

In the LibreOffice Writer user can prepare some pieces of documents which can be reused later. That feature is called AutoText and is accessible using menubar (Tools - AutoText). In the AutoText dialog it is possible to manage existing entries and also import new ones from files.
So far only *.dot and *.doc file formats were supported for importing AutoText. Here was my first task at Collabora: to add .dotx and .dotm format support.

One template document can contain multiple AutoText entires. Each entry has own name and can consist of formatted text, text with graphics, tables or fields. To import new templates user need to open AutoText dialog (Tools - AutoText), select according category and from the "AutoText" menubutton choose "Import". File explorer will appear. In the file format listbox new entries were introduced: "Microsoft Word 2007-2013 XML" and "Microsoft Word 2007-2013 XML Template" for *.docx and *.dotx or *.dotm.

AutoText has own long name and shortcut. It is possible to insert AutoText after typing shortcut name into document and pressing F3.

Following GIF shows *.dotx import with complex content (table, shape, formatted text and fields):

niedziela, 16 kwietnia 2017

Linux rescue after Windows 10 Creators Update

Last night I've updated my Windows 10. That was big update called "Creators Update". I don't know details what was changed (I noticed only new privacy settings and mail client) but one thing was significant for me as a linux user. When I wanted to switch to my openSUSE it opened rescue mode. It happend after I entered password to my encrypted home partition. My first thought: update modified my partition! Fortunately it was possible to open and mount it using cryptsetup. I checked also /etc/crypttable and I realized what is the root cause of my problems.
In my config I found /dev/sda7 but my current encrypted partition number is 6! Fast research and I found empty space on my disk between two partitions. Possibly the update removed one of partitions existing before (created during Windows 10 installation) and now all my linux partitions have decreased numbers.
I created new partition in the empty space. Reboot. Linux works.