Sponsored Content
Full Discussion: How to start X window?
Operating Systems HP-UX How to start X window? Post 302585567 by ethandaddy on Wednesday 28th of December 2011 08:30:33 PM
Old 12-28-2011
I can not find /log directory in /var.

used code " shutdown -h -now " to shutdown the station. when we power on it,the station failed to power on. we found that Graphic card was llittle bit loose from the slot. put graphic card okay, and the station can power on,but the X window can't start anymore.

I found S990dtlogin.rc in /sbin/rc3.d

---------- Post updated at 08:30 PM ---------- Previous update was at 08:14 PM ----------
Code:
more S990dtlogin.rc
 
 
#!/sbin/sh
# $XConsortium: dtlogin.rc.src /main/1 1996/07/24 11:40:29 drk $
#
# This version of the dtlogin.rc script can be used on the HP-UX
# operating system to initiate 1DE tasks such as starting the dtlogin
# process.
#
#  Common Desktop Environment
#
#  (c) Copyright 1996 Digital Equipment Corporation.
#  (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
#  (c) Copyright 1993-1994,1996 International Business Machines Corp.
#  (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
#  (c) Copyright 1993-1994,1996 Novell, Inc.
#  (c) Copyright 1996 FUJITSU LIMITED.
#  (c) Copyright 1996 Hitachi.
#
# When placed in the /sbin/rc3.d directory and named appropriately, such as
# "S990dtlogin", this script will automatically start the dtlogin window
# after the HP-UX system boots to its multi-user level.
#
# This script is also called indirectly by the CDE dtconfig command.
PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
export PATH
mode=$1
case "$mode" in
    'start_msg')
 echo "Start CDE login server"
 exit 0
 ;;
    'stop_msg')
 echo "Stop CDE login server"
 exit 0
 ;;
esac

usage_error() {
    echo "  $0 start             (start dtlogin process)"
    echo "  $0 stop              (stop dtlogin process)"
    echo "  $0 reset             (reset dtlogin process)"
    echo "  $0 update_printers   (update print actions)"
    echo " "
}
if [ ! -d /usr/bin ]; then  # /usr not mounted
    exit 1
fi
set `id`
if [ $1 != "uid=0(root)" ]; then
    echo "$0: must be run as root"
    exit 1
fi
# update_printers()
#
# Add print actions to workstation's database for all printers known
# to this workstation if action is not already present in the database.
update_printers() {
    if [ -x /usr/dt/bin/dtprintinfo ]; then
 /usr/dt/bin/dtprintinfo -populate
    fi
}
#
# Find login server pid from the process tree
#
login_server_pid() {
# In following grep for "dtlogin" processes, explictly exclude any matches
# on this shell file named "dtlogin.rc"

# 83
#
# Use the new XPG4 features of "ps" (also "-C cmdlist" ) to get the pids.
#
    UNIX95=1 ps -C dtlogin -o pid= -o ppid= |
    while read pid ppid; do
 if [ "$(ps -p $ppid | grep dtlogin)" = "" ]; then
     print "$pid"
     break
 fi
    done
}
case "$mode" in
    'start')
 if [ -f /etc/rc.config ]; then
     . /etc/rc.config
 else
     echo "ERROR: /etc/rc.config defaults file MISSING"
 fi
 if [ "CDE" != "${DESKTOP:-}" ]; then
     exit 2
 fi
 update_printers
 if [ -x /usr/dt/bin/dtrc ]; then
     trap "" 1
     /usr/dt/bin/dtrc &
 elif [ -x /usr/dt/bin/dtlogin ]; then
     /usr/dt/bin/dtlogin -daemon
 fi
 ;;
    'stop')
#       get dtlogin pid
 dtlogin_pid=`login_server_pid`
#       kill dtlogin process
        if [ "$dtlogin_pid" != "" ] ; then
             kill $dtlogin_pid
 fi
 ;;
    'reset')
#       get dtlogin pid
        dtlogin_pid=`login_server_pid`
#       reset dtlogin process
        if [ "$dtlogin_pid" != "" ] ; then
             kill -HUP $dtlogin_pid
        fi
 ;;
    'update_printers')
 update_printers
 ;;
    *)
 usage_error
 exit 1
 ;;
esac
exit 0

is this the scrip of start X????

Last edited by Scott; 12-31-2011 at 11:36 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies

2. Windows & DOS: Issues & Discussions

window 2000 professional not pinging my window 98 system.

Hello, We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies

3. HP-UX

how to start the x window system

hi, am new to hp-ux, i just bought an hp-ux with the hp-ux 11.0 os, is very old, and i wnat to start the x window system but it send an error that said that couldn't open the x server, i try startx, xinit, and nothing, and also where i can find tutorials for hp-ux os for beginners (7 Replies)
Discussion started by: nobody
7 Replies

4. Linux

where to put an application if i want to start it on start up

hi i want to know the way by which i put any file somewhere and it get s started when the system restarts or bots i mean whenever my system starts that application must also start thanks (3 Replies)
Discussion started by: shukla_chanchal
3 Replies

5. AIX

Q: how to start a service when system start

As topic, assume we have a service called "blahservice" and we can start it by: startsrc -s blahservice what is the best practice to run such command when system start? - directly use mkitab to add it into /etc/inittab or - drop startup scripts in /etc/rc.d/rcX.d I know they... (4 Replies)
Discussion started by: acerlinux
4 Replies

6. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

7. Red Hat

Maximizing X window without Window Switcher

Hi everyone! I have a strange situation. I'm running an NX remote Gnome desktop session. On the remote machine, there is a whole load of unsaved data in a window. A problem that I've been having with this NX session is that I can't load Gnome Applets, including the Window Switcher. So.. when I... (0 Replies)
Discussion started by: alexandicity
0 Replies

8. IP Networking

TCP initial congestion window (slow-start)

I have noticed that the initial congestion window in my traces is 8920bytes~=6*1448. rfc3390 states the initial cwand should be max 4000 bytes(around 3*1448). At first i thought it might be because i'm running my server on mac os x, so apple might have modified the tcp stack. Therefore I tried... (2 Replies)
Discussion started by: ddayan
2 Replies

9. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

10. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy