My question is very simple.
How does OSX understands that this special process needs to make output to special terminal? Can we change it?
For example, is it possible to run process via ssh connection (without GUI) and make some system call, and this process will start using OSx GUI
I don't really understand your question, but I suspect you maybe have a look at the "expect" tool, which allows you to start some connection and then let the user continue after you have established the connection. Try:
man expect
in a terminal window.
Related
I have used an script in past that enabled me to connect me to multiple unix machines, much like using a tab. Its just that I forgot the name of the script. Anyone know about it?
I suspect you're referring to GNU screen, which is a terminal multiplexer that allows you to have multiple virtual terminal windows in a single normal terminal window (ala PuTTY). I'd suggest tmux as a better alternative, but they're essentially the same. There are other solutions that will allow you to do tabs in the terminal client, but that depends on your OS (I'm assuming you're on Windows), and you'd have to initiate each connection individually. screen/tmux is the way to go most of the time.
for an embedded video player I need X11 to start with nothing on it, I'll start xine via script later in the process.
A "naked" X11 install will always start xterm, killing xterm will also kill X11.
Any idea on how to start X11 "naked"?
Your answer(s) are as always highly appreciated,
thank you,
PS. Also, for bonus, any good (ie. no .bashrc, no mingetty --autologin) ways of starting X11 on boot?
You can run X by just running 'X' or 'Xorg' from the command line. To start X on boot, it depends on your system. Linux systems with an inittab can add X as another tty, the way it's done in inittab for other ttys. FreeBSD users can put it in /etc/ttys.
An alternative is to use a custom .xinitrc for root, that runs the script that you want. You will need to authenticate against the X server somehow, so the .xinitrc route is probably the easiest way to go.
If you use just call X directly instead of gdm or similar you can get a plain (i.e. empty) display e.g.:
/usr/bin/X :0
If you want to make this happen automatically you could put it in /etc/rc.local (if you have one), or write an init script of your own.
My university has quite a lot files (like past papers etc) which I need to be on the uni network to access them. I ssh, using port forwarding, into the network and set my browser (Firefox) to go through that port. I know it would be quite easy to write something in most languages that would enter the command into a terminal, but which language/method could I use to make this happen? I expect some sort of scripting language could but I really know nothing about them, but I'd be willing to learn one just to have a little fun with this.
I'm using a cygwin terminal on Windows 7, if that will make a difference.
To neaten up my question: Which language would be best to acheive the above effect? Not necessarily the best, just possible and relatively simple to learn. I used the word best so I suppose I'll put a subjective tag.
EDIT:
Just in case anyway wants to do this precise thing, I'll show my solution. I ended up using a batch file because a few things made the bash more difficult. Anyway, in order to SSH into the network and open a new firefox window with the proxy changed, I just have to open this batch file and enter my password.
cd C:/cygwin/bin
ssh -fND 9001 username#your.website.here
cd "C:/Program Files/Mozilla Firefox"
firefox -no-remote -P SSH_profile
Save as .bat
In order for this to work you need to set up a profile with name SSH_profile (or whatever) and set the connection settings to go through port 9001. The script will open use the ssh command in /cygwin/bin and enter in the information. You enter your password and then it goes to your firefox directory, uses those arguments which opens a separate profile with the connection settings changed (means you can view unaccessible files in one window and anything else you don't want to be on your uni network in another. Just close the windows when you are done.
Quite a specific case but I thought I'd share my answer in the hope of helping someone, some day.
Since you are using cygwin, write a bash shell script.. If you don't want to rely on bash, powershell would be what you want, although you could probably get it working using a batch file.
This is exactly the kind of thing shell scripting is for.
Edit
You can change the firefox settings on the command line by passing the -override flag. This will let you have special settings for the invoked process.
How can I have another Terminal open when I am at my server by ssh?
I do not want to type my password twice to get another terminal for my server.
Perhaps, Bash has buffers similarly as Vim.
Check out GNU screen. It's kind of arcane and awkward to use, but does what you're looking for, and it's probably also installed on your server.
You can also forward X11 and run multiple xterm instances, but that's a pain.
Your best bet, though, is your proverbial "type my password every time" solution: you should set up SSH keys so you don't need to type your password every time and then just use multiple connections in Terminal tabs.
You can use something like GNU Screen.
The Bash shell has a feature called Job Control that allows you to run and manage multiple processes. You can read about it here: http://commandlinemac.blogspot.com/2008/12/bash-job-control-fg-bg-jobs-and-ctrl-z.html
GNU Screen
BTW. If you don't like typing passwords, try PK auth.
How it's done with PuTTy.
It's possible to use screen to open other terminals without needing to authenticate again.
Screen can also detach so that you can leave terminal open after logging out and re-attach them later. I use this on my home server for keeping rtorrent open.
We have been told that we have to use a piece of software called TumbleWeed Secure Transport to transport files between our selves and the other company. I can get it to work with the GUI but not with the command line.
Part of the issues I am having is the GUI will open even when using the command line:
C:\Progra~1\Tumbleweed\STClient\STclient.exe httpsu://user:pass#hostname.com:443/inbox/ C:\temp\File /prefNoAskSched /prefASC
The GUI will not disappear at all and the batfile does not return till the GUI is manually closed.
We do not want to use the GUI as the users have a bad habit of braking things if we let them touch it so automation seems far safer.
Has anyone had any experience with this app?
I managed to get it to work with the following command line:
C:\Progra~1\Tumbleweed\STClient\STclient.exe httpsu://user:password6#hostaddress.com:443 /inbox/ C:\temp\ACEJON /Remote-Site SITENAME /prefNoAskSched /prefASC /hidden /log /quitWhenDone