mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 01:16:35 +00:00 
			
		
		
		
	Add automatic TTY logout timeout
This commit is contained in:
		
							parent
							
								
									e3aa39ffc5
								
							
						
					
					
						commit
						b26d4f4bad
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								root/etc/profile.d/shell-timeout.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								root/etc/profile.d/shell-timeout.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
# Set automatic timeout for shell
 | 
			
		||||
# which will automatically log out the user after certain amount of time
 | 
			
		||||
# This will not work on termunal emulators in X11
 | 
			
		||||
TMOUT="$(( 60*10 ))";
 | 
			
		||||
[ -z "$DISPLAY" ] && export TMOUT;
 | 
			
		||||
case $( /usr/bin/tty ) in
 | 
			
		||||
	/dev/tty[0-9]*) export TMOUT;;
 | 
			
		||||
esac
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue