- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- .Xdefaults setup question
Operating System - HP-UX
1753787
Members
7210
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2010 12:22 AM
тАО10-18-2010 12:22 AM
Hi,
When I am accessing the root account via su (using CDE) the dynamic terminal resize is not working. I guess it has something to do with the .Xdefaults file i created for my user account (which I am executing the su from) so the .profile could be executed under CDE. The problem does not occure when accessing the root directly so I assume it must be a matter of some variables set for the user account. Please advise! Thanks!
When I am accessing the root account via su (using CDE) the dynamic terminal resize is not working. I guess it has something to do with the .Xdefaults file i created for my user account (which I am executing the su from) so the .profile could be executed under CDE. The problem does not occure when accessing the root directly so I assume it must be a matter of some variables set for the user account. Please advise! Thanks!
Solved! Go to Solution.
- Tags:
- .Xdefaults
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2010 06:32 AM
тАО10-18-2010 06:32 AM
Solution
The dynamic terminal resize happens when the terminal emulator (e.g. dtterm) or the remote access daemon (telnetd/rlogind/sshd) sends a SIGWINCH (WINdow CHange) signal to the program running on the pty.
The problem is, a regular user can send signals to his own processes only, not to processes owned by someone else.
When you access the root account via su, it starts another shell that will be owned by root, and thus it will be immune to SIGWINCH signals coming from the original session.
So the problem is *not* caused by any variables or .Xdefaults settings: it is a consequence of how signals work on any POSIX-compliant Unix system.
As a workaround, when accessing the root account, you can trigger the resize manually by running:
eval `resize`
(With some situations, even just "resize" can work... but with the eval and backticks, it will ensure the LINES and COLUMNS environment variables will be set to the new values.)
MK
The problem is, a regular user can send signals to his own processes only, not to processes owned by someone else.
When you access the root account via su, it starts another shell that will be owned by root, and thus it will be immune to SIGWINCH signals coming from the original session.
So the problem is *not* caused by any variables or .Xdefaults settings: it is a consequence of how signals work on any POSIX-compliant Unix system.
As a workaround, when accessing the root account, you can trigger the resize manually by running:
eval `resize`
(With some situations, even just "resize" can work... but with the eval and backticks, it will ensure the LINES and COLUMNS environment variables will be set to the new values.)
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2010 06:57 AM
тАО10-21-2010 06:57 AM
Re: .Xdefaults setup question
OK, but how can the resize command be effective in such case? It has to read the curent window (owned by user) settings and fit the terminal size to it (owned by root)?
Thanks!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2010 06:57 AM
тАО10-22-2010 06:57 AM
Re: .Xdefaults setup question
I could simply remind you that "root can read and write *anything*", but that would not explain why su can be used to switch from one unprivileged user to another unprivileged user, too.
The SIGWINCH signal only informs processes that the terminal size has changed; it does not carry any information about the new size. The program that receives the signal must find out the new size on its own, if it wants to act on the signal.
Only the signal is blocked by the su operation; any process that can do terminal I/O can also inquire the size of the terminal window it's running on, whether it's running within a su session or not.
MK
The SIGWINCH signal only informs processes that the terminal size has changed; it does not carry any information about the new size. The program that receives the signal must find out the new size on its own, if it wants to act on the signal.
Only the signal is blocked by the su operation; any process that can do terminal I/O can also inquire the size of the terminal window it's running on, whether it's running within a su session or not.
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP