ubuntu 16.04 set metadada failed gedit - gtk

Is any one could help me to stop this behavior of gedit in ubuntu 16.04 LTS.
I have upgraded 14.04 to 16.04 . Now i am trying to open the gedit from terminal by passing the command sudo gedit /etc/apt/sources.list but it is throwing an error stating that (gedit:2090): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
however, it is opening the file. when i am trying to save any modification then it is showing error after saving the file as (gedit:2090): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported
I am not getting why this is happening in 16.04 only it was not with the 14.04.
I tried to look for a solution but could not find any. Please if any one has any idea or solution regarding these issues please share your expertise.
Any help in this regard is appreciated.
Thank you,

You could try to use kate (a nice GUI editor) instead of gedit.
sudo apt-get update
sudo apt-get install kate
gksudo kate /path/file.txt
You can customize kate, and I think you will like it better than gedit.

You can use command: sudo nano gedit /etc/apt/sources.list

Related

Neovim ERROR: 492: Not an editor command: PlugInstall

Okay, so I have installed Neovim with "sudo apt install neovim" and made directory ".config/nvim/init.nvim". While typing in "init.nvim" no words got highlited e.g. :set number. When I tried to install all of the plugins, I got the message as in the title. Can anyone help me with that?
I have looked all over the internet, tried some of the thing people suggeste but unfortunately nothing worked. Should I maybe uninstall Ubuntu as I have windows subsystem for Linux and after that install it again?
The config filename for neovim is "init.vim", not "init.nvim".
Try running :
:echo $MYVIMRC
It should printout the location and the config file name for you.

Recipe terminated with fatal error: spawn latexmk ENOENT

I have just installed debian 10 as well as vscode. I have been struggling with this for 3 days now.. I installed texlive from terminal with the following command:
sudo apt install texlive
I then installed the latex workshop extension in vscode and tried building a .tex file. The following error popped up:
Recipe terminated with fatal error: spawn latexmk ENOENT.
I then preceded to install latexmk from terminal with:
sudo apt install latexmk
The same error kept popping up after that. The output showed this.
[14:59:34] Recipe step env: {}
[14:59:34] cwd: /home/phoenix/Documents/stellies/year4/2021/s&s-414/pracs/prac-4/report
[14:59:34] LaTeX build process spawned. PID: undefined.
[14:59:35] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[14:59:35] Does the executable exist? PATH: /app/bin:/usr/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/node/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/cargo/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/python/bin
[14:59:35] The environment variable $SHELL: /bin/sh
I then proceded to review the texlive website. I noticed that i did not set the path variable to include the texlive binaries. The texlive website gives the following path to the binary files : PATH=/usr/local/texlive/2021/bin/x86_64-linux:$PATH
however /usr/local/texlive does not exist on my system for some reason. Where can i find the correct path to the texlive binaries on Debian 10?
I had the same problem. The root cause was: (1) software's bin folder missing from PATH; (2) bad file privileges. Consequently, VSC couldn't access latexmk, which explains the error messages.
In my case, the problem occurred on a mac, and specifically after I installed MacTex, which, in turn, installs Tex Live. I believe the same solution may apply to linux distros too.
Solution:
Claim file ownership (which was originally root) under folder /usr/local/texlive: sudo chown -R <username> /usr/local/texlive, where <username> is the OS-level user name. The fix will work for this specific user. If it is not enough, try instead setting group owner appropriately, and/or consider Step 3.
Add /usr/local/texlive/2021/bin/<software_dialect> to PATH. <software_dialect> depends on the installed software version: in my case it is universal-darwin; on linux it might be x86_64-linux.
If the problem persists, try to change file access permissions under /usr/local/texlive using chmod.
EDIT: As a final step, restart VSC for changes to take effect.
I recently encountered the same problem on MacOS Monterrey (M1 based). I used basictex (just for the context). As required by the installation instruction,
I added TeXLive to PATH,
installed latexmk package to the TeX distribution.
However, still got the same error as OP.
Afte reading the wiki again more carefully, what finally worked for me was as simple as restarting VS Code and MacOS. Everything works as expected after a reboot of the MAC.
I had this same problem on Mac recently, the fix that worked for me was to uninstall and reinstall the LaTeX Workshop extension.
I got the same issue , seems to be a misbehaving from Vscode on MacOS
check if the command is in the path on mac
-which command_you are running example which latexmk
If this output something that means you have your latex installed, otherwise go and installed it and make sure it is accessible via command line.
If latex is installed and you are getting that issue you can just restart your VSCode and everything will be okay.
Had a similar error and came across this post when looking for a solution.
I wanted to use texlive on Vscode with WSL2 on Windows 10. Installing texlive-full in wsl fixed this error for me.
On Mac, this is a way to fix the issue
Step1: reinstall mactex by downloading it from this link: http://www.tug.org/mactex/mactex-download.html
Step2: In your terminal do cd /usr/local, you should see texlive folder
Step3: In your terminal do sudo vim etc/paths to set the environment. Details are in this link: https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/
Step4: In your terminal do /usr/local/texlive/2021/bin/x86_64-linux at the bottom. check the folder to see if the year is correct. Details in: http://www.tug.org/texlive/quickinstall.html.
Step5: Quit VC code completely, and reopen it.

