Trying to set code::blocks dark theme. Error-Unable to initialize gtk, is DISPLAY set properly? - codeblocks

I'am trying to install dark theme for code::blocks for ubuntu from here. But when I execute the command sudo cb_share_config in the terminal , I got the Error : Unable to initialize gtk, is DISPLAY set properly?. I'am very much obessed by white theme and desperately needs dark theme. Can somebody please help.

Here you would want to enable X-access from the terminal by executing sudo xhost +. Then run the command sudo cb_share_config and you get the desired result. Hope this helps :)

Related

Why did my terminal suddenly has darwin13 as host? How do I fix this?

I was trying to install Kaggle but then all of a u sudden I see:
#x86_64-apple-darwin13 on my terminal.
How do I switch this back? I was trying some solutions I found online but every time I run open ~.bash_profile it says:
zsh: no such user or named directory: .bash_profile
Every time turn on terminal, conda will be activated automatically.
Try the following command should work
conda config --set auto_activate_base false

How to activate a conda env automatically in VSC on windows using bash?

I've been trying all day to debug a code using Visual Studio Code without success. I have installed VSC on windows and I have installed bash (ubuntu) as well. I already put bash as a terminal default shell:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"
The thing is when I run the debug, it tries to activate the env with activate myenv-name and I couldn't find how to change this instruction to source activate myenv-name.
Do you know how I can do this? any help will be appreciated. Thanks!
It's been a while since I asked this question and I got the answer finally. :)
It is simple we just have to create .bashrc file in our user folder there we can write whatever commands we need to run each time we start a terminal in vscode.
Here the command to activate a conda env:
source activate myenv_name
In case of bash: conda: command not found and you don't have admin permissions to change the paths use this command before source act...:
export PATH=$"/c/Users/UserName/AnacondaPath/Scripts":$PATH

ERROR:browser_gpu_channel_host_factory.cc(121)] Failed to launch GPU process

i am trying to configure debugging port for google chrome extension for Visual studio for client side debugging in terminal using below commands and getting the below error,
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
[96138:85251:0321/103001.249367:ERROR:browser_gpu_channel_host_factory.cc(121)] Failed to launch GPU process.
Created new window in existing browser session.
i have tried export BROWSER=google-chrome too, but its not working. i hope i have to type this command in terminal . I am using MAC high Sierra , How can i resolve it.
I had a similar error when working with the bokeh python3 library on Ubuntu 16.04. I found a solution on a thread for jupyter notebook on github.
From: Github Issue
I had this same error
("ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU
process"). After running jupyter notebook, I would get a new tab in
google-chrome, but it would be blank.
Following but slightly modifying #wewan's advice, I ran "export
BROWSER=google-chrome". Then running jupyter notebook worked as
expected. I am using Ubuntu 16.04, Google Chrome 62.0.3202.62, and
Jupyter 4.3.0. Also, if this works, you'll obviously want to add the
export command to your .bashrc or .bash_profile
I did a raw export at the command line, and it corrected my issue.
export BROWSER=google-chrome
If this works, you will want to add this to your profile. I am not well-versed with Macs, but I believe there is a .bashrc file to which you can add the export.

Start /usr/bin/login instead of /bin/bash in PyCharm terminal

After updating to PyCharm 2016.3 my terminal has changed.
In 2016.2 it fired up identical to iTerm or Terminal. Now I am supposed to run /usr/bin/login to achieve it, because PyCharm only invokes /bin/bash and if I change shell path to /usr/bin/login in preferences terminal will collapse right after starting. I assume this is happening because /usr/bin/login requires login and password.
I am a little bit confused and after some research can't figure out what is going under the hood and what should I do to startup shell as in iTerm. May somebody clarify this, please?
UPD: Fixed in 2016.3.2 (in my case)
This worked for me in macOS:
1) Open in PyCharm
Preferences > Tools > Terminal > Shell path
2) Replace
/bin/bash
with
/bin/sh -login -i
Source: https://www.jetbrains.com/help/pycharm/2016.3/working-with-embedded-local-terminal.html
I got this problem too, and it is quite annoying.
The best solution I found so far is to run bash -l in the Terminal of PyCharm every time I start using it.
I tried to put /bin/bash -l into PyCharm Preferences > Tools > Terminal > Shell path, but that doesn't work.
I got the same issue and this issue is common when one installs PyCharm CE from the application market like Software Center in Ubuntu. To get /bin/bash by default in PyCharm CE terminal, you should install it by using Jetbrains Toolbox for any version of PyCharm CE and Linux distro.

Basic terminal commands not working after trying to install Composer

My mac terminal is completely dysfunctional! Every time I open terminal I get this message:
-bash: export: `/Applications/MAMP/bin/php/php5.5.10/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin': not a valid identifier
The problem came about a while ago, I believe I was attempting to install composer to work with MAMP.
Today I started a beginner tutorial on how to use the Terminal and almost every command does not work such as the basic mkdir , ls , and touch (to make folder, list items, and make a file respectively), (screenshot attached).
I have already tried deleting the ~/Library/Preferences/com.apple.Terminal.plist file. Your help is greatly appreciated.
I am working with Mac OS X 10.10.2
screenshot of terminal after making basic commands
It looks like you have an error in your .bash_profile or other startup script. Open it on terminal using vi ~/.bash_profile or some other editor of your choice and comment out that line, then type source .bash_profile to reload it.

Resources