dbeaver-ce 未从 dock 启动,这是终端中的输出:
dbeaver-ce
/snap/dbeaver-ce/93/snap/command-chain/desktop-launch: line 50: /home/opyate/.config/user-dirs.dirs: Permission denied
sed: can't read /home/opyate/.config/user-dirs.dirs: Permission denied
/snap/dbeaver-ce/93/snap/command-chain/desktop-launch: line 238: /home/opyate/.config/user-dirs.dirs: Permission denied
cp: cannot open '/home/opyate/.config/user-dirs.locale' for reading: Permission denied
/snap/dbeaver-ce/93/snap/command-chain/desktop-launch: line 243: /home/opyate/.config/user-dirs.locale: Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
cp: cannot stat '/snap/dbeaver-ce/93/gnome-platform/usr/share/mime': No such file or directory
Directory '/home/opyate/snap/dbeaver-ce/93/.local/share/mime/packages' does not exist!
/snap/dbeaver-ce/93/snap/command-chain/desktop-launch: line 20: /snap/dbeaver-ce/93/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: No such file or directory
ERROR: update-mime-database /home/opyate/snap/dbeaver-ce/93/.local/share/mime exited abnormally with status 1
ERROR: /snap/dbeaver-ce/93/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
(process:18910): Gtk-WARNING **: 11:05:47.614: Locale not supported by C library.
Using the fallback 'C' locale.
Unable to init server: Could not connect: Connection refused
Dbeaver: Cannot open display:
Picked up _JAVA_OPTIONS: -Duser.home=/home/opyate/snap/dbeaver-ce/93
(process:19017): Gtk-WARNING **: 11:05:47.778: Locale not supported by C library.
Using the fallback 'C' locale.
Unable to init server: Could not connect: Connection refused
Dbeaver: Cannot open display:
> Start DBeaver Standalone [org.jkiss.dbeaver.ui.app.standalone 7.3.0.202011291229]
> Start Eclipse e4 Workbench [org.eclipse.e4.ui.workbench 1.11.200.v20200205-1503]
> Start Eclipse Workbench Model [org.eclipse.e4.ui.model.workbench 2.1.700.v20200113-1422]
> Start Eclipse Jobs Mechanism [org.eclipse.core.jobs 3.10.700.v20200106-1020]
> Start Eclipse IDE UI [org.eclipse.ui.ide 3.17.0.v20200217-1511]
> Start DBeaver Core Plug-in [org.jkiss.dbeaver.core 7.3.0.202011291229]
> Start Core File Systems [org.eclipse.core.filesystem 1.7.700.v20200110-1734]
> Start Core Resource Management [org.eclipse.core.resources 3.13.700.v20200209-1624]
2020-12-11 11:05:48.802 - Initializing DBeaver 7.3.0
2020-12-11 11:05:48.802 - Host plugin: org.jkiss.dbeaver.ui.app.standalone 7.3.0.202011291229
2020-12-11 11:05:48.802 - Initialize Core...
2020-12-11 11:05:48.803 - Can't find BC security provider. Use default JCE.
2020-12-11 11:05:48.803 - BouncyCastle not registered, using the default JCE provider
2020-12-11 11:05:48.900 - Initialize base platform...
> Start DBeaver UI Navigator [org.jkiss.dbeaver.ui.navigator 1.0.46.202011291229]
2020-12-11 11:05:48.911 - Core initialized (109ms)
2020-12-11 11:05:48.912 - Create display
Unable to init server: Could not connect: Connection refused
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4749)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:1130)
at org.eclipse.swt.widgets.Display.create(Display.java:1070)
at org.eclipse.swt.graphics.Device.<init>(Device.java:175)
at org.eclipse.swt.widgets.Display.<init>(Display.java:636)
at org.eclipse.swt.widgets.Display.<init>(Display.java:627)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:776)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:166)
at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.getDisplay(DBeaverApplication.java:409)
at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.updateSplashHandler(DBeaverApplication.java:335)
at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:207)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
Error updating splash shell
2020-12-11 11:05:48.915 - DBeaver 7.3.0.202011291229 is starting
2020-12-11 11:05:48.916 - OS: Linux 5.8.0-31-generic (amd64)
2020-12-11 11:05:48.916 - Java version: 1.8.0_275 by Private Build (64bit)
2020-12-11 11:05:48.916 - Install path: '/snap/dbeaver-ce/93/usr/share/dbeaver'
2020-12-11 11:05:48.916 - Instance path: 'file:/home/opyate/snap/dbeaver-ce/93/.local/share/DBeaverData/workspace6/'
2020-12-11 11:05:48.916 - Memory available 94Mb/910Mb
任务管理器显示 Java 和 dbeaver-ce 进程,但没有 GUI。
请告诉我为什么 snap 会停止工作?人们最常做的事情是什么导致 snap 坏掉?
另外,请不要告诉我重新安装 snap,因为我会丢失所有的数据库连接(我已经创建了很多)。(我刚刚重新安装了 Postman snap,丢失了所有包含许多请求的集合。)
或者,如果我确实必须重新安装它们,请告诉我一种保留用户数据的方法。
答案1
dbeaver 在我的 ubuntu 20.04 上运行良好
~$ snap info dbeaver-ce
installed: 7.3.0.202011291229 (93) 207MB -
我建议您检查目录 /home/opyate/.config/user-dirs.dirs 和上面目录的权限
我的具有以下访问权限:
-rw------- 1 koen koen 633 dec 3 20:58 user-dirs.dirs
-rw-rw-r-- 1 koen koen 5 dec 3 20:58 user-dirs.locale
这里讨论了导出/导入连接或保留 dbeaver 的设置:https://dbeaver.io/forum/viewtopic.php?f=2&t=906#:~:text=There%20is%20project%20export%2Fimport,keep%20all%20UI%20settings%20too。
简而言之 :
有项目导出/导入功能(主菜单文件->导出/导入)。但最简单的方法是将 USER_HOME/.dbeaver 文件夹复制到另一台机器。这样,您也将保留所有 UI 设置。但在执行此操作之前,请确保在两台机器上使用相同的 DBeaver 版本。
对于 snap,.dbeaver 文件夹存储在这里
~/snap/dbeaver-ce/93/.local/share/DBeaverData/workspace6/General/.dbeaver
答案2
在会话中第二次打开 dbeaver 会出现问题。您可以通过按 alt-f2,然后键入“r”作为命令并输入 Enter 来解决此问题而无需注销。无论出于何种原因,Gnome shell 都不知道 dbeaver 何时终止,这会以全新状态重新启动 shell,因此您可以再次打开它。