VS Code ssh; server install path - visual-studio-code

I am trying to change the VS Code server folder install location. The functionality was recently implemented and I've found the following references [1], [2].
However, I have not been able to implement it myself and in trying I get the following error message:
C:\\Users\\username/.ssh/config: line 1: Bad configuration option: remote.ssh.serverinstallpath
C:\\Users\\username/.ssh/config: terminating, 1 bad configuration options
The config file is constructed in the following way
"remote.SSH.serverInstallPath": {"hostname": "/test/location"}
Host hostname
HostName hostname
User username
NOTE: I have obscured the connection as 'hostname' and the user as 'username'

This config is for vscode's settings.json file (not .ssh/config):
e.g on Windows, do Ctrl+Shift+P > "Preferences: Open User Settings (JSON)". Then, you can add the following lines at the end.
"remote.SSH.serverInstallPath": {
"<host>": "/test/location"
}
Alternative, if you want do it via settings UI:
File > Preferences > Settings
Filter: #ext:ms-vscode-remote.remote-ssh install
Under "Server Install Path" > Add Item
Item = <host>
Value = /test/location

Related

Databricks Extension Fails for Visual Studio Code

I try to install extension below on VS Code, but nothing happens when I click "Configure Databricks"
Extension:
https://marketplace.visualstudio.com/items?itemName=databricks.databricks&ssr=false#qna
Details from Developer: Toggle Developer Tools
ERR Command failed:
c:\Users\user.name.vscode\extensions\databricks.databricks-0.2.3-win32-x64\bin\bricks
auth profiles --skip-validate Error: cannot parse config file: open
C:\Test" /M: The filename, directory name, or volume label syntax is
incorrect. : Error: Command failed:
c:\Users\user.name.vscode\extensions\databricks.databricks-0.2.3-win32-x64\bin\bricks
auth profiles --skip-validate Error: cannot parse config file: open
C:\Test" /M: The filename, directory name, or volume label syntax is
incorrect.
at ChildProcess.exithandler (node:child_process:408:12) at
ChildProcess.emit (node:events:526:28) at maybeClose
(node:internal/child_process:1092:16) at Socket.
(node:internal/child_process:451:11) at Socket.emit
(node:events:526:28) at Pipe. (node:net:687:12)
How can I fix it? Does anyone else had any issues?
It seems like the extension can't read your Databricks profile (~/.databrickscfg). Check if the file exists and if it contains potentially problematic contents.
I've create a ticket to track this issue https://github.com/databricks/databricks-vscode/issues/462

How to set a default text editor for PowerShell (e.g. Visual Studio Code)

I am using the new windows terminal.
I just installed powershell v7.0.2 and starship to make it better.
I want to edit the starship config, so I ran this command:
> starship.exe config
----------------------
Error: editor "vi" was not found. Did you set your $EDITOR or $VISUAL environment variables correctly?
Full error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
So I went ahead and edited my $PROFILE to set visual studio code as the default editor (code is in the path):
> code $PROFILE
---------------
$ENV:EDITOR = "code"
$ENV:VISUAL = "code"
Now I get the same error but with code instead of vi:
> starship.exe config
----------------------
Error: editor "code" was not found. Did you set your $EDITOR or $VISUAL environment variables correctly?
Full error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
The reason I ended up running starship config is because after creating the $HOME\.starship\starship.toml config file, starship ignores it, although I've set the path in my profile:
> code $PROFILE
---------------
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
So I ran starhip config to see which is the path that it expects the config file to be in.
I also tried to set the full path to visual studio code in $EDITOR, but it didn't help.
I had the exact same issue, and managed to solve it by setting the $EDITOR variable to the absolute path of your editor, so for Visual Studio Code, add this to your $PROFILE:
$ENV:EDITOR = "C:\Program Files\Microsoft VS Code\Code.exe"
I'm surprised code isn't in your path:
$env:path += ";C:\Users\$username\AppData\Local\Programs\Microsoft VS Code\bin"
Do you mean, default program to open ps1?
If so it's a registry entry, HKLM and find extension...

Unable to set HomePath And config in grafana

I am new to grafana and I am getting this error while executing the grafana-server.exe
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
Firstly, I am not clear about which path to specify as homepath and which to specify as config path.
Secondly, I have tried to set the homepath using this command:
grafana-cli admin reset-admin-password --homepath "c:\" mynewpassword
But getting this error :
"Incorrect Usage: flag provided but not defined: -homepath"
in grafana version 7.3.5 this is the help message.
NAME:
Grafana CLI - A new cli application
USAGE:
grafana-cli [global options] command [command options] [arguments...]
VERSION:
7.3.5
AUTHOR:
Grafana Project <hello#grafana.com>
COMMANDS:
plugins Manage plugins for grafana
admin Grafana admin commands
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--pluginsDir value Path to the Grafana plugin directory (default: "/var/lib/grafana/plugins") [$GF_PLUGIN_DIR]
--repo value URL to the plugin repository (default: "https://grafana.com/api/plugins") [$GF_PLUGIN_REPO]
--pluginUrl value Full url to the plugin zip file instead of downloading the plugin from grafana.com/api [$GF_PLUGIN_URL]
--insecure Skip TLS verification (insecure) (default: false)
--debug Enable debug logging (default: false)
--configOverrides value Configuration options to override defaults as a string. e.g. cfg:default.paths.log=/dev/null
--homepath value Path to Grafana install/home path, defaults to working directory
--config value Path to config file
--help, -h show help (default: false)
--version, -v print the version (default: false)
so you can set it by passing --homepath .
be careful, it seems its diffrent with grafana-server parametes. in that case you must set flag with only 1 hyphen (-homepath)
but come back to your problem there is 2 things to say.
first is to order your command correctly. i mean something like this
grafana-cli --homepath path ...
because homepath flag is for grafana-cli so it must come right after that or there will not be any guarantee of "what you want to do is what you write".
second is the homepath. consider this tree directory
.
|_LICENSE
|_NOTICE.md
|_README.md
|_VERSION
|_bin
|_conf
|_data
|_plugin-bundled
|_public
|_scripts
here is installation directory or homepath which you must set. more specifically exacly around bin(or conf or data or ...) directory.

