- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Backgrounding emacs
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
11-16-2001 06:23 AM
11-16-2001 06:23 AM
Backgrounding emacs
I know that HP-UX console grabs the foreground process, so how do I background a job, for example emacs or xemacs so I can call it something like xemacs -i& and get an iconifiable window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:27 AM
11-16-2001 06:27 AM
Re: Backgrounding emacs
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:30 AM
11-16-2001 06:30 AM
Re: Backgrounding emacs
if you are able to use CDE on the console(graphical), then you should be able to
background emacs, like any other process.
Some more info on what sort of console, the type of system (workstation? or servertype)
would help in suggesting solutions.
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2001 06:51 AM
11-16-2001 06:51 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2001 02:42 PM
11-17-2001 02:42 PM
Re: Backgrounding emacs
make sure your $DISPLAY is set where you start the "emacs".
If you start your session with the CDE-login screen it is set automatically, but if you use the (silly - my private opinion) way of the "TELNET" client startup, then it is NOT set properly, so the programs try to start using the STDIN, and when they try to read from there, they are frozen until they are move to the "foreground" - which can never happen that way...
Just my ???0.02,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 04:11 AM
11-18-2001 04:11 AM
Re: Backgrounding emacs
do #echo $DISPLAY
to check your display settings from the window you are trying to run emacs. If the DISPLAY is set to the system hostname , it should work fine, otherwise you can set it as:
HOSTNAME='hostname'
DISPLAY=$HOSTNAME:0.0
export HOSTNAME DISPLAY
If your exceed session is running from a PC on the network, then you would need to set the DISPLAY to the IP address of the PC.
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 02:52 AM
11-19-2001 02:52 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 08:20 AM
11-19-2001 08:20 AM
Re: Backgrounding emacs
it seems we do not understand what your problem is... So, please tell us what you mean with "grab" and "console".
Perhaps by listing the steps/commands you tried, and their output/behaviour.
Curious,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 08:34 AM
11-19-2001 08:34 AM
Re: Backgrounding emacs
extensions to emacs for languages etc that's why I was trying. It's not a
big deal, if there is another editor you do support for provides text
highlighting, colouring, syntax checking etc that includes Java support then
I can try that.
This is a general kind of question however, because I ran into equal
problems running dynamo, with that though, as there is command line output,
by using nohup I can avoid the problem.
As a general question though, I have tried cshell, bourne shell and no joy
but I just worked out where the problem is, although not specifically why.
I enabled the dt logging, and see this:
Stty: : Not a typewriter (repeats 3 times)
/usr/bin/ksh: a: unknown test operator
and the .profile has 3 lines
stty erase '^h'
stty intr '^c'
stty kill '^u'
which cause the first error, (yes the ticks are right, it's just outlook
trying to be clever), and the next line that the test fails on (my guess
anyway) is:
if [ ! "$DT" -a 'tty' !- "/dev/console" ]
this shell was copied from Solaris, as it appears to work I assumed it was
fine, but now I guess it does have some problem. I can send the
.kshrc/.profile and .dtprofile to avoid outlook weirdness.
ps I know because it's landed at my door :( any help appreciated still by both Kevin or I ... I'm still looking into it ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 08:44 AM
11-19-2001 08:44 AM
Re: Backgrounding emacs
*LOL* That's a seamless merging of ITRC forum posts and the support centre functions ;-)
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 08:53 AM
11-19-2001 08:53 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2001 12:00 PM
11-19-2001 12:00 PM
Re: Backgrounding emacs
who's "Kevin"??? :-)
Well, first, you still haven't answered my questions :-( but I'll give it another shot, anyway:
1) that line is wrong:
*** if [ ! "$DT" -a 'tty' !- "/dev/console" ]
as there is no operator "!-" - I guess it should read "!=", right?
2) since that would not freeze good ol' emacs ("Escape Meta Alternate Control Shift" or "Eight Megabytes And Constantly Swapping" as we called in the dark ages of UN*X), there must be some shell command-line started, which in turn tries to start the X-client, and, of course, is frozen when trying to read from SDTIN...
So, please tell us ALL the scripts/commands used to start that emacs, from the X-Windows startup scripts of the session, over the profile-scripts, to the Window-Manager scripts, which may be involved.
Just my ???0.02,
Wodisch
PS: Kevin - home alone??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 04:03 AM
11-20-2001 04:03 AM
Re: Backgrounding emacs
OK, I've been in contact with Alex, he was having a bad hair day, must have confused me with some other Kevin! There is no Kevin, just Neil.
Anyway, the problem occurs with ksh, csh, bash and sh, but but csh/sh and bash are just defaults I don't have any extra scripts for those. The !- is !=. it was a typo on my behalf.
The only command used to start emacs is "emacs -i&" or just emacs& I tried xemacs on another HP, but the same problem. I think there is something simple in my configuration which is stopping the command line. I've included my .kshrc and .profile, the .dtprofile is unchanged except uncommenting DTSOURCEPROFILE to enable the shell initialisation. I've also attached the .dt/errorlog, it definitely does not like the stty erase '^H' lines, and the first test (if [ ! "$DT" ....), it's just called kshrc but all three are attached.
The X-Windows, exceed parts are just standard as far as I know. I'm using v6.2.0.0 of exceed, use the XDMCP to connect as a user to the HP, login as a regular user with CDE. I can give other versions etc as needed. The machine is running HP-UX 11.00. Emacs is v20.7
I'm going to create another user and see if I have a problem with that without the extra korn shell stuff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2001 08:31 AM
11-20-2001 08:31 AM
Re: Backgrounding emacs
OK here's what I've found : hpux 11.00 / H/W B180L
installed emacs 20.7, created new user with ksh as login shell
cd /opt/emacs/bin and run either emacs -i& or emacs-20.7 -i & works, I get an iconifiable
window with a gnu's head in it, running emacs without the -i option with or without an & also
works ie I still get an iconifiable window but it has no gnu's head.
Conclusion : patch levels, exceed or user customisation are playing a part here.
Advise : I can when I get time check the behaviour of the Exceed client out for you tomorrow.
I can use your .profile and kshrc files too but suggest you try creating a new user
with minimum customisation to their kshrc and .profiles and also detail the patch level
of this system as previously requested and any new results which occur from these actions.
More tomorrow.
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 12:41 AM
11-21-2001 12:41 AM
Re: Backgrounding emacs
Alex suggested that the file should contain:
dtspc allow
spc allow
mserve allow
Is this all the file should contain? I searched 4 HP's here and none have this file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 01:08 AM
11-21-2001 01:08 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 01:12 AM
11-21-2001 01:12 AM
Re: Backgrounding emacs
with a ksh user logged into CDE using your .profile and kshrc file .... not much
left other than patches or something you haven't told me ;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 01:21 AM
11-21-2001 01:21 AM
Re: Backgrounding emacs
the Dtlogin*Grabserver commented out. Should I create a copy in /etc/dt/config and uncomment this line?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 01:24 AM
11-21-2001 01:24 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 02:10 AM
11-21-2001 02:10 AM
Re: Backgrounding emacs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 07:45 AM
11-21-2001 07:45 AM
Re: Backgrounding emacs
sigh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 08:24 AM
11-21-2001 08:24 AM
Re: Backgrounding emacs
The problem with jpeg was I had the wrong one. So now I've installed my emacs-21.1 binary version, ran it, and voila, I've finally got it to work!
There is some warning about a missed lisp library but I can work on that.
Now why was I doing all this again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2001 09:03 AM
11-27-2001 09:03 AM
Re: Backgrounding emacs
One of our unix gurus emailed me this:
susp in stty does tsusp signal generation, same thing. So it does look
good from here. Next thing to look at is whether or not the shell is
properly setting up process groups and, particularly, the pgrp of the tty.
I don't know an easy way to check the pgrp of the tty other than writing a
program (BSD sps does it, but it's unlikely you have that program). Now,
just about everything except the old old /bin/sh does that right (and
/bin/sh is just /bin/ksh in HP/UX if I remember right so even that should
work) ... if it can. But there is a case in which it can't.
It's particularly likely that the pgrp stuff is wrong since posix has some
whacked limitations on who can set the tty pgrp. In BSD (where process
groups evolved) any process with access to the tty could set the pgrp. In
posix they changed it so only a process in the same tty session could
change it. If the tty session isn't properly set up then the shell can't
change the pgrp of the tty and signal generation will fail just like you're
seeing. The job of setting that up falls to the terminal program, so if
you're seeing it with one terminal program and not another that could
explain it.
This is typically verifiable with some simple code:
int main()
{
int sid = getsid();
int ppgrp = getpgrp(getppid());
int pgrp = getpgrp();
int tty_pgrp = tcgetpgrp();
/* look to see if parent process is session root */
if (ppgrp != sid) {
printf ("shell pgrp is not the same as session ID\n");
printf ("sid = %d\n", sid);
printf ("ppgrp = %d\n", ppgrp);
}
else
printf ("shell pgrp looks OK\n");
/* look to see if this pid is is in foreground pid on the tty */
if (pgrp != tty_pgrp)
printf ("process isn't the foreground process(expected pgrp %d, got %d)\n", pgrp, tty_pgrp);
else
printf ("tty pgrp looks ok\n");
}
>Ok, got this:
>
>shell pgrp is not the same as session ID
>sid = -1
>ppgrp = 19387
>process isn't the foreground process(expected pgrp 19387, got -1)
Well, that means it's totally broken -- nobody set the session ID when the
pty was set up, and if it's not set then the shell can't do the tty
foreground process configuration and if that's not done then tty-generated
signals don't work (which is what you're seeing).
The only way this happens is if the terminal program neglected to do it or
failed in the attempt. The latter is fairly likely, actually, since a lot
of terminal programs got their start on BSD-derived systems. Those
programs would work under Solaris but will not work under a purer POSIX
system like HP/UX.
My first suggestion would be to try a different terminal program. Failing
that there's a kind of bootstrap way to do it (have the shell exec a
program that sets things up correctly, then have the program re-exec the
shell) but I've not done it in a loooong time, and it varies by OS and even
version of OS, so I can't do that off the top of my head.
so maybe someone here has a better idea of why I am getting these results, and better yet, how to fix them?