Server :: Set Terminal-title Dynamically?
Apr 22, 2010
my problem:
- i log into many linux servers (redhat, debian, suse, ubuntu)
- i want to set the terminal window/tab title to something like: time|ip|fqdn|pwd
the partial solution i found:
- declaring a function _setTitle() in /etc/bashrc
- setting PROMPT_COMMAND at all servers in /etc/bashrc, calling _setTitle is /etc/bashrc the proper place?
but i am i need of a command to set the title of the windows/tabs
solution should
- work for tabs and windows
- should use only builtins and avoid nasty cpu-wasting external forks
- work with common clients (windows/putty, linxu/gnome-terminal, linux/konsole)
- solution should base on cli, not on some gui like sshmenu!!!
View 2 Replies
ADVERTISEMENT
Aug 21, 2010
So when I upgraded to Slack64 13.1 on my asus MB homebrewed desktop and Slack 13.1 on my compaq presario a900 laptop, I started having issues with the xterm title (in Terminal--not Konsole) being too dynamic. By "too dynamic" I mean that I can't actually change the title. The dynamic title (from my .bashrc) is basically just pwd. Whenever I try to set the title (via terminal->set title (menu)), I changes it for a split second, and then reverts back to the dynamic title.
This is merely a petty annoyance, so to get around it, I added an xtitle function that I grabed somewhere online (just echos "�33]0;$*�07"). So for nano-ing some file, I'd type:xtitle some_file.txt; nano some_file.txt
That works just fine (kind of annoying to type though). running xtitle alone won't actually change the name either though (I'm pretty sure it's the same command as what terminal does anyway). That is, running: xtitle some_file.txt
changes the title for a split second, and the reverts back to my old pwd.What I really want is to have it dynamically name it "some_file.txt" whenever I use nano, but that appears to be a functionality of zsh (with the preexec() fxn).I'm wondering if anyone else has had this problem, and if you have a fix for it.
View 3 Replies
View Related
Apr 8, 2011
I use kde3.3. How could I set the title in the top of konsole terminal. for example, i would like to have the file name printed if I open the file using vi or vim.
View 4 Replies
View Related
Sep 2, 2009
I am using the X server of Fedora 7 for displaying my application.I am getting the display as I need but I dont want the title bar of gnome terminal titlebar to be displayed.I also dont want the maximize,minimize buttons to be displayed.
View 3 Replies
View Related
Apr 12, 2010
I'm not quite sure what's up with this, but when I change the title of a terminal away from the default (e.g. to represent which project that terminal is to be used for), it changes back to the default (user@host:path), but only on the task bar at the bottom of the screen, listing the open windows.
If I change tabs in the terminal and then change back, it displays again at the bottom of the screen, but as soon as I execute another command (e.g. ls), then it resets again. That's quite annoying, as I like to have a few terminals open, each with a set of tabs pertaining to a particular project. The fact that I can't see from the title on the taskbar which is which means I have to guess/remember/check them all...
View 2 Replies
View Related
Feb 12, 2011
Usually I open 5 terminals. And since each of those 5 terminals prints it's tile as: "username@username-laptop: ~" It becomes very hard to see what is what. So, I would like my terminal to always change it's title automatically to the program that I am currently using.
So, if I type "irssi", the title of my gnome-terminal-window, should change to: "irssi" for example.
View 2 Replies
View Related
Nov 3, 2010
I have configured a "Syslog" server on /var directory as a separate ext3 partition - to receive the logs and events from the clients & the firewall as well. The directory needs to grow dynamically as the logs are populated. Is there a way i can make the filesystem grow dynamically as and when the directory is full.
View 6 Replies
View Related
May 2, 2010
after upgrading from Karmic Koala 9.10 to Lucid Lynx 10.04, i notice something different with title bar on every window opened.
for example:
"Google - Mozilla Firefox" is not at the middle of the window title. and on Lynx it's on the left.
View 6 Replies
View Related
Feb 8, 2010
Everything worked 100% great untill I change color depth to 16 bits.I do not want 24 Bits, I want 16 Bits. I have good reasons. Never had this problem in Gutsy 7.10 ...I deeply regret in upgrading to 9.10 ...
My video card:
Gforce 7950 GX2
Changes to xorg.conf file: Firstly, I saved it at 16 color depth with the sudo nvidia-settings and by clicking on the save to xorg.conf file Button. Rebooted computer....... It worked, saved file, and I got the following bugs:
*Cannot move windows by dragging their title bars.
*Cannot see close "X" Button in the title bar.
*Cannot see Minimize Button in the title bar.
*Cannot see Maximize Button in the title bar.
Went back to 24 bits and problem got resolved. Then i tryed: I did sudo gedit xorg.conf I changed all the 24's with 16's ... Rebooted computer....... It works GOOD... BUT: I got the same bugs from before. I will retype them below
*Cannot move windows by dragging their title bars.
*Cannot see close "X" Button in the title bar.
*Cannot see Minimize Button in the title bar.
*Cannot see Maximize Button in the title bar.
My xorg.conf file:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Sun Feb 1 20:21:04 UTC 2009
Section "ServerLayout"
[code]....
View 1 Replies
View Related
Feb 13, 2011
why the title bars are not showing up correctly like this:
View 2 Replies
View Related
Jul 21, 2009
I am facing a problem. I want to know how to add files to an already existing rpm. Not at the creation time of rpm. Because we have to add some files to it dynamically if any user purchases it from our webserver. I have searched everywhere but havent find any. Is it possible to do so?
View 1 Replies
View Related
Oct 22, 2010
This post isn't really asking for a tutorial, but rather asking for some ideas. I've come up with a few ideas, but they seem cumbersome and unnecessary, so I was wondering if someone with more experience than me could out. Also, my explanations suck, but I'll try to do my best. So say I have an executable called X. At some point during its execution, X loads and uses (using dlopen and dlsym) a library called Y. In Y, there a bunch of functions that call the function called, for example, void *special_malloc (size_t). These functions come from another linked library (linked during compilation) called Z. Problem is, special_malloc contains some static variables within its scope, and when those variables are reset midway through a program, an invalid free occurs (special_malloc uses garbage collection). Now, what I want to happen is that whenever lib Z calls special_malloc, it instead calls the special_malloc defined in the executable X, so that these static variables are retained. Keep in mind that I have control of the Z library, meaning I can edit the source to fit my needs.
View 2 Replies
View Related
May 5, 2011
I know this is somewhat lame, but I remember back in college the MOTD on some of the systems was a random quote. I always wanted to do that. It seemed really trivial, but still neat and clever.
I searched a bit and don't see anything built-in for CentOS, so I was considering writing a Perl script to parse the RSS feed from a quotes site, then update /etc/motd with a random quote from the feed. This would nearly guarantee I could have this on any distro with identical results. Does anyone know of anything that already exists? Is anyone interested in using a script that I write to have the MOTD updated with random quotes themselves, or am I the only one? I'm perfectly willing to share the result when I'm finished.
View 1 Replies
View Related
Feb 22, 2010
I'm looking for a way to dynamically modify a fied in the SQL file.
Example,
INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10023,SOMEDATA, SOMEDATA);
INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10098,SOMEDATA, SOMEDATA);
[code]....
The third field in this SQL file is what needs to change to n+1
"10023" needs to change to "1"
"10098" needs to change to "2"
"10123" needs to change to "3"
"10983" needs to change to "4"
etc...
I tried with awk and sed, but since both require the usage of ' (single quote), my variable fails to get updated. I know i can use cut and recreate the sql statememnt, but i believe there should be easier way using sed or awk. Would anyone know of any creative way to get this to work in one-liner? This needs to be a part of the script preferable without making call to external file.
View 1 Replies
View Related
Sep 24, 2010
Code:
test=(1 2 3 4 5)
for car in ${test[@]}
do
echo "Element : $car"
[code]....
if variable $car equals 1, new element is added "6" to an array. But i don't know why when i am printing all elements of this array (echo "Element : $car") this element ("6") is not mentioned, but if i make a command which check an amount of contained elements by array it will be 6 elements.
View 14 Replies
View Related
Jul 20, 2011
I have a script which takes an array as an input to the file.ex: test.ksh -l <array_value>
Every time I dont get the same array name.EX: test.ksh -l x ; where x="a b"test.ksh -l y ; where y="c d"
I store the value I get in l in varaible myLvalue.Now indise my Script I want to run a for loop for thevalue I get in -l.If I write the for loop as below. I'm getting value x.However I'm expecting the loop to run for a and b.
View 5 Replies
View Related
May 15, 2010
I'm new to Java.
I'm trying to use some dynamically loaded classes in my application.
The application doesn't know those classes , Just it try to load a class by name that its name came from input.
It doesn't know class (So I can't use casting) but just needs to call some methods of that class (every class should have that methods).
I thought about interfaces but I don't know how.
How can I call those methods?
View 1 Replies
View Related
Jul 6, 2011
I would like to make gcc to link one lib (pthread in the example) statically, and the rest dynamically.
(See the example .c file at the end of this post.)
compiles fine, but every lib is linked dynamically.
Now every lib is linked statically
Not a dynamic executable
I would like to link the libpthread statically and the rest dynamically. Is it possible?
[url]says if I give the full path to the .a lib then it will be linked statically:
So for me it does not work.
On other sites I found that I should use -Wl,-Bstatic -lpthread -Wl,-Bdynamic, but it also doesn't work:
So, how can I do that?
Machine: Linux 2.6.16.60-0.27-bigsmp #1 SMP Mon Jul 28 13:06:32 UTC 2008 i686 i686 i386 GNU/Linux SLED 10
As an example I used a little demo program from [url]
Here is the code:
View 4 Replies
View Related
Apr 13, 2010
We are running Oracle 10.2.04 RAC on Red Hat Linux 5 and when ever our SAN storage admin created new LUNS we have to reboot the servers so that server can see newly created LUNS. This causing downtime to our application. How we can add LUNS dynamically without rebooting servers. We are using device mapper mulitpath from red hat version 0.4.7-30.el5 and we have QLOGIC HBA's.
View 1 Replies
View Related
Mar 13, 2009
Many people have multi-core cpus supporting frequency scaling now, if you want to see if the workload is being evenly distributed then add as many CPU Frequency Scaling Monitor applets to the Gnome panel as you have cores/cpus. Then right-click each one and select preferences and choose which cpu to monitor.
Now compile a large program or run a cpu intensive game and watch how the workload dances around between the two (hopefully)
Some clever apps like gnome chess will multi-thread and make max use of both cores, sadly many others won't.
View 9 Replies
View Related
Jan 26, 2011
I've got my laptop working with my UNI's rather complex wifi setup.
I need to get access to my wpa_supplicant file so i can use it with my nook and a few other devices that i need to get wifi access.
Network manager, i know, does all the wpa stuff dynamically and through scripts, so is there any way that i can get network manager to generate my wpa_supplicant config?
View 1 Replies
View Related
Dec 3, 2009
I am deciding to whether use OSPF or RIPv2 on my network. The key point for me is how good each of them are in dynamically adding and removing nodes. I am pretty sure that OSPF works well if a node is suddenly dropped or a new one is introduced( Please correct me if I am wrong). how good RIPv2 is at this.
View 1 Replies
View Related
Jul 27, 2010
If I do setenv DISPLAY other_machine:0 and launch a gui application I can send this application to my other_machine Is there any mean (utility or whatever) to send an OPEN application to another machine (by its pid eventually) So if I have an nedit open, and its pid is 13245, I could do something like send_to_display pid=13245 machine=other_machine:0
View 1 Replies
View Related
Aug 30, 2010
Libraries have always been ambiguous to me. I would love to have a clear understanding of them. Here's what I know so far... Ok I know that libraries are a bunch of functions and definitions in C that binaries use. I also understand that static libraries are used by the binaries in /sbin:/usr/sbin:/usr/local/sbin and dynamically linked libraries are used by the binaries in /bin:/usr/bin:/usr/local/bin So why have statically linked and dynamically linked libraries? I know that dynamically linked libraries are used to save space. Otherwise each binary would need its own private copy of a library. So dynamically libraries are used to save space.
1. Where are the static libraries and the dynamically linked libraries located in the file structure?
2. Where does ldconfig fit into all of this?
3. Would a rootkit affect both statically and dynamically linked libraries? I would think yes unless the libraries only have read permissions.
4. If the above is true, is there any reason for your libraries to have write permission other than when you want to edit them?
View 5 Replies
View Related
Mar 21, 2010
I have a Word document that I want to read from and format the text dynamically to send to another program. The document is about 12 pages long, and I need to preserve CR or EOL's, but the rest of the text will need be formatted according to variables such as characters per line and lines per page. I will need to read and print characters like %, ;, and : too.
View 5 Replies
View Related
Mar 5, 2010
I am trying to write an irc bot to run interactive fiction games in a channel. I am connecting to the channel using nc. I'm having a hell of a time trying to supply input stdin for nc after the connection is established. Here's what's going on. I've got lines of plain text in a file with the irc commands required to identify the bot's ID and join the channel. I can connect easily using any of the following commands
cat inputfile | nc irc.servername.org 6667 -i 1
nc irc.servername.org 6667 -i 1 < inputfile
Named_Pipe | nc irc.servername.org 6667 -i 1
cat inputfile > Named_Pipe
With the first two commands nc connects, reads the file with some time between each line allowing the irc server to respond, bringing me into the channel. It then begins to receive stdin from the command line allowing me to do things like "privmsg #channelname :Hello World!!!" sending messages to the room. This is not the desired behavior. I require nc to take additional stdin from the inputfile if I cat additional text to the end of it.
The last set of commands using the named pipe seem like it does the same, but it doesn't actually send anything to the room, which indicates to me that perhaps nc is continuing to take stdin from the named pipe (this is the desired behavior) rather than dropping to the console for stdin. If I try to cat more plain text data to the end of the named pipe, however, either with something like "echo 'privmsg #channelname :Hello World!!!' > Named_Pipe" (or >> instead of >) or with a filename in place of the "echo" command the whole command simply seems to hang until I press ctrl-C.
I don't understand what I'm doing wrong. With anonymous and named pipes, and with redirection, the problem seems to be the same. nc seems to take it's stdin from the file until it hits the end of file, at which point I can no longer introduce new lines of plain text as stdin for the running nc process.
View 4 Replies
View Related
Oct 19, 2009
I (my friend) have a fortran program with the code along the following lines:
Code:
SUBROUTINE NY
REAL, DIMENSION(4000,4000) :: a, b, c
...
RETURN
END SUBROUTINE PARAMETERS
The problem is that the huge matrices are retained in memory even after the subroutine ends. Is there an easy way to declare the arrays in a sort of dynamic way, like they were in the following C example?
Code:
void ny(void) {
double a[4000,4000];
...
}
I mean in the C example the memory is released as soon ny() exits.
View 5 Replies
View Related
Apr 28, 2010
I'd like to get path of one library to link it dynamically in my program. Probobly the best way would be to add macro to my configure.ac file.
View 2 Replies
View Related
Jul 9, 2011
how to dynamically create a list within a dictionary using Python.
Code:
dates = defaultdict(int)
array = []
...
dates[m.group(3)] = array.append(date)
dates[m.group(3)] = [array.append(date)]
dates[m.group(3)].append(date)
None of the above works and I've tried everything I can think of.
View 3 Replies
View Related
Aug 28, 2011
Is it possible to change the GNOME desktop background during some period of time by just a random phrase from the list on black screen? Will is seriously load the CPU and consume battery life?
View 1 Replies
View Related