16

I recently installed a GRUB theme from gnome-look.org on Ubuntu 20.04 LTS (my PC is Windows 10 dual-boot with Ubuntu). To install the theme successfully, the file at /etc/default/grub needs to be edited.

So I used sudo gedit /etc/default/grub command to do so. After editing when I save it I, see the following warning in Terminal:

enter image description here

(gedit:7169): Tepl-WARNING **: 21:13:18.135: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.

Later on I also edited the grub menu by editing the file at /boot/grub/grub.cfg by using sudo gedit /boot/grub/grub.cfg.

Upon saving the file I got a similar warning

enter image description here

(gedit:8887): Tepl-WARNING **: 21:18:46.163: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.

Can someone tell me the reason? And also how to deal with it?

Abhay Patil
  • 2,545
  • 3
  • 18
  • 36

6 Answers6

11
  1. This is not critical, the metadata seems to be only the last line number you were on, so the file will reopen in the same position. You can check with gio info <path>.

  2. Don't sudo gnome apps. Use "admin://" schema to tell gedit that it needs to escalate. You'll get a graphical escalate prompt.

gedit admin:///etc/default/grub

Good explanation on the escalation mess here:

https://easylinuxtipsproject.blogspot.com/p/about-root.html

Tamir Daniely
  • 291
  • 2
  • 8
  • I am getting this error in WSL without using `sudo` – Mike Wise Mar 02 '22 at 11:08
  • 1
    WSL is a completely different story, you probably want to post a different question specifically for wslg. But on general it means that either wslg isn't running gvfs. or that there's some bug in the integration. – Tamir Daniely Mar 23 '22 at 17:04
7

Whenever you want to open a GUI application with sudo privileges from the terminal CLI, you must use sudo -H, else you probably create a login loop.

sudo -H gedit /etc/default/grub

From man sudo we get the -H description...

-H, --set-home
             Request that the security policy set the HOME environment
             variable to the home directory specified by the target user's
             password database entry.  Depending on the policy, this may
             be the default behavior.

translated this means that if you don't use -H, these two files in your /home directory probably get changed to owner root:root, and you get a login loop...

-rw------- 1 your_username your_username 441K Nov  2  2019 .ICEauthority
-rw------- 1 your_username your_username   58 Jun 23  2017 .Xauthority

The warning messages... they're just noise.

And, you should never manually edit /boot/grub/grub.cfg.

Update #1:

To reduce the need to manually edit /boot/grub/grub.cfg, edit/add the following to /etc/default/grub...

GRUB_DEFAULT=saved    # this is an edit
GRUB_SAVEDEFAULT=true # this is an add

sudo update-grub # write changes

This will allow GRUB to remember the last selected OS to boot, and will reboot to that same OS until a different OS is selected.

DatumPoint
  • 103
  • 5
heynnema
  • 68,647
  • 15
  • 124
  • 180
  • I just use it to change the boot order. By default Ubuntu is above Windows and also there is an option for opening BIOS in boot menu. So I just remove the BIOS and shift Windows above Ubuntu. Also I change Windows Boot Manager to Windows – Abhay Patil May 06 '20 at 11:51
  • @AbhayPatil There's a better way to do this. – heynnema May 06 '20 at 14:05
  • What is the better way? – Abhay Patil May 09 '20 at 08:05
  • @AbhayPatil See Update #1 in my answer. – heynnema May 09 '20 at 12:46
  • 4
    I get the same error when using sudo -H gedit. This is after upgrading to 20.04. It did not happen on 19.10 – tyknkd May 12 '20 at 02:07
  • @heynnema in edit 1, how to select different OS? Would the grub loader still be shown? – Abhay Patil May 20 '20 at 07:01
  • As @koyakun pointed, it might be an issue with 20.04, because I still get that error – Abhay Patil May 20 '20 at 07:07
  • @AbhayPatil If you had had the GRUB menu before, you'll still have it after implementing Update #1 in my answer. To select a different OS, do as you do now, use the up/down arrow keys to select a different OS, then hit ENTER. It'll remember that choice until the next time you select a different OS. Also, the warning errors that you see have nothing to do with `sudo -H`, right now, they're just noise. – heynnema May 20 '20 at 13:51
  • What is the question being answered here? "Why does the error message appear?" "How do I avoid the error message?" or "How to edit grub?" The title at the top of the page seems to suggest either of the first two, not the latter. – tyknkd May 21 '20 at 09:28
  • 2
    @koyakun "Why does it occur?" and "How to deal with it?". – Abhay Patil May 29 '20 at 09:51
  • @AbhayPatil As I mention in my answer, the **warning** messages are just noise. Just ignore them (for now). Gedit has some problem with metadata. – heynnema May 29 '20 at 12:25
  • Also you could use "nano" or "vim" - editor (sudo required) in your terminal window in order to edit text-based system files. – v2r Aug 18 '20 at 15:24
  • @v2r Of course, you're also correct... however, if you read the original question, the user was using `sudo gedit`, and hence my answer instructed the user of the proper use of `sudo -H` when using a GUI app like `gedit`. – heynnema Sep 18 '20 at 13:23
3

Having gvfs installed does not prevent the error message. In my own case, "gvfs is already the newest version (1.44.1-1ubuntu1)" but the error still pops up warning whenever I "gedit" a document, either with 'sudo gedit' or 'sudo -H gedit'. I have not found a clear direction on how to fix that tepl issue, my system works great, the warning comes only when using 'sudo gedit'.

However, I found a workaround that goes like this somewhere and 'sudo gedit' gives no errors or warnings:

" Alternatively you can put: export SUDO_EDITOR='/usr/bin/gedit -w' in your .bashrc file and then you can just do this to edit the file: sudoedit /etc/default/grub "

  • 1
    sudo gedit -w is as easy to type and just as easy to remember as SUDO_EDITOR. But -w works for me so I am upvoting this answer! – brec Aug 30 '21 at 14:02
1

That's a warning by starting gedit without sudo-H (see What does sudo -H do?). Make sure that you're starting it with

sudo -H gedit file

or you may use a terminal editor like vi, vim or emacs.

dlin
  • 3,740
  • 3
  • 29
  • 45
1

I have only ubuntu 20.04, no multiboot, updated pkgs, sudo gedit and sudo -H gedit both continue to spew Tepl warnings, mostly re GVfs metadata.
the answering parties above have not addressed that issue, nor that it was not an issue until 20.04. from scanning pkgs, 20.04 uses 'libtepl-4-0' whose description via apt show is:

Description: Text editor library for GTK

Tepl is a library that eases the development of GtkSourceView-based text editors and IDEs. Tepl is the acronym for “Text editor product line”. It serves as an incubator for GtkSourceView.

guess the error msg hint to config tepl may do the trick, if only it included which file to config, instead of just the options to apply! :)

Bern
  • 19
  • 2
0

You need to install gvfs by this command:

sudo apt-get install gvfs
Kulfy
  • 17,416
  • 26
  • 64
  • 103