.bash_logout in Pseudo terminals


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers .bash_logout in Pseudo terminals
# 1  
Old 07-14-2010
.bash_logout in Pseudo terminals

Hi all! I wrote a script that backups the bash history and it is called by .bash_logout. It work fine in /dev/ttyX terminals but the problem is it doesn't work when I logout from the pseudo-terminals i.e. /dev/pts/X (those created by gnome-terminal, konsole, etc). Does anybody have idea why it doesnt work?
Thx!

Last edited by funyotros; 07-16-2010 at 06:53 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

non-overlapping terminals

Hi Everyone! I was wondering if there's an easy way to have terminals (gnome-terminal for instance) be open in such a way that they're not overlapping each other? I suppose I could play around with the --geometry option but that would imply me checking whether a terminal is already at a given... (3 Replies)
Discussion started by: anthalamus
3 Replies

2. UNIX for Dummies Questions & Answers

Communicating Via Terminals With Other Computers

Hello, I would like to know if it is possible to communicate between two terminals on seperate computers for free - e.g. not using proprietary software or using the built in UNIX terminals on operating systems of the UNIX flavor. Thanks, photray94 (2 Replies)
Discussion started by: photray94
2 Replies

3. Shell Programming and Scripting

calling multiple terminals

I'd like to write a script that will call n number of terminals that will all ssh to X-server and automatically enter the same password. Unfortunately I'm not exactly sure what kind of commands would work for me here because when I call for gnome-terminal, a new terminal pops up and the old... (1 Reply)
Discussion started by: gelitini
1 Replies

4. Solaris

pseudo: [ID 129642 kern.info] pseudo-device: vol0

Hi I have a system that gave me some messages on bootup that I was not used to seeing: pseudo: pseudo-device: vol0 genunix: vol0 is /pseudo/vol@0 these came with these: Feb 13 17:42:17 system1 eri: SUNW,eri0 : 100 Mbps full duplex link up Feb 13 17:42:21 system1sendmail: My unqualified... (0 Replies)
Discussion started by: mndavies
0 Replies

5. UNIX for Advanced & Expert Users

one command for all unix terminals

Hi, I am working in huge environment, I do type commands from my terminal window repeadly in all same setup unix environments. I am looking some kind of a terminal emulator or some simple program that will help me? basically if type command like 'ls' in one unix terminal window it should echo... (5 Replies)
Discussion started by: rgmekala
5 Replies

6. AIX

how to create virtual terminals

Hello All! I want to know how to create virtual terminals in aix. As in Linux, simply by using Ctl-Alt-F1-F6 keys, i can switch to any of the 6 corresponding virtual terminals. But i dont know how to do that in AIX. Also if I access an AIX server through remote desktop, will the method to create... (0 Replies)
Discussion started by: Anubhuti
0 Replies

7. UNIX for Dummies Questions & Answers

view all others terminals

i'm responsible for maintenance at my place and would like to watch all terminals in front me.i log myself into one terminal, but would like to view copy of other's terminals visible to me, it is just like for audit/security watch. (2 Replies)
Discussion started by: vkandati
2 Replies

8. UNIX for Advanced & Expert Users

Multiple Terminals

Dear Members, I have aquired a load of old Wyse dumb terminals. I have a Linux system set up that I want to be the host for all of these. Now, I know these don't use cat5 or standard networking. They are all done through serial (com) ports. However, I researched this more and found a converter... (25 Replies)
Discussion started by: Phobos
25 Replies

9. Programming

Pseudo Terminals

I need to spawn a number of foreground process by reading a configuration file. Each process needs some form of I/O. Hence I need to run it on different terminals. How it can be done programatically , i.e. , my module needs to find which terminal is not in use, then open it, execute the process... (2 Replies)
Discussion started by: S.P.Prasad
2 Replies

10. UNIX for Dummies Questions & Answers

Making X terminals out of a PC

