Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Routing command to another graphical terminal Post 302967650 by sea on Friday 26th of February 2016 02:24:00 AM
Old 02-26-2016
Try:
Code:
xfce4-terminal -e "nano example.txt"

If you're on a system with multiple terminal-applications, multiple users with their own preferences, and if TUI is installed, you could also try:

Code:
tui-edit example.txt
tui-terminal "tui-edit -c example.txt"

The first would open the textfile with the users favorite text editor, either GUI (gedit, geany...) or CLI (emacs, nano, vi..) (not limited to these named ones).
The second would open a new terminal (users favorite terminal app) and force tui-edit to open the textfile with the console editor in that new terminal window.

Hope this helps
This User Gave Thanks to sea For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change the GRUB command line to graphical interface?

Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (1 Reply)
Discussion started by: lee_chongeu
1 Replies

2. Linux

How change GRUB command line to graphical interface?

Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (4 Replies)
Discussion started by: lee_chongeu
4 Replies

3. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

4. UNIX for Dummies Questions & Answers

what's the terminal command to do this ?

what's the terminal command to do this ? thanks (6 Replies)
Discussion started by: aneuryzma
6 Replies

5. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

6. Shell Programming and Scripting

who command from non terminal in unix

I was executing a command "who -ms" from a CHUI application but i get below message, It seems that who command can be executed only when we are logged directly in unix box as we have terminal. Is there a way to get rid of this problem , or anyother command where i can get machine name of the... (4 Replies)
Discussion started by: lalitpct
4 Replies

7. UNIX for Dummies Questions & Answers

Sending command from one terminal to another.

Hello, I am running a program in a terminal. this program is just printing random words. I can change the color of each word by entering the first character of the color(for example G for Green). I want to write a bash code that runs in a different terminal and sends different characters to... (3 Replies)
Discussion started by: alireza6485
3 Replies

8. Shell Programming and Scripting

Cannot get terminal application to launch with a graphical launcher when successful in terminal

I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies

9. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

10. Linux

Terminal command

I need to execute apt-cdrom to designate the pendrive using LM 18.3x 'live". (instead of CD-Rom) Rick (7 Replies)
Discussion started by: 69Rixter
7 Replies
ctermid(3S)															       ctermid(3S)

NAME
ctermid() - generate file name for terminal SYNOPSIS
DESCRIPTION
generates a string that, when used as a pathname, refers to the controlling terminal for the current process. If s is a NULL pointer, the string is stored in an internal static area, the contents of which are overwritten at the next call to and the address of which is returned. Otherwise, s is assumed to point to a character array of at least elements; the path name is placed in this array and the value of s is returned. The constant is defined in the header file. If the process has no controlling terminal, the pathname for the controlling terminal cannot be determined, or some other error occurs, returns an empty string. For multi-thread applications, if s is a NULL pointer, the operation is not performed and a NULL pointer is returned. Notes The difference between and is that must be handed a file descriptor and returns the actual name of the terminal associated with that file descriptor, while returns a string that refers to the terminal if used as a file name. (see ttyname(3C)). Thus is useful only if the process already has at least one file open to a terminal. SEE ALSO
ttyname(3C), thread_safety(5). STANDARDS CONFORMANCE
ctermid(3S)
All times are GMT -4. The time now is 11:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy