How to run `x2goclient desktop session` with pyhoca-cli? - command-line

I needed to run x2goclient desktop session on background. I found out that x2goclient cannot create new session, but user should use x2goclient GUI to create some sessions, then you can use command to use already created sessions. Found another CLI, called pyhoca-cli, which has a lot of advantages and it can create new sessions. But the problem is when it creates session, instead of showing x2goclient desktop windows, it shows x2goclient ssh terminal. I am using the commands like this:
pyhoca-cli --new --server=some_ip --port=some_port --username=some_username

Related

PSQL_HISTORY ignored by PyCharm

I have a Django project connecting to a PostgreSQL database which I develop in PyCharm, and I want to enable PostgreSQL history logging.
There is PSQL_HISTORY env variable set to /home/user/apps/postgres/logs/.pycharm_log, but when I start the project in PyCharm and update some data via the Django Admin (which certainly hits the database) -- nothing gets logged and the file is not created at all.
Is there a way to make PyCharm and PSQL_HISTORY work together as I expected?
'psql' is the name of a specific client tool. Why would a completely different tool use psql's configuration options? If you want to log every statement sent to the server, you could configure that in the server side with log_statement=all.

.exe Program Run Automation in Windows 2012

I have a Exe program which run fines and update the log when I run it manually or create a batch script run the .bat file (By double click/call from CMD prompt).
When I am trying to automate this process by creating scheduled task/ creating a service it don't work.
In Windows 2012 Srvany.exe also dont work so i am not able to create a service , even though I create a service using SC Create command the service fails to run in windows 2012.
I got the answer- This was happening as My Program was not running at Interactive mode,As per Microsoft a task runs at Interactive mode when "Run when User logged on" option is chosen, if we choose other option the program will not run at interactive mode.
https://technet.microsoft.com/en-us/library/cc722152.aspx

synchronizing history when ipython notebook and console are connected to the same kernel

I have ipython notebook running on a remote server, i.e.
ipython notebook --profile=nbserver
which I access from my local machine. Further, I ssh to the remote server from my machine, and start ipython console (terminal) on that server. I have found following command to work well:
ipython console --existing \
~/.config/ipython/profile_nbserver/security/kernel-*.json
Now I am connected to the same remote kernel from two different clients (lets call them browser and terminal). Everything works well, except one annoying detail:
1) in browser, I type a=1
2) in terminal, I type b=2
3) in both clients I can see both commands using %history. But when I want to cycle through the history (in terminal) using Up, it only shows the commands which have been typed in the terminal, (i.e b=2). Similarly, I am unable to use a + PageDown in the terminal, to go back in history and find the command starting with a.
From what I understand, my two clients are using two separate history files history.sqlite. But why does %history show all commands ?
Question:
Is there any way to configure using one history.sqlite for both clients ?
I find, having easy access to history is absolutely crucial. Moreover, I see using both terminal and browser as complementary, they both have tradeoffs and are best used combined.
You can set where the history gets loaded either by setting it at the terminal:
ipython --HistoryManager.hist_file=$HOME/ipython_hist.sqlite
or within the ipython config files:
import os
c.HistoryManager.hist_file=os.path.expanduser("~/ipython_hist.sqlite")

Can't run "meteor mongo" on Meteor in Windows (latest meteor for windows exe bootstrapper)

I am trying to run a meteor app for the first time on Windows( using Windows 7 in particular). I am able to successfully run the app but i can't seem to be able to run the command meteor mongo in a separate command prompt window. The following error pops up:
mongo: Meteor isn't running.
This command only works while Meteor is locally. Start your
application first.
I have already tried meteor reset. How can i fix this?
I think there is possible a misconception about what the meteor mongo command does.
It only connects to the mongo instance of a running meteor development process.
So you need to start the meteor app by changing to your app's directory and running 'meteor'. Then on a different console window, change you the same directory and run 'meteor mongo'.
In the image below, when meteor isn't running I get the error you get, but you will note that it says that you have to start your application first. If you do that, and then in another console window it works:
Try one of these admin UIs for mongo instead. They connect directly to the db, so should overcome whatever problem there is with command line.
Alternatively, you may try a non-standard command line utility, like Cygwin.

How To Exit Zend Command Line Prompt

I am working through the Zend framework tutorial at http://framework.zend.com/manual/en/.
Right now I am on the 'Create a Model and Database Table' section, and have followed the tutorial's guidelines for initializing database resources. In my terminal I entered
zf configure db-adapter \
then
adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook.db" \
and then
production
At this point, I am supposed to receive a message saying that a db configuration for production has been written to my config file. Instead, the prompt stays open. I've tried using ":q", ":quit", and "\q" to leave the prompt, but those don't work. The server that I am working on runs of RHEL5. I know I can close the terminal and open a new one, but I want to learn how to actually get out of the zend framework command line prompt. Solutions?
Ctrl+c will exit a prompt.