XQuartz opens automatically when RStudio opens - rstudio

Lately, whenever I launch RStudio, the XQuartz app also automatically launches. How can I stop this from happening? (It's annoying!)
The only thing I could find related to this issue was this stackoverflow question: loading ggplot2 (colorspace, actually) opens up x11. (I do have the colorspace package installed [v. 1.3-2] but for me XQuartz starts up immediately upon starting RStudio, not after a particular library is loaded.)
This behavior started very recently, possibly corresponding to the installation of the package sqldf, which does appear to force-open the XQuartz app when it's loaded, although I don't know how it could be causing XQuartz to open before the library is even loaded into the current session. I also tried deleting the .RData and .Rhistory files in my working directory and restarting RStudio, but it didn't help.
Version and system information:
RStudio Version 1.1.453
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.5
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0

OP here. Seems like the issue I was having stopped on its own. Updating to RStudio version 1.1.456 and/or R version 3.5.1 may have helped.

This is still happening to me on OS X with RStudio 1.4.1103, R 4.0.2, sqldf v0.4-11 and gsubfn v0.7. It happens immediately upon loading sqldf (which has gsubfn as a dependency).
Based on a hint from this Twitter thread, I figured out that if I run this line before loading sqldf, I can bypass loading the loading of XQuartz:
options(gsubfn.engine = "R") # This stops the loading of XQuartz on Mac

Including options(rgl.useNULL = TRUE) in my .Rprofile solved the problem for me. The quote below from the rgl vignette explains why it suggests this:
Default display
There are two ways in which rgl scenes are normally displayed within R. The older one is in a dedicated window. In Unix-alikes this is an X11 window; it is a native window in Microsoft Windows. On macOS, the XQuartz system (see https://www.xquartz.org) needs to be installed to support this.
To suppress this display, set options(rgl.useNULL = TRUE) before opening a new rgl window. See the help page for the rgl.useNULL function for how to set this before starting R.
The newer way to display a scene is by using WebGL in a browser window or in the Viewer pane in RStudio. To select this, set options(rgl.printRglwidget = TRUE). Each operation that would change the scene will return a value which triggers a new WebGL display when printed.

Related

How to remove rare whitespaces in the VS Code background [duplicate]

In the VS Code editor window, there are squares of another color that bother me when coding.
Has anyone had or has the same problem?
I started experiencing this issue in my MacBook Pro M1 after the June 2022 autoupdate.
Setting "disable-color-correct-rendering": false in ~/.vscode/argv.json worked for me.
I hope this is fixed in the next release. It seems to be an old issue based on what I found when searching for a solution.
If you are on a mac, see Different colored area on macOS - although there is a linux report there too. Same dark grey patches of color. There are a couple of suggested fixes mentioned.
The most reliable appears to be changing this setting:
"disable-hardware-acceleration": true
Open command palette and search for "Configure Runtime Arguments"
Set "disable-hardware-acceleration": true
Restart
from https://github.com/microsoft/vscode/issues/156405#issuecomment-1196503399
or starting vscode from a terminal with code --disable-gpu.
Also
What did work is removing "disable-color-correct-rendering": true from
~/.vscode/argv.json file and restarting vscode. Now the different
coloured patch on the side and bottom is gone.
Or
This happens to me with an intel mac as well. It was fixed by setting
"disable-hardware-acceleration": true in the .vscode/argv.json file.
More from the issue:
Had the same problem on my M1 macbook air, I had to open the argv.json
file (you can use Shift + CMD + P and type Configure Runtime Arguments
to open it) and set this line to false :
"disable-color-correct-rendering": false (it was on true, maybe by
default).
After that, just close your VS Code instance with CMD + Q and restart
it.
And here are download links (for macOS) for the previous vscode version v1.68 in case you want to rollback:
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f//VSCode-darwin-universal.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin-arm64.zip
Thanks for the information to those posting in the issue comments.
if you are facing this on mac you have to follow following steps
open terminal and type cd ~/.vscode
then open 'argv.json' file using vim argv.json
just uncomment the line // "disable-hardware-acceleration": true to "disable-hardware-acceleration": true
quit vim Esc then shift+: then wq then press enter, restart vs code your vs code will work normal again.

Strange lines appearing instead of cells when rendering jupyter notebook from a remote server [duplicate]

I am using quite large notebooks in JupyterLab to run Python code. They contain many Markdown cells with text and some images. The problem I am having is that when I close the Notebook and reopen, some of these cells have collapsed and can't be expanded (show as a horizontal line). Sometimes I will get a message telling me how many cells are hidden but they can't be expanded. Others seem to have disappeared completely.
Occasionally, I can get some cells to expand if I reload the page. I thought it may have been because I had lots of Markdown header levels and those too far down the hierarchy were collapsing. However, even removing many of the header levels has not solved the problem.
Have others had this issue and has anyone been able to resolve it? Thanks!
Edit: Thank you Vinson. My Jupyter Version is Version 3.1.7, running on Google Chrome (Version 92.0.4515.159 (Official Build) (64-bit)), on Windows machine.
This was fixed in JupyterLab 3.1.10 (this PR) released on 2021-09-01 - the issue should disappear after you upgrade and restart JupyterLab:
# (or conda-forge equivalent if you use conda/mamba)
pip install -U "jupyterlab>=3.1.10"
If however, you are unable to update right now, you can use a workaround of disabling the placeholder rendering, by going to Advanced Settings Editor -> Notebook and in the right pane (User Preferences) paste the following:
{
"renderCellOnIdle": false,
"numberCellsToRenderDirectly": 10000000000000
}
then press save and reload JupyterLab.
I do not know how to fix this with conda. But option 2 is working for me. For those who are not family with the deep tech, you can try these, two extran configure there are shown the line numbers.
{
"markdownCellConfig": {
"lineNumbers": true
},
"codeCellConfig": {
"lineNumbers": true
},
"renderCellOnIdle": false,
"numberCellsToRenderDirectly": 10000000000000
}

How to remove an application "tile" from Anaconda Navigator Home tab

I have a bunch of apps that I will never use (GLueviz, Orange3, Rstudio) that I would like gone from my Home tab. They are not installed, but there is no way to remove the tile for the app. The gear icon isn't going to do it for me.
I dug into the config file ~/.anaconda/navigator/anaconda-navigator.ini and nothing obvious there. Oddly it says that vscode_enable = False yet VS Code does appear as a tile.
I'm running 1.9.12 individual edition on MacOS Catalina.
On navigator 2.1.1, I was able to comment out the two lines for Datalore and IBM Watson in ~/opt/anaconda3/pkgs/anaconda-navigator-2.1.1-py39_0/lib/python3.9/site-packages/anaconda_navigator/api/external_apps/__init__.py.
web_apps: 'typing_extensions.Final[typing.Mapping[str, WebAppInitializer]]' = {
#'datalore': DataloreApp, # noqa: F405
#'ibm_watson': IBMWatsonApp, # noqa: F405
}
Based on the Anaconda docs https://docs.anaconda.com/navigator/tutorials/custom-tiles/, you can create a yaml file that will allow you to disable some of the tiles.
In practice, I've found this works for some apps, but may not work for all. For example, some of the gnuradio apps go away, but many do not (e.g., gnuradio-build-deps).
Create a yaml file at ~/.anaconda/navigator/applications/ (MacOS)
Add the code to disable an application from view:
glueviz:
is_available: false

IntelliJ 14 keyboard shortcuts are QWERTY though keyboard is DVORAK

I'm
running IntelliJ 14
using Mac OS X layout
running on OS X (Yosemite)
IntelliJ is using DVORAK in general but not for keyboard shortcuts.
keyboard shortcuts are in QWERTY. As if they were scancode based instead of the key value after mapping.
Ideas?
edit 1
#gabriel hard to tell but here are some examples...
note: m, a and 0-9 are same on DVORAK and QWERTY
cmd+/ 'comment line' flashes code menu and sometimes moves to a brace (/ == {)
cmd+b works, goes to definition (b == n)
cmd+opt+l 'reformat' flashes code menu (l == p)
It turns out this is a problem in Java that has existed for some years, and is still present in Java 9. See the bug report here: https://bugs.openjdk.java.net/browse/JDK-8022079
JetBrains has been aware of the problem for some years, but is waiting for Oracle to fix it. See these JetBrains bug reports: https://youtrack.jetbrains.com/issue/IDEABKL-6493 and https://youtrack.jetbrains.com/issue/IDEA-63779
In those reports you'll find a work-around using a free tool called Karabiner. I have just verified that it works for IntelliJ. It will probably also work for other Java-based tools.
For OSX earlier than Sierra The work-around is:
Download and install Karabiner from https://pqrs.org/osx/karabiner/
In the OSX System Preferences, set your keyboard to the default "U.S. International" PC. If you don't often type diacritics and other international characters, it's easier to just set the keyboard to "U.S" instead.
In the Karabiner settings, type "dvorak" in the search box, then scroll down to the section For U.S. Input Source and check Use Dvorak Keyboard Layout (QWERTY to Dvorak)
From macOS Sierra onwards, as reported by user MithrilTuxedo in the comments, the procedure is different. You have to use Karabiner Elements (the new Karabiner core) with a configuration file. I have outlined the procedure at https://cpbotha.net/2016/12/16/dvorak-remapping-with-karabiner-elements-on-macos-sierra-works/ and summarise it here briefly:
Download and install Karabiner Elements.
Copy qwerty_to_dvorak.json from the examples and install it as the new karabiner.json configuration file.
If Karabiner Elements is running, it'll pick up the new file.
This bug will affect most Java-based tools such as those by JetBrains (IntelliJ, PyCharm, WebStorm, AppCode) and probably also Netbeans. The work-around summarised above should alleviate the problem in all cases.
I've had a similar problem using key combinations like ctrl+n in intellij 16 on linux (red hat). I use Colemak keyboard. I had two input sources setup in my operating system, system preferences .
English(US)
English(Colemak)
When I changed the order of the Input Sources, and put Colemak first, the problem seemed to go away.
System Tools > Settings > Keyboard > Input Sources
JetBrains are waiting for the bug to be fixed upstream in JDK, which of course will never happen. The other answer here is informative, but will only work on Mac OS, so if you're on linux or windows you're out of luck there.
I wrote a script to work around the issue, which you can find here. If you normally use GNOME keymap in pycharm on linux, then you're in luck - you can simply import my dvorak_settings.jar file and get back to coding.
Otherwise you can use the script to generate your own bugfixed keymap, read on...
The original keymap files are located in <pycharm>/lib/resources.jar/idea/Keymap_*.xml.
Example usage:
./to_dvorak Keymap_Emacs.xml -o Keymap_Emacs_Dvorak.xml
Have a browse over the generated file and if it looks sane, pack it up into the .jar file (see my dvorak_settings.jar example for the required structure) and import this in your IDE.
This problem is (finally!) fixed in IntelliJ IDEA 2017.1. See JetBrains issue JRE-172, “Wrong keys are picked up on dvorak layout in Mac OSX 10.6.2”.
It also seems to be fixed in other JetBrains tools. I tested that it's fixed in PyCharm 2017.1, CLion 2017.1, and AppCode 2017.1.

Paraview: Properties GUI very wide

I use Paraview (3.98) to display results from FEM simulations. The Properties detachable window accomodates some settings under Display (UnstructuredGridRepresentation), which creates GUI entries for "Opacity Table Values" and "Radius Table Values", which are very large and make the other settings go beyond the edge of the window. AFAIR it was not an issue in orevious version os Paraview. Is there a way to make the GUI less wide again?
I had a tough time overcoming this problem too, the solution for paraview 3.98 is to use the option --use-old-panels.
Or you could upgrade to PV 4.0.1 where this annoying bug has been fixed.
The problem occurs with 3.98 when the PointSprite plugin is loaded. You can not load the plugin if you're not using it and that will overcome the issue. As Zony suggested, you can always upgrade to 4.0.1 and this issue will disappear.

Resources