06-10-2013
Alias to Open new terminal?
Hello everyone. I want to create an alias of vi, so that everytime I use vi to edit something, it will open up a new terminal session, with the vi file that I want to edit. So for example if I enter:
sudo vi /etc/bashrc
This will open up a brand new terminal window, with the /etc/bashrc file opened and ready to be edited... But I have no idea how get the information from one terminal to the newly created terminal... any suggestions?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want the shell script to open the terminal and in that terminal i want to run a command specified in the script...
how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies
2. Solaris
Hi, Is there a way to open and arrange terminal windows automatically under CDE? For example, I want to open and arrange terminal windows like this:
|------------|
| TW TW TW |
| TW TW TW |
| TW TW TW |
|------------|
Thank you in advanced! (5 Replies)
Discussion started by: aixlover
5 Replies
3. Shell Programming and Scripting
how to open a .pdf file from terminal not using gpdf
I work on fedora 12 and default application assigned for viewing the pdf files is document-viewer (3 Replies)
Discussion started by: rrd1986
3 Replies
4. Solaris
Hi,
I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal.
Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies
5. OS X (Apple)
I want to press "apple + T" to open a new terminal tab. This terminal tab must be in the same directory as the current one. Anyone knows how to do that?
Thanks a lot! (1 Reply)
Discussion started by: andrewust
1 Replies
6. Red Hat
hi,
I am using red hat .I want that when ever the user login in GUI interface the terminal windows automatically open and then the user want to logout it 1st close the terminal and then login. There is a file in #ls -a i.e .bashrc and .bash_logout
I does not know how to add my... (0 Replies)
Discussion started by: mypass
0 Replies
7. Linux
OK this is a bit messy.
I run Fedora with gnome on a compiz desktop, I have a script (userstart) that opens my 'standard' environment for all my machines when I login. userstart flips to a specific workspace and then opens the required applications in that workspace then flips to the next... (2 Replies)
Discussion started by: Bashingaway
2 Replies
8. Fedora
hi all,
I open Matlab program from terminal. However, when I go back to terminal I can't do anything in it , only until Matlab is closed.
Can someone please advise me on how I can oversome this problem ?
thanks
peter (2 Replies)
Discussion started by: peter_071
2 Replies
9. Shell Programming and Scripting
Hi,
I am trying to open small size file only in vi editor on solaris or Linux machine
but it giving message "Terminal too wide" and then I have to come out.
As shown below:-
-rwxr-x--- 1 rkycadm rkycprd 2445 Sep 12 04:06
$ vi file.txt
Terminal too wide
:q!
----------... (2 Replies)
Discussion started by: RahulJoshi
2 Replies
10. UNIX for Beginners Questions & Answers
Hi folks.
I'm using pssh to run commands on a cluster, (pis/Raspian/Jessie) but I'm opening a app that runs and runs and runs. It's quite helpful to vnc to a machine to make sure it's still running ok now and then, but they're basically left alone.
Of course when pssh runs a command it... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies
LEARN ABOUT FREEBSD
tcsetsid
TCSETSID(3) BSD Library Functions Manual TCSETSID(3)
NAME
tcsetsid -- set session ID associated with a controlling terminal
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/types.h>
#include <termios.h>
int
tcsetsid(int fd, pid_t pid);
DESCRIPTION
The tcsetsid() function sets associates a session identified by pid with a controlling terminal specified by fd.
This implementation only allows the controlling terminal to be changed by the session leader itself. This implies that pid always has to be
equal to the process ID.
It is unsupported to associate with a terminal that already has an associated session. Conversely, it is also unsupported to associate to a
terminal when the session is already associated with a different terminal.
ERRORS
If an error occurs, tcsetsid() returns -1 and the global variable errno is set to indicate the error, as follows:
[EBADF] The fd argument is not a valid file descriptor.
[ENOTTY] The file descriptor represented by fd is not a terminal.
[EINVAL] The pid argument is not equal to the session ID of the calling process.
[EPERM] The calling process is not a session leader.
[EPERM] The session already has an associated terminal or the terminal already has an associated session.
SEE ALSO
getsid(2), setsid(2), tcgetpgrp(3), tcgetsid(3)
HISTORY
A tcsetsid() function first appeared in QNX. It does not comply to any standard.
BSD
May 4, 2009 BSD