Saving Session data in a log file in Gnome-connection-manager - putty

I am using Gnome-connection-manager on my ubuntu system. Earlier i used to have putty for windows where I was able to log all the session data to a text file.
This was done by going to path session->logging and selecting All session output. After which i gave the text file path and all the putty session used to get saved in the text file.
Can anybody let me know what is the equivalent of this in gnome connection manager?

You only have to click the "Settings" icon and fill in the "Logs Path". By default it is /home/USER.

Related

MobaXterm: Log all NEW terminal activity in a separate file?

Is it possible (either directly or through a plugin) to log all new terminal activity?
To further explain, I have logging setup such that all terminal activity gets saved to a file in a directory of my choosing. So say I've typed out some commands & those are logged to the file. That's great. Now I want to be able to specify that all further commands typed in & whatever the result output shown on the terminal is, should be logged to a new file.
Does anyone know whether it's possible to switch log files easily?
Yes, this is possible.
You can edit the session, goto Terminal settings -> Log Output Terminal to=
and provide your log file path. The you get all your session log files in that path
Please refer to the image where to add the path.
This works for specific sessions or the top-level global configuration. I also wanted to know if there was a way to define the type of file output? For example, when you get this same information manually by right-clicking on the session tab and select the "save terminal output" command, you can then choose the "Rich Text Document" or "Plain Text" under the "Save as type:" drop-down field before clicking the save button. The file created by the auto logging is plain text.

How to get file path in browser (using protocol or other method to get full path)

Using a desktop mac computer, is it possible to enable someone to drag and drop a file into a web page and return the full path of the file?
Having something similar to the S3 dialogue box and then enabling a user to drag a file in there and the full path show up. Would this be possible to do within the browser alone? What about with a protocol that the user has installed on his computer? For example, something like: https://support.shotgunsoftware.com/entries/127152-Launching-External-Applications-using-Custom-Protocols-under-OSX. If so, how would that be done?
It would not be possible to do it through the browser alone.
How to get full path of selected file on change of <input type=‘file’> using javascript, jquery-ajax?
As for some other workaround, I am not sure.

Permission denied when trying to import a CSV file from PGAdmin

I'm using PGAdmin 1.14.3.
When I try to execute an import command:
COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy)
FROM 'C:\\Users\\denis\\Desktop\\BP2Project\\USA\\US.txt';
I get a
ERROR: could not open file
"C:\Users\denis\Desktop\BP2Project\USA\US.txt" for reading:
Permission denied SQL state: 42501
I did look up other similar questions and none of them solved my issue.
I logged in as user "postgres" who is the superuser. I don't see why I'm missing permissions. I'm on Windows 7.
The permissions article mentioned in the answer by Houari and Flimzy is a good reference material, but a direct answer (the quick fix I used) is:
Right click the folder containing the data file(s) that permission was denied to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the check checkbox in the previous window.
As JLB notes, Write permission is needed if dumping from PostgreSQL, opposed to copying into it.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
Now you can run the SQL COPY statement that needs to access those files.
Once done, return to the Folder's Properties window.
Click the Edit button.
Select the Everyone entry in the "Group or user names:" field.
Click the Remove button.
Click OK on the remaining open windows.
The permissions have now been returned to what they were.
The user Postgres must have read access on the file from which you are about to copy.
Look at this article to see how to modify files' security access on Windows.
Ok, this is how got COPY command working,to export a table to CSV, step by step.
Pls note that I am using pgAdmin 111.
Create the target folder you want to export a table to. E.g C:\myExports
Set a read/write permission on this folder following the steps below :
Right click the folder containing the data file(s) that permission was denied >to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the >check checkbox in the previous window.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
This is the tricky part, inside myExports folder create a blank CSV file with your desired name.E.g employee.csv
Then run the Copy command like this :
copy employee to 'C:\myExports\employee.csv' delimiter ',' csv;
employee is the table name in this example..
Hope this helps.
If you don't want to give permissions to Everyone, you can add permissions to the account that started the service. In the Control Panel - Administrative Tools - Services, copy the account name in the 'Log On' tab. (On my system the account is called 'Network Service'.) Then share the folder with the CSV-file with this user as shown in the answer above.
To solve this problem you must give permission to the CSV file because that CSV file present in a COPY command are read directly by the server, but not client application. So to make this file accessible to a server we must give full read-write permission so that Postgresql user can read and write on that file.
Reference: article showing step by step procedure.
I just ran into this error and even after adding postgres to permissions on the file folder and the file itself, it still didn't work. So, I put the file in a public folder. On Windows this was the path: "C:\Users\Public\Documents\census.csv." It worked!
Responses to this problem on different threads go something like this
1. "Tell me exactly what command you used"
2. "Make sure you have right permissions"
3. "Just use /copy"
I just tried giving permissions to Everyone on the cvs file I am trying to copy from, and it is still giving me the permission denied error. I think this functionality is broken and has been broken for multiple consecutive releases over multiple consecutive versions of Windows.
for me and I've just spent some long hours on this.
I have a central db residing on a HP box running 14.04 postgresql-9.5 pgAdmin3 postgis-2.2, shares are made through a tweeked Samba share. My clients are using a mixture of windows 10.1, 7, 8.1 and I have one ubuntu 14.04 desktop.
I'm working with large tables updating records and normalising data and have built the routines around SQL copy statements from CSV files which were made from the core COPY public.table_1 TO (the share folder I'd set up in Samba https://www.youtube.com/watch?v=ndAYZ0DJ-U4) '/srv/samba/share/[filename].csv'
I can then update the database once the tables have been amended with COPY table_1 from '/srv/samba/share/test.csv' USING DELIMITERS ',' WITH NULL AS '' CSV HEADER; from any of my clients.
The key as far as I have been able to determine is that the clients doing the updating must be superusers, also everything must tie up in terms of users as there are 4 servers working together here Postgresql, Samba, UNIX and WINS
All of my users are registered on each of the servers with the same username and password homogeneity is the main factor.
I had tried for a long time moving things about and trying various naming conventions but in the end it was http://www.postgresql.org/message-id/CFF47E56EA077241B1FFF390344B5FC10ACB1C0C#webmail.begavalley.nsw.gov.au that sorted me out it was like a big switch clicking in. chown 777 on your shares and group management was an important learning curve but., the hours I've spent on this will reap rewards down the line... Loving Ubuntu loving life and loving the spirit of open source but that just might be sleep deprivation kicking in... IT WORKS
I am trying to execute SQL commands directly from a file in psql 14, and landed the same error.
The reason is that "postgres" user is different from the 'admin' or the main user of the operating-system. So, this main user denies "postgres" to access files from its file system.
Although there is a way to bypass it.
Windows lets any user access the files in 'C:\Users\Public' and Linux distros allow files in '/tmp' folder to do the same.
So, whatever files you are trying to access from postgres' terminal, keep the files in
'C:\Users\Public' for Windows
'/tmp' in Ubuntu
Read from the orginal source of this answer
use \copy command from psql instead with this config:
sudo psql -U postgres -d <your-db> -c "\copy <your-query-or-table> TO '<pat-to-save-file>' WITH (FORMAT CSV)"

Saving Meta in OS X Terminal

Since Terminal appeared I've saved as ~/mySrvr.term a modified stock .term file
which opens to execute an ssh to a remote server and to modify the appearance.
I have NOT been able to save "use option key as meta" for emacs-ery; there's no slot for it
in the term file and I'm reluctant to wrestle with a keyboard dictionary file.
Am I missing something simple? How do I get option-as-meta to stick between sessions?
Thanks
If you're on Leopard open up preferences in Terminal.app. There is a tab called Settings which is actually settings for different styles of terminal windows. Make a copy of one of Apple's defaults and change it to your liking and make sure to select the option-as-meta radio button there.
I don't even bother opening term files now, under Leopard you can save any group of windows via the Windows menu and it saves all of their settings and and you can open these backup via the same menu. For example, I have a window group that ssh's into a server in two tabs and the third tab starts up an ssh tunnel.
Not sure if this helps, but when I go Shell -> Export Settings and save the file as a .terminal file, there are a few lines that save my option-as-meta preference:
<key>useOptionAsMetaKey</key>
<true/>
These lines are for a .terminal preference file, not for a .term (which is pretty hard to Google for) so they may not be what you're looking for.

com.finder.desktopservices asks for admin password when copying files

I am trying to copy files from my mac to a network drive. When copying the files, an empty file is created at the destination and I get a prompt saying I might have to enter an administrator password to change the file named "whatever my file name is". When I press continue, the password dialog shows it is com.apple.desktopservices which is asking for the password.
From what I see happening, an empty file is first created and then I am prompted for a password. Once I enter the password, the empty file is removed and another file is created. It is to this file that the contents are written.
Any ideas why this should happen?
Thanks.
P.S. The file has full read-write permissions
Is the file actually created, or is Finder just displaying an icon for it? What kind of machine is the network drive (another Mac, a Windows machine, a NAS?), and what protocol are you using to connect to it? (SMB, CIFS)?

Resources