Bug 119813 - FILEOPEN CSV import dialog doesn't get focus if libreoffice is already running [Ubuntu 18.04, 16.04]
Summary: FILEOPEN CSV import dialog doesn't get focus if libreoffice is already runnin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
Reported: 2018-09-11 18:17 UTC by Jesse McNichol
Modified: 2021-10-21 00:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse McNichol 2018-09-11 18:17:44 UTC
When opening .csv or .tsv files while another Libreoffice Calc spreadsheet is open, Libreoffice puts the dialog box out of focus. The user has to alt-tab into just to find the dialog box in order to open said file. This greatly reduces the functionality of Libreoffice calc for users who frequently work with plain text files.

I can confirm that issue was present in Ubuntu 16.04 and remains in 18.04.

Steps to Reproduce:
1. Open a libreoffice window or spreadsheet
2. Open a csv or tsv file from the file explorer
3. Note that you now have to alt-tab into a libreoffice window just to find the dialog box.

Actual Results:
One can access the dialog box, but it requires a lot of extra thinking and work.

Expected Results:
It should have brought the dialog to the front to allow for user input

Reproducible: Always

User Profile Reset: No

Additional Info:
Identical to https://bugs.documentfoundation.org/show_bug.cgi?id=32935 except for Ubuntu not Windows
Comment 1 Mike Kaganski 2018-09-11 19:33:56 UTC Comment hidden (obsolete)
Comment 2 Mike Kaganski 2018-09-11 19:36:43 UTC
Please disregard comment 1. I reproduce with Version:
Build ID: 1:6.0.3-0ubuntu1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

*when a spreadsheet is open* prior to double-clicking a CSV (just as OP mentioned in description).
Comment 3 Xisco Faulí 2018-09-12 09:01:52 UTC
I can't reproduce it in

ID de la construcció: 1:6.0.6-0ubuntu0.16.04.1
Fils de CPU: 4; SO: Linux 4.15; Renderitzador de la IU: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_ES.UTF-8); Calc: group

I have a spreadsheet already open and the dialog is prompted on top...
Comment 4 Xisco Faulí 2018-09-12 09:06:19 UTC
OTOH, I can reproduce it if I have the extension manager open and I open a CSV file in LibreOffice.... Similar to bug 119645
Comment 5 valentas 2019-01-17 07:10:33 UTC
Can reconfirm (why was the previous bug closed?) on Version: Build ID: 1:6.0.7-0ubuntu0.18.04.2 gtk3. 

In 18.04 I have a new non-deterministic bug: sometimes a dock icon on the left side panel is not created at all, if the first file you open is csv and the icon is not locked to the dock (not in "Favorites"): an icon is initially created for the import dialog but then disappears when you press OK, and does not reappear on opening any other files - this leaves just "alt+tab" for navigation an memomorizing what you have opened (or requires to keep Calc in "Favorites").
Comment 6 Miranda 2019-07-03 15:19:20 UTC
Good question.

I have tried to report this issue on antoher thread to also have it closed. 

This is why I don't report bugs. It is a waste of my time

Previous report on Bug 32935 : 
We are past the 8 year mark on this bug.

I hit it multiple times a day on Ubuntu 18.04.02 LTS using LibreOffice

Open LibreOffice open with cvs file (first file opens fine)
Select another csv file to open.
Import screen doesn't get focus.
Import screen is buried somewhere on desktop. (Must minimize all active windows to find.)

It happily lets you to try to open the same file again (giving you another buried import screen).

Note: Way back in 2010 there was a company willing to sponsor the fixing of this bug. So super annoying to see the bug report closed while people continue to report the issue.

