selectbutton
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile / Ignoring   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LINUX QUESTION!!

 
Post new topic   Reply to topic    selectbutton Forum Index -> GBF 120%
View previous topic :: View next topic  
Author Message
Hot Stott Bot
banned


Joined: 05 Dec 2006

PostPosted: Tue Feb 20, 2007 6:56 am    Post subject: LINUX QUESTION!!    Reply with quote

Okay you nerds, let's see what you got! Riddle me this:

I have a Cygwin X11 server running on my laptop so that I can do X11 forwarding and see popup windows for email, IMing... and since I'm running on a few different machines at once I also like keeping a few different xterms open!

Now, here's the problem:

One of the servers I'm sshing into automatically logs me out after 90 minutes of inactivity, so I have a script running that just disconnects and reconnects every 80 minutes.

Now, I want that damn xterm there all the time, so my login script for that server includes creating an xterm window. However, I don't want a window popping up every 80 mintues so I start it with xterm -iconic.

HOWEVER!

the Cygwin X11 server in -multiwindow mode (which I use), doesn't have proper support for starting windows minimized!

However, it does handle messages telling it to minimize windows (just not being told to create a window in that state). So...

Any ideas?

Maybe some way to immediately send a message telling it to minimize the xterm? Maybe I could launch the xterm with a script that tells the window its in to minimize itself (like xterm -e minimize-me)? Anyone know how to make such a script?

If someone can figure out how to fix this I will be impressed!
Filter / Back to top 
View user's profile Send private message
Hot Stott Bot
banned


Joined: 05 Dec 2006

PostPosted: Tue Feb 20, 2007 7:02 am        Reply with quote

Oh another one...

Just one of the servers doesn't seem to be honoring xterm -title "My Aesthetically Pleasing Thematic Title". No matter what I try to do I always get "user@server:directory"!! Any ideas?

Actually, I'm thinking, maybe if instead of having it open a shell I have it open a script which runs a shell that might fix it since the shell is probably what's changing the title...

Mmm...
Filter / Back to top 
View user's profile Send private message
Hot Stott Bot
banned


Joined: 05 Dec 2006

PostPosted: Tue Feb 20, 2007 7:34 am        Reply with quote

I found wmctrl which seems like it could do this, but...

Since I'm using X11 forwarding over ssh it can't find a window manager! If I install the Cygwin version of wmctrl locally and run it in a Cygwin shell I can tell it to minimize the windows, but well... gee! I can't imagine any way to get my ssh session to tell my locally running Cygwin to run a script... that would just be ludicrous!

I could also run a script constantly that checks for new windows and minimizes them when it sees a new pid and the right title and minimizes them or something but jesus that's just completely absurd.

:banging head:
Filter / Back to top 
View user's profile Send private message
!=



Joined: 04 Dec 2006
Location: the planet of leather moomins

PostPosted: Tue Feb 20, 2007 7:36 am        Reply with quote

The xterm title is likely to be resetted by one of those starting scripts. Like .bashrc or .bash_profile or even worse. There is an ANSI sequence I believe for setting the title.

Just googled this: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/xterm-title-bar-manipulations.html
Filter / Back to top 
View user's profile Send private message Visit poster's website
Hot Stott Bot
banned


Joined: 05 Dec 2006

PostPosted: Tue Feb 20, 2007 7:58 am        Reply with quote

Sweet titlebar fixed!

I just have the script that launches the xterm change PS1 before it launches it then set it back now!!

Thanks!

I'm still stuck on the starting xterms minimized problem though...
Filter / Back to top 
View user's profile Send private message
Quick Reply
 Attach signature
 Notify on replies

Display posts from previous:   
Post new topic   Reply to topic    selectbutton Forum Index -> GBF 120% All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group