Fail to open vscode in WSL bash on ubuntu using cmd code

When I tried to open vscode in WSL bash on Ubuntu 20.04 using command code ., it failed and the following message was logged:
/mnt/c/Users/john/.vscode/extensions/ms-vscode-remote.remote-wsl-0.50.1/scripts/wslCode.sh: 57: /home/john/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/bin/code: not found
I would like to ask how to fix this problem? Thx a lot!
I found the solution. Even though I think that you've already know it.
You need to delete the folder /home/john/.vscode-server/ with sudo rm -rf /home/john/.vscode-server.
Then, you just run code . or try to open any project that you want it.
Then a script will load and will install a new .vscode-server in your machine with the right files.

libXp.so library missing on Ubuntu 16.04

I'm trying to install Matlab on my Ubuntu 16.04 (64 bit), and it says 'the X11 library libXp.so does not exist. Matlab won't run on this machine until the library is installed'. I followed some other forums about this problem, and the instruction was to install libxp6 (sudo apt-get install libxp6). I did so, but the problem still persists. I searched for the libxp.so library on my system but couldn't find it.
When tryng to run Matlab from the bin folder using ./matlab, it says error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory
How do I install the libxp.so on ubuntu 16.04? Do I need to run any specific package for it? If libXp.so is installed, then how do I locate the .so library? Please help.
On my Ubuntu 16.04 machine I did dpkg -S /usr/lib/x86_64-linux-gnu/libXp.so and found out that this file is provided by the libxp-dev package.
So sudo apt-get install libxp-dev is likely to fix your problem.

why i failed to use omni auto complete when i edit source code?

vim a.py
input:
impo
then press: Cx Co
omin autocomplete just failed with the following message, why?
Error: Required vim compiled with +python E117: Unknown function: pythoncomplete#Complete
Press ENTER or type command to continue
vim --version | grep python
-python +quickfix +reltime -rightleft -ruby +scrollbind -signs +smartindent
this issue is not the same as Getting Omni complete to work on vim 7.2 on windows, since i use vim on linux, not windows.
Edit 1:
i can use omni autocomplete on another host now, but i canont autocomplete for urlopen, why?
from urllib import url
press CxCo, then the error message appears:
-- Omni completion (^O^N^P) Pattern not found
Edit 2
don't know why omni not works again, confusing...
vim was compiled without python support. You can tell because vim --version outputs -python instead of +python.
The reason is spelled out for you: Vim is not compiled with Python support, and the solution is to install a proper build.
Supposing you are on Ubuntu or another Debian derivative, you probably only need to do:
$ sudo apt-get install vim-gnome
If you are working on a headless server via SSH, replace vim-gnome by vim-nox.