here I see someone has also linked that bug report and it is still marked as fixed. Not fised as on 2019-07-02 on Ubuntu 18.10 and LibreOffice
Comment 7 Aron Budea 2019-07-04 07:03:27 UTC
(In reply to Miranda from comment #6)
> here I see someone has also linked that bug report and it is still marked as
> fixed. Not fised as on 2019-07-02 on Ubuntu 18.10 and LibreOffice
The other bug report was specifically opened on an issue encountered in Windows, which has been fixed since. Just because the symptoms are similar, it doesn't mean the cause is the same, and mixing different issues is really unhelpful for those willing to tackle one. Please consider their time as well.

On the other hand this bug report is certainly open.

> I hit it multiple times a day on Ubuntu 18.04.02 LTS using LibreOffice
Version is EOL, and will not receive updates (except perhaps security updates ported by Canonical). The current version is 6.2.4, with 6.3.0 beta 2 also available for testing.
Comment 8 Jesse McNichol 2020-07-07 20:23:49 UTC
For all of those encountering this baffling and difficult behaviour, there is a way to resolve this simply! Thank goodness!

I found the instructions in the link below worked for me (pasted below also for posterity):


I'm using LibreOffice Calc (Version:

I saw that various dialog windows (but not all) mostly did not get focus when they opened. I needed to alt+tab them or to mouse-click within the dialog window.

Then I came across an answer which entails setting Tools > Options > View > Mouse > Mouse positioning to "Dialog center". That works perfectly for me.

But why does it work? Does Mouse positioning to "Dialog center" incorporate a "click" to make the dialog window active? And shouldn't the default be to have a dialog window in focus as soon as it opens?
Comment 9 valentas 2020-07-11 19:53:39 UTC
(In reply to Jesse McNichol from comment #8)

Thanks Jesse McNichol, works for me.
The real solution would be to fix the code.
Comment 10 Aron Budea 2020-10-19 00:35:13 UTC
Since it's a workaround, not an actual fix, let's keep the bug open.

There's another case I can reproduce, it's not the same, but perhaps there's similarity, and it can be checked from the terminal with any version:
- in a terminal window, in a LO installation directory, run ./soffice
- in another terminal window, try to open a CSV from the terminal eg. ./soffice <CSV with location>

=> The splash screen will be shown, and persist, and the CSV import dialog will be opened in the original soffice instance, but it doesn't get focus.
Comment 11 Aldric Degorre 2021-01-05 10:02:18 UTC
I am also having this bug (KDE Neon 20.04, which is also Ubuntu based).

However, in the search results where I found the link to this issue, I also found  bug 119815, which looks like a duplicate of this one. Interestingly, the opener seems to have found the offending commit: <https://cgit.freedesktop.org/libreoffice/core/commit/?id=1092cc0c75f6d2ab649dd31b1db9f0a9f0944355>

Probably worth investigating? (Especially considering that bug 119815 did not get any non-automatic answer yet... )

Moreover, I would like to point to another unfortunate side effect under KDE Plasma desktop environment: if the first libreoffice window was already opened in some other activity*, not only the CSV import dialog will not be focused, but also it will open in the activity of the first libreoffice window instead of current activity (expected behavior).

Probably the window manager considers the CSV import dialog as a child window of the existing window (which it should definitely not be!).

*: activities are a KDE-centric feature comparable to virtual desktops. I did not try to reproduce the behavior in the case where the first libreoffice window was opened in the same activity but different virtual desktop yet, but I expect a similar result (be it with kwin or another window manager).
Comment 12 Jesse McNichol 2021-10-19 19:44:28 UTC
(In reply to Aldric Degorre from comment #11)
> I am also having this bug (KDE Neon 20.04, which is also Ubuntu based).

Hi Aldric - I recently switched to KDE Neon 20.04 and can confirm that the behaviour you're describing with activities occurs for me too. A simple workaround is to open a LibreOffice calc empty window in the current activity prior to opening my tsv. This way your dialog at least stays on the right activity but it does add an annoying additional step.

But I did find a way to bypass this awful behaviour through a bit of googling and looking at the related windows thread (https://bugs.documentfoundation.org/show_bug.cgi?id=32935). In that one, user John Griessen posted a potential workaround to bypass this csv/tsv dialog box from even opening but it doesn't work for KDE Neon. But then I came across this stackoverflow thread:


In it, the poster provides a piece of code that works to bypass the dialog box:

libreoffice --calc --infilter="Text - txt - csv (StarCalc):9,39,76,2,1/9"

In Dolphin, you can just right-click on a class of files (in my case TSV), click "Properties" > "File Type Options" > Under "Application Preference Order" Libreoffice calc should be at the top, so click it then "Edit" > go to "Application" tab, then just paste the above text before the "%U" (replacing whatever's there, e.g. "libreoffice --calc". Now it works for me to open tsv files directly from the file browser - they stay in the proper activity because the dialog box is never spawned.

Doesn't actually fix the bug but it does make LibreOffice usable with TSV files and multiple activities. Hopefully it helps someone.
Comment 13 Jesse McNichol 2021-10-19 20:51:11 UTC
Actually my workaround needs one more addition: If you do it exactly as I suggested in KDE, then "ods" files will be opened with the same flag which causes an input/output error. So the way I've got it working is to add a terminal command as the default program for TSV files. That seems to work and preserves .ods file associations so they're still opened with Libreoffice Calc using default parameters.
Comment 14 Jesse McNichol 2021-10-21 00:30:24 UTC
Another minor correction:

libreoffice --calc --infilter="Text - txt - csv (StarCalc):9,39,76,1,"

Otherwise, the first row and column will be cut off. You can change the comma-separated values to suit your use case.