Changes to Gedit through gsettings seem to be ignored - gnome

I'm trying to use gsettings to change some of my Gedit settings (Ubuntu 20.04), but my changes seem to be ignored by Gedit. For example, when I change the tab width through
gsettings set org.gnome.gedit.preferences.editor tabs-size 4
my new tab width does show up in
gsettings list-recursively | grep gedit
but when I open anything in Gedit, it's still using the default tab width of 8.
In this example case this isn't much of a problem, as I can change the tab width from the Gedit GUI as well, but other settings, such as right margin position, don't seem to be in the Gedit Preferences menu.
When I tried to sudo the gsettings command I got this error:
(process:4742): dconf-WARNING **: 08:03:40.804: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=0d66e8250a634e9d8ee4675ca3d977fa --binary-syntax --close-stderr”: Child process exited with code 1
So what would be the correct way to use gsettings here?

Alright, after a good bit of additional searching I found this:
https://askubuntu.com/questions/491217/how-change-gedit-preferences-in-xfce-xubuntu#491296
So apparently (at least part of) my problem is that I'm using the Xfce desktop (I'm usually working over a VNC connection). I'm not sure exactly why/how this causes Gedit to ignore settings changed through gsettings, but installing dconf-editor and changing Gedit's settings there did the trick for me.

Related

How to use Neovim as External editor for Godot (Godot executable permissions)

I am trying to configure Godot to use launch Neovim in iTerm2 when I double click on a file containing code in the editor, however, a terminal window pops up instead with the following error:
/Users/myusername/.../Scripts/Player.gd; exit
zsh: permission denied: /Users/.../Scripts/Player.gd
This error message quickly goes away before I can read it and I am presented with an empty neovim window but it hasn't opened the file I clicked on. Additionally, the current working directory for the neovim window is my home directory (not the directory the project is based in)
I am running macOS Catalina with iTerm2 and Godot 3.2.2. My settings to open neovim in
Editor->Editor Preferences->Text Editor->External:
"exec path":iTerm2 executable (I tried pointing to the actual nvim executable, but that didn't seem to work).
exec flags: "nvim {file}".
My understanding is that this should open iTerm and execute the command "nvim [insert filename here]", opening Neovim.
I tried some solutions, including creating a neovim.desktop file, however, nothing seems to work. If anyone has any suggestions as to how I can give Godot the correct permissions I'd love to hear it. Please let me know if you need anything else.
Thank you!

VirtualBox Terminal: Not Responding / Inactive

I am having a problem using terminal in a Linux VirtualBox Terminal. This terminal is being used to compliment the StanfordOnline "Compilers" course on edX, the language for the class is called "cool".
Within this terminal I used the command "emacs 1.cl" in order to open the file "1.cl" with emacs. After I enter this command the file is successfully opened but the command prompt does not reappear, instead everything I type is just greyed text (see screenshot - Terminal is black window on left).
Why is this happening? I can start typing commands again if I close and then re-open terminal, but I think there must be a reason why this happens. Anyone have an idea?
Thanks in advance, let me know if I can provide any more helpful information regarding the course or the software. Running VirtualBox on MacOS Catalina 10.15.4 if it makes any difference.
-DR
Screenshot

Why vim is changing first letter to g after opening a file

When I open a file, eg vim .bashrc, vim opens the file and change the first letter to g. What I see is the following:
g To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
...
I change g back to #, but after loading the file its again changed. Happens with multiple files.
Last things I have done was: installig gcc and make.
Why is this happening?
EDIT:
My .vimrc file:
set nocompatible
set backspace=indent,eol,start
set number
set tabstop=4
syntax on
I had the exact same problem
I found out it was a bug in my ssh client (mobaXterm).
Updating (to mobaXterm 'personal edition v9.1') resolved the issue.
I am using vim on Ubuntu Linux 16.04 via MobaXterm version 7.7. This is an older version of MobaXterm that supports command-line-settable terminal background colors.
The following change to my .bash_profile solved this problem for me:
# Fix for Vim 8.0 bug that stomps on line 1 char 1:
export TERM=linux
Strange enough, but it works for me. I created a ~/.vimrc file:
syntax on
set background=dark
The 2nd option disable the bug.
So it appers to be a vim issue. So far I gathered only two solutions:
Reinstall to older version of vim. i reinstalled to 7.4.752-1 and bug is gone.
Change cygwin terminal to anyone but "xterm*" (right-click on title bar -> Options... -> Terminal -> Type)
For me, I traced the issue down to the following line:
set nocompatible
It is found in /usr/share/vim/vim74/debian.vim, which is included from /etc/vim/vimrc with the line runtime! debian.vim
make sure you dont set the visual bell in your .vimrc
set visualbell
in case you have it then just delete it :)
The exact same thing was happening to me! It wasn't occurring in gvim, so I thought maybe something was going on in my .vimrc. I zeroed-out my .vimrc but it was still happening. Only when I completely deleted my .vimrc did this behavior stop. As suggested,I rolled back to an older version (7.3.1152-1) with cygwin setup and that fixed it. I did not have to change any terminal settings, however. It makes sense because I updated cygwin yesterday, when I started seeing the errant g's.
I am on ArchLinux. vim 8.0.0987-1 always decreases a number upon opening a file (as if xtrl+x pressed). Downgrade to 8.0.0722-1 fixed the issue.