Well I was trying to configure an Old PC having Win 3.1 to speak X with my UNIX server . I looked at notes , Looks like Debian Linux gives a base tarball to help boot of a floppy and talk to the XDMCP server . Well I was just hoping if there are other open source tools out there which would... (1 Reply)
Discussion started by: DPAI
1 Replies
Login or Register to Ask a Question
PTY(7)							     Linux Programmer's Manual							    PTY(7)

NAME
pty - pseudo-terminal interfaces DESCRIPTION
A pseudo-terminal is a pair of virtual character devices that provide a bidirectional communication channel. One end of the channel is called the master; the other end is called the slave. The slave end of the pseudo-terminal provides an interface that behaves exactly like a classical terminal. A process that expects to be connected to a terminal, can open the slave end of a pseudo-terminal and then be driven by a program that has opened the master end. Anything that is written on the master end is provided to the process on the slave end as though it was input typed on a terminal. For example, writing the interrupt character (usually control-C) to the master device would cause an interrupt signal (SIGINT) to be generated for the foreground process group that is connected to the slave. Conversely, anything that is written to the slave end of the pseudo-terminal can be read by the process that is connected to the master end. Pseudo-terminals are used by applications such as network login services (ssh(1), rlogin(1), telnet(1)), terminal emulators, script(1), screen(1), and expect(1). Historically, two pseudo-terminal APIs have evolved: BSD and System V. SUSv1 standardized a pseudo-terminal API based on the System V API, and this API should be employed in all new programs that use pseudo-terminals. Linux provides both BSD-style and (standardized) System V-style pseudo-terminals. System V-style terminals are commonly called Unix 98 pseudo-terminals on Linux systems. Since kernel 2.6.4, BSD-style pseudo-terminals are considered deprecated (they can be disabled when configuring the kernel); Unix 98 pseudo-terminals should be used in new applications. Unix 98 pseudo-terminals An unused Unix 98 pseudo-terminal master is opened by calling posix_openpt(3). (This function opens the master clone device, /dev/ptmx; see pts(4).) After performing any program-specific initializations, changing the ownership and permissions of the slave device using grantpt(3), and unlocking the slave using unlockpt(3)), the corresponding slave device can be opened by passing the name returned by ptsname(3) in a call to open(2). The Linux kernel imposes a limit on the number of available Unix 98 pseudo-terminals. In kernels up to and including 2.6.3, this limit is configured at kernel compilation time (CONFIG_UNIX98_PTYS), and the permitted number of pseudo-terminals can be up to 2048, with a default setting of 256. Since kernel 2.6.4, the limit is dynamically adjustable via /proc/sys/kernel/pty/max, and a corresponding file, /proc/sys/kernel/pty/nr, indicates how many pseudo-terminals are currently in use. For further details on these two files, see proc(5). BSD pseudo-terminals BSD-style pseudo-terminals are provided as precreated pairs, with names of the form /dev/ptyXY (master) and /dev/ttyXY (slave), where X is a letter from the 16-character set [p-za-e], and Y is a letter from the 16-character set [0-9a-f]. (The precise range of letters in these two sets varies across Unix implementations.) For example, /dev/ptyp1 and /dev/ttyp1 constitute a BSD pseudo-terminal pair. A process finds an unused pseudo-terminal pair by trying to open(2) each pseudo-terminal master until an open succeeds. The corresponding pseudo- terminal slave (substitute "tty" for "pty" in the name of the master) can then be opened. FILES
/dev/ptmx (Unix 98 master clone device) /dev/pts/* (Unix 98 slave devices) /dev/pty[p-za-e][0-9a-f] (BSD master devices) /dev/tty[p-za-e][0-9a-f] (BSD slave devices) NOTES
A description of the TIOCPKT ioctl(2), which controls packet mode operation, can be found in tty_ioctl(4). The BSD ioctl(2) operations TIOCSTOP, TIOCSTART, TIOCUCNTL, and TIOCREMOTE have not been implemented under Linux. SEE ALSO
select(2), setsid(2), forkpty(3), openpty(3), termios(3), pts(4), tty(4), tty_ioctl(4) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2005-10-10 PTY(7)