Alias to Open new terminal?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Alias to Open new terminal?
# 1  
Old 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?
# 2  
Old 06-13-2013
I'm not getting you fully, but one way to do it is as below. This assumes you have an Xserver available and that xterm is installed:
Code:
alias vi="xterm -e vi /etc/bashrc &"

I wonder why don't you edit it directly, though?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Pssh open terminal?

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

2. Shell Programming and Scripting

When trying to open file Message:-Terminal too wide?

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

3. Fedora

How to use terminal while keeping a program open?

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

4. Linux

How to open a gnome-terminal in specific workspace and run script within it automatically upon login

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

5. Red Hat

How to open terminal automatically.

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

6. OS X (Apple)

How to make a new terminal tab open in the same directory the current one?

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

7. Solaris

Open Terminal Don't work

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

8. Shell Programming and Scripting

How to open a pdf file from terminal?

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

9. Solaris

How to open and arrange terminal windows automatically under CDE?

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

10. Shell Programming and Scripting

open terminal to run cmd using shell script

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
Login or Register to Ask a Question