Dbeaver: Feature Request: Flatpak support

Created on 1 Mar 2018  路  29Comments  路  Source: dbeaver/dbeaver

Please add Flatpak support and perhaps include Dbeaver on flathub. This could also solve ticket #2818. Thank you for this great package.

feature request

Most helpful comment

Created PR https://github.com/flathub/flathub/pull/695
Hope that maintainers agree and that it can pass flathub inspection.
:crossed_fingers:

All 29 comments

Good point.

this would be awesome :) I'm tired of manually upgrading the rpms... especially because i have to uninstall it each time and use rpm instead of dnf to install the newer one.

however, I'll continue doing w/e it takes because dbeaver is the best.

It would be great to be able to install and update it from flathub!

Created PR https://github.com/flathub/flathub/pull/695
Hope that maintainers agree and that it can pass flathub inspection.
:crossed_fingers:

I like this 馃憤
Although I cannot validate package config.

I created Flatpak app as io.dbeaver.DBeaverCommunity but later in the code I saw that you used namespace org.jkiss.. so another proposed name is org.jkiss.DBeaverCommunity
it's up to you to decide what name you want, that is the only blocker currently.

We are moving from jkiss namespace (it is a really old story) to dbeaver.
io.dbeaver.DBeaverCommunity or io.dbeaver.dbeaver-ce (or shorter - just dbeaver-ce) will be fine.

@serge-rider are you the one who should also have access to flatpak repo for dbeaver?

I am the owner of dbeaver/dbeaver repository so I think this would make sense.
Thanks :)

Great work, guys!!!

I have some issues with the encoding of Spanish characters, but it works really fine.

I'm not familiar with flatpak so sorry for dummy questions ;)

  • Package depends on org.freedesktop.Platform which is almost 170mb - is this really required?
  • I can't realize where it is actually installed on my local machine (I wanted to see configuration to try to resolve problem described below).

I successfully installed it under Ubuntu 18 but failed when running:
I can't open SQL editor or object editor with different weird errors - looks like GTK failing all the time.
Error like this:

2018-11-07 14:49:13.682 - > Start org.jkiss.dbeaver.ext.erd [2.0.98.201811051019]

(DBeaver:19): Gtk-WARNING **: 14:49:14.951: Negative content height -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
Gdk-Message: 14:49:15.218: Unable to load hand2 from the cursor theme
2018-11-07 14:49:15.219 - Internal error in workbench lifecycle
org.eclipse.swt.SWTError: No more handles
    at org.eclipse.swt.SWT.error(SWT.java:4621)
    at org.eclipse.swt.SWT.error(SWT.java:4510)
    at org.eclipse.swt.SWT.error(SWT.java:4481)
    at org.eclipse.swt.graphics.Cursor.<init>(Cursor.java:183)
    at org.eclipse.swt.widgets.Display.getSystemCursor(Display.java:3011)
    at org.eclipse.jface.text.source.OverviewRuler.createControl(OverviewRuler.java:564)
    at org.eclipse.jface.text.source.SourceViewer.createControl(SourceViewer.java:444)
    at org.eclipse.jface.text.source.SourceViewer.<init>(SourceViewer.java:426)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.<init>(ProjectionViewer.java:315)
    at org.jkiss.dbeaver.ui.editors.sql.SQLEditorSourceViewer.<init>(SQLEditorSourceViewer.java:42)
    at org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createSourceViewer(SQLEditorBase.java:406)
    at org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createSourceViewer(SQLEditorBase.java:381)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3336)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:64)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:451)
    at org.jkiss.dbeaver.ui.editors.text.BaseTextEditor.createPartControl(BaseTextEditor.java:144)
    at org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createPartControl(SQLEditorBase.java:261)
    at org.jkiss.dbeaver.ui.editors.sql.SQLEditor.createPartControl(SQLEditor.java:658)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:156)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:102)

or

2018-11-07 14:52:24.562 - Event loop exception
java.lang.NullPointerException
    at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:183)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
    at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
    at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:469)
    at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
    at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:207)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
    at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
    at org.eclipse.swt.widgets.Control.setBounds(Control.java:977)
    at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:126)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
    at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
    at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
    at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:207)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
    at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
    at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
    at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:696)
    at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:200)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
    at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1853)