why does the file evdev in /usr/share/X11/xkb/rules not match with evdev.lst?

it seems that some options to setxkbmap which are listed in evdev.lst are not actually supported by the accompanying evdev file. For example ctrl:nocaps is supported but ctrl:swap_lalt_lctl is not, as evidenced by
$ grep 'ctrl:nocaps' /usr/share/X11/xkb/rules/evdev{,.lst}
/usr/share/X11/xkb/rules/evdev: ctrl:nocaps = +ctrl(nocaps)
/usr/share/X11/xkb/rules/evdev.lst: ctrl:nocaps Caps Lock as Ctrl
$ grep 'ctrl:swap_lalt_lctl_lwin' /usr/share/X11/xkb/rules/evdev{,.lst}
/usr/share/X11/xkb/rules/evdev.lst: ctrl:swap_lalt_lctl_lwin Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt
$
This is causing me to be unable to use the missing options, as detailed in my earlier question Why are some setxkbmap options ignored?
As a bonus question, is there any way in which I can cause these missing options to be supported?
I am experiencing the same issue and would be happy to find the answer to this.
I am running recent Debian Jessie with GNOME v3.14.1 on a Macbook 5,2 (Early 2009) - all other keybindings I tested so far seem to work. I have a guess for the reason:
In
"gnome-tweak-tools > Typing > Alt/Win key behaviour"
there is only this option "Ctrl is mapped to Win **keys** (And the Ctrl keys)" --maybe this is related to the problem because I read somehwhere that GNOME overrides other keymapping settings... I tried adding the keybindings in dconf-editor; also - not working.
EDIT: I found a temporary workaround for this: Superuser Xmodmap Workaround
It's a copy&paste game followed by the command
# xmodmap /path/to/yoursavedfile
But notice that once you alter any keyboard related settings in GNOME like shortcuts or other keybindings it will override this and you have to rerun the command. It works instantly without a relogin/restart for me though. Don't know yet if it's persistent upon next boot - I will report here if it isn't!
EDIT2: Upon reboot and resume GNOME overrides keyboard settings by xmodmap.
EDIT3: I found a way to make the keyboard mapping permanent after reboot, resume & login, using this python script as an autostart script: xmodmap-reload-script found here
by creating a new .desktop file in ~/.config/autostart inspired by this template
debian run python script on startup
[Desktop Entry]
Type=Application
Exec=python /path/to/your/application.py arguments

What is this gVim warning and how to eliminate it?

In Ubuntu 10.04 (as a Virtual Machine), I open gVim from command line but every time I switch from terminal to vim and back I see the following warning:
** (gvim:13790): CRITICAL **: murrine_style_draw_box: assertion 'height >= -1' failed
Why do I get this warning and how do I get rid of it?
The installation (via software center) is pretty much unmodified, except the addition of ~/.vimrc:
source $VIMRUNTIME/mswin.vim
behave mswin
set hls
It's a bug in the theme package(s). Resolution here: https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/538499/comments/24
Modify the entry in /usr/share/themes/YOUR THEME IN USE/gtk-2.0/gtkrc from GtkRange::trough-under-steppers = 0 to GtkRange::trough-under-steppers = 1
HTH

Resources