08-24-2008
Auto X when Login
Hi All,
We have some HP unix servers and sometimes we logon there thru a dedicated Windows server that has Reflection X on it in case we need X. In this case we always need to export DISPLAY=winservername:0.0
I want to automate this thing in .profile file. If e.g. $TERM = hpterm (thru reflection X) then it should automatically export DISPLAY. (I found out that TERM=hpterm always indicates if we logon thru the windows server, because otherwise it is just set to "hp". So I can use this condition)
It's all OK, I can do that. But I came across an issue when e.g. I logon to the windows server as the first person and open a reflection X then DISPLAY should be sever:1.0
But when another chap comes thru this windows server and opens a reflection X session then he must export DISPLAY=winserver:2.0.
So it seems this number is increasing with any further parallel sessions get opened from the Windows machine.
Is there any way or UNIX command how I can find out what this number should be after the server? Then I can really automate this DISPLAY export and it would not only work for the first user who opens an X session.
So I need something like this:
if $TERM = "hpterm" then export DISPLAY=winserver:$n.0
and I need to know how $n can be determined for the given session.
Cheers
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Ok I've lost myself and hit a brick wall.
What I am trying to do is avoid the login screen when the machine is turned on. So no login screen is needed unless you turn the machine on and log out to login and change users. But as I said before I've hit a brick wall. I got not an idea of what I... (4 Replies)
Discussion started by: merlin
4 Replies
2. UNIX for Dummies Questions & Answers
Hey all,
I'm trying to configure a system so when it reboots it'll automatically log as a user I have selected. I've never done this nor' as I to sure on how to. This is teh best I have found on teh web and well I've changed a few things. but does anyone who has done this know if it'll work... (1 Reply)
Discussion started by: merlin
1 Replies
3. UNIX for Advanced & Expert Users
I am trying to bypass the login screen when the system boots and auto-login to open windows. I believe I need to modify the S99dtlogin but I don't know what to add/modify. Has anyone ever created an auto-login for Solaris 8? (1 Reply)
Discussion started by: nvanduyne
1 Replies
4. Solaris
I am trying to bypass the login screen when the system boots and auto-login to open windows. I believe I need to modify the S99dtlogin but I don't know what to add/modify. Has anyone ever created an auto-login for Solaris 8? (1 Reply)
Discussion started by: nvanduyne
1 Replies
5. Solaris
Hi All,
How do you get around SFTP not having the 'cat' command to set up scripts to run cron jobs for passwords?
I am use to the FTP allowing that, but we are converting to SFTP and need to be able to still run the same scripts in off hrs. Is there a way to still cat the password at the prompt... (14 Replies)
Discussion started by: wsiefkas
14 Replies
6. Shell Programming and Scripting
Hi,
I looked into lot of posts on this question but i could not figure out the solution. we are using the following ftp shell program to send the file to target server.
#!/usr/bin/ksh
ftp -n -i<<EOF 2>&1
open <target server ip>
user <username> <pwd>
lcd /sc/doc/prd/FCSTP
put file1.txt... (3 Replies)
Discussion started by: srrao.ch
3 Replies
7. Windows & DOS: Issues & Discussions
can any one help me for auto login bat file from windows to unix,to check the server daily..
Thanks
Mohan (1 Reply)
Discussion started by: mohankasi
1 Replies
8. Windows & DOS: Issues & Discussions
Hi,
i am trying to connect to unix server from windows bat file using telnet command. But bat file is unable to pass username and password hence could not login to UNIX.
My requirement is to connect UNIX server from .bat file and run few macros at a perticular schedule. My UNIX login does... (1 Reply)
Discussion started by: rahulbahulekar
1 Replies
9. SCO
OS: SCO Openr Server 6.0 MP4
HW: Dell R710 Server
When I try to login to the console, the login prompt keeps filling with *
even when I presss enter after the password prompt the login starts filling automatically with the multiple asterisks. This is happening on the console only and if I... (0 Replies)
Discussion started by: atish0
0 Replies
10. UNIX for Dummies Questions & Answers
Hello All ,
Requiremnt : i want to login to putty automatically and change the settings like i want , for ex : changing the "lines of scrollback" , " under colors , want to check to checkmark the option use system colors" . Like this i want to do .
I have a bash file created to login . But... (2 Replies)
Discussion started by: radha254
2 Replies
LEARN ABOUT DEBIAN
urxvtd
urxvt(1) RXVT-UNICODE urxvt(1)
NAME
urxvtd - urxvt terminal daemon
SYNOPSIS
urxvtd [-q|--quiet] [-o|--opendisplay] [-f|--fork] [-m|--mlock]
urxvtd -q -o -f # for .xsession use
DESCRIPTION
This manpage describes the urxvtd daemon, which is the same vt102 terminal emulator as urxvt, but runs as a daemon that can open multiple
terminal windows within the same process.
You can run it from your X startup scripts, for example, although it is not dependent on a working DISPLAY and, in fact, can open windows
on multiple X displays on the same time.
Advantages of running a urxvt daemon include faster creation time for terminal windows and a lot of saved memory.
The disadvantage is a possible impact on stability - if the main program crashes, all processes in the terminal windows are terminated. For
example, as there is no way to cleanly react to abnormal connection closes, "xkill" and server resets/restarts will kill the urxvtd
instance including all windows it has opened.
OPTIONS
urxvtd currently understands a few options only. Bundling of options is not yet supported.
-q, --quiet
Normally, urxvtd outputs the message "rxvt-unicode daemon listening on <path>" after binding to its control socket. This option will
suppress this message (errors and warnings will still be logged).
-o, --opendisplay
This forces urxvtd to open a connection to the current $DISPLAY and keep it open.
This is useful if you want to bind an instance of urxvtd to the lifetime of a specific display/server. If the server does a reset,
urxvtd will be killed automatically.
-f, --fork
This makes urxvtd fork after it has bound itself to its control socket.
-m, --mlock
This makes urxvtd call mlockall(2) on itself. This locks urxvtd in RAM and prevents it from being swapped out to disk, at the cost of
consuming a lot more memory on most operating systems.
Note: In order to use this feature, your system administrator must have set your user's RLIMIT_MEMLOCK to a size greater than or equal
to the size of the urxvtd binary (or to unlimited). See /etc/security/limits.conf.
Note 2: There is a known bug in glibc (possibly fixed in 2.8 and later versions) where calloc returns non-zeroed memory when mlockall
is in effect. If you experience crashes or other odd behaviour while using --mlock, try it without it.
EXAMPLES
This is a useful invocation of urxvtd in a .xsession-style script:
urxvtd -q -f -o
This waits till the control socket is available, opens the current display and forks into the background. When you log-out, the server is
reset and urxvtd is killed.
ENVIRONMENT
RXVT_SOCKET
Both urxvtc and urxvtd use the environment variable RXVT_SOCKET to create a listening socket and to contact the urxvtd, respectively.
If the variable is missing then $HOME/.urxvt/urxvtd-<nodename> is used.
DISPLAY
Only used when the "--opendisplay" option is specified. Must contain a valid X display name.
SEE ALSO
urxvt(7), urxvtc(1)
9.15 2012-01-21 urxvt(1)