Any thoughts?

Huh, not really, had ubuntu 18.10 in boxes, clean install and just tried from scratch and it works

dac@dac-Standard-PC-i440FX-PIIX-1996:~$ flatpak --version
Flatpak 1.0.4
dac@dac-Standard-PC-i440FX-PIIX-1996:~$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
dac@dac-Standard-PC-i440FX-PIIX-1996:~$ flatpak install flathub io.dbeaver.DBeaverCommunity
dac@dac-Standard-PC-i440FX-PIIX-1996:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10
DISTRIB_CODENAME=cosmic
DISTRIB_DESCRIPTION="Ubuntu 18.10"

Installed DBeaver, connected to PostgreSQL database and fiddle a bit in SQL Editor.
This is from that VM.

A quick google suggests display problems, maybe it's some Canonical new "feature"? They like to tweak things just to stamp them with Ubuntu logo. If you can't solve this please open issue against https://github.com/flathub/io.dbeaver.DBeaverCommunity so I can raise question there.

Regarding Flatpak, if you read this intro, it covers most of the things -> http://docs.flatpak.org/en/latest/introduction.html
Regarding freedesktop runtime, it's shared with other flatpak apps so it's onetime only install.
Usually, people that use flatpaks already have runtime installed.

Org.freedesktop.platform is a common runtime that is shared by most applications. It's certainly require, but likely downloaded already when a previous application was installed.

The flatpak file is stored in /var/lib/flatpak/app as per https://github.com/flatpak/flatpak/wiki/Filesystem

It's only uncompressed when it's run and then it goes into the /app directory in the sandbox. I don't know how off the top of my head to run a shell in the sandbox, but it is possible.

My knee jerk reaction for the errors you're seeing is that a dependancy was missed, (?gtk runtime?) but I don't know anything for fact.

On November 7, 2018 2:02:55 PM CST, Serge Rider notifications@github.com wrote:

I'm not familiar with flatpak so sorry for dummy questions ;)

  • Package depends on org.freedesktop.Platform which is almost 170mb -
    is this really required?
  • I can't realize where it is actually installed on my local machine (I
    wanted to see configuration to try to resolve problem described below).

I successfully installed it under Ubuntu 18 but failed when running:
I can't open SQL editor or object editor with different weird errors -
looks like GTK failing all the time.
Error like this:

2018-11-07 14:49:13.682 - > Start org.jkiss.dbeaver.ext.erd
[2.0.98.201811051019]

(DBeaver:19): Gtk-WARNING **: 14:49:14.951: Negative content height -7
(allocation 6, extents 6x7) while allocating gadget (node separator,
owner GtkSeparatorToolItem)
Gdk-Message: 14:49:15.218: Unable to load hand2 from the cursor theme
2018-11-07 14:49:15.219 - Internal error in workbench lifecycle
org.eclipse.swt.SWTError: No more handles
  at org.eclipse.swt.SWT.error(SWT.java:4621)
  at org.eclipse.swt.SWT.error(SWT.java:4510)
  at org.eclipse.swt.SWT.error(SWT.java:4481)
  at org.eclipse.swt.graphics.Cursor.<init>(Cursor.java:183)
  at org.eclipse.swt.widgets.Display.getSystemCursor(Display.java:3011)
  at
org.eclipse.jface.text.source.OverviewRuler.createControl(OverviewRuler.java:564)
  at
org.eclipse.jface.text.source.SourceViewer.createControl(SourceViewer.java:444)
  at
org.eclipse.jface.text.source.SourceViewer.<init>(SourceViewer.java:426)
  at
org.eclipse.jface.text.source.projection.ProjectionViewer.<init>(ProjectionViewer.java:315)
  at
org.jkiss.dbeaver.ui.editors.sql.SQLEditorSourceViewer.<init>(SQLEditorSourceViewer.java:42)
  at
org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createSourceViewer(SQLEditorBase.java:406)
  at
org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createSourceViewer(SQLEditorBase.java:381)
  at
org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3336)
  at
org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:64)
  at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:451)
  at
org.jkiss.dbeaver.ui.editors.text.BaseTextEditor.createPartControl(BaseTextEditor.java:144)
  at
org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase.createPartControl(SQLEditorBase.java:261)
  at
org.jkiss.dbeaver.ui.editors.sql.SQLEditor.createPartControl(SQLEditor.java:658)
  at
org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:156)
  at
org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:102)

or

2018-11-07 14:52:24.562 - Event loop exception
java.lang.NullPointerException
  at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:183)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
  at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
  at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:469)
  at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
  at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:207)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
  at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
  at org.eclipse.swt.widgets.Control.setBounds(Control.java:977)
  at org.eclipse.swt.custom.StackLayout.layout(StackLayout.java:126)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
  at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
  at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
  at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:207)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
  at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1635)
  at org.eclipse.swt.widgets.Control.setBounds(Control.java:1017)
  at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:696)
  at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:200)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1847)
  at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1853)

Any thoughts?

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbeaver/dbeaver/issues/3060#issuecomment-436758478

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

For shell in sandbox flatpak run --command=sh io.dbeaver.DBeaverCommunity
You can also try Xorg (if this is Wayland) but it works for me on both.

Few DDG results suggests that you shoudl force xWayland, can you try and set this var before starting GDK_BACKEND=x11

Ok, we'll announce Flatpak support after 5.2.5 release.

Thanks for the work, i've been really excited for this to get pushed out. Client is working really well from the flatpak and also picked up all my settings from the existing deb after i removed it.

For usage of mysqldump it looks like i need to give dbeaver root filesystem permissions in metadata? or can i sym link mysqldump to my home bin?

I wouldn't do that. Doesn't DBeaver download those binaries? I'm using it mostly for Postgres and it never asked me access to the system binaries. Flatpak apps should work independently of your local OS and binaries. So if this is something that dbeaver currently doesn't handle, we could perhaps add it to flaptak itself. But this needs a bit of researching.
Also, please open this kind of issues on flatpak repo as it should be dealt with there (probably) and it would also be easier to track flatpak issues.

@krashekspres @lachlan-00 jfyi: by default DBeaver downloads native mysql binaries only on Windows. On Linux/Mac it is possible to specify (in connection configuration) where native binaries (like mysql_dimp or psql) are located.

@serge-rider so if you don't provide a local binary path, dbeaver will download its own?
@lachlan-00 can you try and unset that part of the configuration and let DBeaver download/use its own binaries?

i'll clear my profile/settings and see what happens. it definitely wasn't a fresh config as i've used the debs for years now.

With my existing connections it doesn't seem to pick up my /usr/bin/mysqldump

Local Client cannot be set to "/usr/bin/" when mysql-client is installed. It just cannot find the mysql client.
This works fine when using the .DEB version.

@hyphone you are correct, flatpaked version currently can access only $HOME and I want to restrict that even more (e.g. share only Documents/Projects). If you want to check how the filesystem looks like in sandbox, you can attach to its shell with flatpak run --command=sh io.dbeaver.DBeaverCommunity

Nevertheless, MySQL driver works if it's installed by DBeaver.

Well, I just ran into the first issue with the flatpak version, related to the above mentioned. I have a few connections that depend on my system certs (which include internal certs). Obviously this is now broken. It should be trivial for me to copy the root certs to my $HOME, but where should that be?

Or is there a way to allow the flatpak to use the system certs only?

@aiguofer don't really know, can you please open issue on https://github.com/flathub/io.dbeaver.DBeaverCommunity so we get insight from someone from flatpak?

As a workaround, you could try to shell into flatpak sandbox and install certs there.

@aiguofer I don't have such connection to test it, but it should work if you install p11-kit-server locally,

flatpak run --command=p11tool io.dbeaver.DBeaverCommunity --list-all-certs returns list of my host certs

Flatpak 1.0 can use system certs I thought? Epiphany works with my work certs after 1.0 released.

I created https://github.com/flathub/io.dbeaver.DBeaverCommunity/issues/1, we could move the conversation there.

Great.
5.2.5 release will happen in a few hours.
Flatpak link added on https://dbeaver.io/download/

So, closing this ticket.
Thanks, guys! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antonyr picture antonyr  路  49Comments

RooyeKhat picture RooyeKhat  路  32Comments

dpsspatial picture dpsspatial  路  34Comments

levtol picture levtol  路  31Comments

lrweck picture lrweck  路  38Comments