Undefined Error in Suite CRM

when user add element from toolbox undefined instant of new panel and new row. How to solve this error.
Screenshot :
Make sure you are using correct .htaccess
Go to Admin > Repair and do a "Quick Repair & Rebuild". Execute any changes shown at the bottom of the page.
If that doesn't work, go to Admin > Repair and do "Rebuild .htaccess file" and afterwards, Admin > Repair and do a "Quick Repair & Rebuild" again.
Try deleting inside the cache folder, check for cache folder permission in my case i change to 775, delte empty the .htaccess file (don't delete the file),go to admin ->repair->quick repair & built and also rebuilt .htaccess file, log out and try login again. Check config file for this value :
'default_permissions' =>
array (
'dir_mode' => 1528,
'file_mode' => 493,
'user' => 'daemon', -> check and change to your Apache user config
'group' => 'daemon', -> check and change to your Apache user Group
),
installation folder must be specified in the right location look for :
'site_url' => 'http://suitecrm.com', ->change to your url
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/1137-undefined-text

How can I debug odoo 9 in eclipse? [Linux]

I have eclipse Neon in Linux Ubuntu 16.04
When I run a odoo server, it works everything fine in port 8069
But, when I debug the same odoo server, (now, the port is 8072) it appears to freeze in a infinite loop. In the browser doesn't appear anything (Waiting for localhost...), and the log shows this:
...
25138 INFO mydb openerp.modules.loading: 81 modules loaded in 0.73s, 0 queries
25138 INFO mydb openerp.modules.loading: Modules loaded.
25138 INFO mydb openerp.addons.base.ir.ir_http: Generating routing map
192.168.1.31 - - [2016-09-12 12:14:51] "GET / HTTP/1.1" 200 24082 21.358104
25138 INFO mydb openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
This is my odoo9-server.conf (renamed openerp-server.conf):
[options]
admin_passwd = myAdminPass
db_host = False
db_port = False
db_user = myUserName
db_password = myDatabasePass
addons_path = /etc/odoo/server/addons,/etc/odoo/server/addons_extra
logfile = None
xmlrpc_port = 8069
log_level = debug
Is there something wrong?
To debug your odoo+python code in eclipse, start eclipse in debug perspective and follow the given steps:
1: Stop your Odoo running server by pressing "ctr+c".
2: In eclipse go to Menu "Run/Debug Configurations". In configuration window under "Python Run", create new debug configuration(Double click on 'Python Run').
3: After creating new debug configuration follow the given steps:
3.1: In "Main" tab under "Project", select the "server" project or folder (in which Odoo Server resides) from your workspace.
3.2: Write location of 'openerp-server' or 'odoo.py' under "Main Module".
Ex: ${workspace_loc:odoo/openerp-server}.
3.3: In "Arguments" tab under "Program Arguments", click on button "Variables" and new window will appear.
3.4: Then create new "Variable" by clicking on "Edit Variables" button and new window will appear.
3.5: Press on "New" button and give your addons path as value.
Ex: --addons ../addons,../your_module_path
3.6: Press Ok in all the opened windows and then "Apply".
4: Now into "PyDev Package Explorer" view go to odoo and right click on "openerp-server" or odoo.py file, Select 'Debug As --> Python Run'.
5: Now in "Console" you can see your server has been started.
6: Now open your .py file which you want to debug and set a break-point.
7: Now start your module's form from 'gtk' or 'web-client' and execution will stop when execution will reach to break-point.
8: Now enjoy by debugging your code by pressing "F5, F6, F7" and you can see value of your variables.
Source: https://stackoverflow.com/a/12298831/1312904
To invoke pdb, add this line
import pdb; pdb.set_trace() anywhere you want to set a breakpoint
and then start your odoo with the --debug flag set, something along the lines of
./odoo.py --addons=addons,myaddons --debug
and then when you execute an action on the server that hits the point where you invoked pdb, the execution will immediately stop and you'll have a pdb prompt that you can use to debug
Finally I got the solution.
In the Debug Configurations, I changed the content of Main Module and I wrote this:
${workspace_loc:my_project/openerp-gevent}
The important part is the openerp-gevent
Now, the debug works fine