Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XTerm parameter changes on the fly...

Posted on 1998-10-27
14
Medium Priority
?
373 Views
Last Modified: 2008-01-09
Is there a way to change X-Term ( or nxterm or rxvt ) parameters on the fly... Like for example changing the title, colors or geometry of a term with out starting a new term.
0
Comment
Question by:wbellman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 4
14 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638385
- colors are properties of the window manager, check there how to change (not so easy)
- geometry? how about using your pointing device? (is a window manager property too)
- title from within a shell
    echo -n "^[]0;your title here^G" > `tty`
  where  ^[  is ESC and  ^G  is BEL (may be that you must prepend them by Ctrl-V)
0
 

Author Comment

by:wbellman
ID: 1638386
The title string didn't work. maybe I did it wrong...  From a tsch shell I entered...

echo -n "[ctrl-v][esc]0;your title here[ctrl-v][ctrl-g]" > 'tty'

      You should be able to change background and foreground colors from the prompt... I've done it under IRIX, but the same commands don't apply under LINUX.

As far as the geometry goes, I know you can change them with the mouse.  I wanted to know if you could from the promt... if not it's no big.


0
 
LVL 2

Accepted Solution

by:
Resonance earned 60 total points
ID: 1638387
I think you missed a right bracket.  Try:

echo -n "[ctrl-v][esc]]0;your title here[ctrl-v][ctrl-g]"

The > 'tty' part should be unnecessary.  It should look like:
  echo -n "^[]0;your title here^G"
when you're done.

Also, if that fails, there's also a slightly longer route.

You can also try:

echo -n "^[]2;your title here^G^[]1;^G"

Remember that after each escape sequence you need a rightbracket and then a number.  

If that doesn't work, you need a new xterm :)

0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:wbellman
ID: 1638388
Well the title trick worked. However I am still looking for a way to change foreground and background color....
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638389
good Resonance to my comment using it as answer :-|

wbellman, s said in my last comment, colors are properties of the X window manager. You either must specify them at startup (of xterm), or your application (xterm) must be able to accept changes via the XLIB protocoll (tksend from the Tcl/Tk suite can do it, but most xterm implementations won't allow it)-:
0
 
LVL 2

Expert Comment

by:Resonance
ID: 1638390
Sorry ahoffman, submitted without thinking about that.  Didn't mean to steal your fire.  

Wbellman, feel free to kill my answer so ahoffman can resubmit.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638391
Don't worry, Resonance.
Nobody needs to be killed ;-))
0
 

Author Comment

by:wbellman
ID: 1638392
Sorry...  I wasn't paying attention.  I assumed ( and you know what that means ) it was the same guy.  Sorry 'bout that.  Is there a way to fix it?
0
 
LVL 2

Expert Comment

by:Resonance
ID: 1638393
Yes.  You reject my answer, and ahoffman resubmits his comment as an answer, and then you accept that.

0
 

Author Comment

by:wbellman
ID: 1638394
How do I reject an answer I've already accepted?
0
 
LVL 2

Expert Comment

by:Resonance
ID: 1638395
Doh!  I didn't realize you'd accepted it already.  Uhm, ahoffman, if you like I can create a new question for you and assigning you points out of my pool.  Otherwise, we'll have to take it to the support board to have a maintainer handle the muck-up.
0
 

Author Comment

by:wbellman
ID: 1638396
Oh my....  I didn't mean to cause problems.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1638397
Hey, don't panic. Resonance, be happy with the points.
wbellman, such things happen. If you will have problems in future, send mail to support@experts-exchange.com.

Lets forget all about grading right or wrong person, you got an answer, and that's what this game is good for.
0
 

Author Comment

by:wbellman
ID: 1638398
Cool.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question