Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2076
  • Last Modified:

Redhat Linux GNOME prompts to "Run in Terminal" & missing task bar

I've copied a Shell script to /root/Desktop/   folder to create a
shortcut icon on the GNOME desktop

Whenever I double-left-click this shortcut on the RHES 4.x GUI's
desktop, it would pop up a prompt with four options :
1) Run from a Terminal
2) ... can't recall this option ...
3) Cancel
4) Run  (ie just "Run" only)

Q1:
How can I disable this prompt such that it will always take the
first option ie (Run from a Terminal) ?

Q2:
Also, after exiting the GNOME GUI (pressed Alt-F4) & relaunch
the GNOME (ie enter "startx" at the text-based console), the
task bars on the top & bottom are not there anymore.  How can
I restore those task bars?
0
sunhux
Asked:
sunhux
  • 7
  • 6
5 Solutions
 
torimarCommented:
Q1:
By copying the file to your /Desktop folder you did not create a shortcut, you simply created another instance of the script inside your desktop folder. When clicked, it will react just like when you click the script in Nautilus.
To create a shortcut instead, right-click anywhere inside your desktop screen, select 'Create launcher', and chose Type: 'Application in terminal'. Fill in details and hit 'OK'.

Q2:
Whatever you did with ALT+F4 (it usually just closes a window like on MS Windows), you certainly did not terminate the X-server. The best (although somewhat brutal) way to terminate X is via CTRL + ALT + BACKSPACE. You will then be able to restart X with 'startx' and should see your normal desktop.
For most cases you will not need to end X though. If you just wish to work in a fullscreen console window, simply hit CTRL + F1 or CTRL + F2 etc. through to CTRL + F6. This will create virtual terminals to use simultaneously. Hit CTRL + F7 to return to the Gnome GUI.

ps:
It's not really in accordance with the Experts-Exchange terms of use to ask two questions in one.
0
 
torimarCommented:
Sorry, made a blunder above:
For virtual consoles, hit CTRL + ALT + F1 through F7, not simply CTRL plus the F key.
0
 
sunhuxAuthor Commented:

I've tried "Create Launcher" earlier by the shortcut icons simply did not show
up on the GNOME Desktop - do I need to restart the GUI (ie startx) ?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
torimarCommented:
No, you do not have to restart the window manager - you actually hardly ever have to do that.
You must have made an error while creating that launcher; could you maybe post a screenshot with the 'Create launcher' dialogue window and your input?
0
 
sunhuxAuthor Commented:

Attached a screen shot showing the properties of the Launcher icon (this is only visible after
I restart  startx  ) :

I just found I have to specify the full path of the script ie  /root/Desktop/script_name :

launchprop.png
launch1.png
0
 
sunhuxAuthor Commented:

I exited the GNOME desktop & restart it ( ie 'startx") & now I got a Desktop that shows a completely
blank screen.  Ctrl-Alt-Del did not pop up a screen with the options "Logoff,  Reboot,  Cancel"
anymore.  Any idea?

If I can ssh into this RHES 4.x server, which process can I kill to kill/reset this "hung" GNOME GUI?

So beside the earlier issue of Launchers created are not shown on Desktop till the GNOME GUI
is restarted, now I got another problem.
0
 
torimarCommented:
Yes, you have to specify the full path.

In 'Create Launcher', give the launcher a Name, like: "myscript" or "run myscript", select the 'Browse' button and browse to the location of the script, then place a check mark inside 'Run in terminal'; also check the 'Type' dropdown: is there a type 'Application in terminal' or the like? If so, select it. Then press 'Ok'.

The launcher should appear immediately.

Note:
This is to create links to applications and scripts. You want to point it to the _original_ location of your script. There is no need to copy the script to the /Desktop folder. Whatever is in that folder will appear on the desktop automatically, so you would have your script plus a launcher of your script on the desktop - which is unnecessary and confusing.
0
 
torimarCommented:
Gnome is a stable desktop environment. There is absolutely no need to keep killing and restarting it. The only situation where this might ever be necessary is when you install new drivers for your graphics card which should be done when X is not running. Other than that, I see no reason to kill X.
You can work outside of X by using a virtual console as I described above.

You may also use a console to reboot your system without GUI.
Press CTRL+ALT+F2, login as root, and type:
shutdown -r now
0
 
torimarCommented:
To terminate a hung X on the terminal, either remotely via ssh or locally on a virtual console, you need to type the command:

killall -9 X
0
 
sunhuxAuthor Commented:


Ok, I've done "killall -9 X" & relaunch the GHOME again  but the GHOME just hanged there.
Is there something or a variable like DISPLAY which I need to set:

AGENTWORKS_DIR=/opt/CA/SharedComponents/ccs/atech
BASH=1
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="00" [2]="15" [3]="1" [4]="release" [5]="i686-redhat-linux-gnu")
BASH_VERSION='3.00.15(1)-release'
CAAWK=
CABIN=/opt/CA/SharedComponents/bin
CACSUTILS_setu=
CAIGLBL0000=/opt/CA/SharedComponents/ccs
CAI_MSQ=/opt/CA/SharedComponents/ccs/cam
CALIB=/opt/CA/SharedComponents/lib
CANOLOG_flag=
CANSM=/opt/CA/UnicenterNSM
CASHCOMP=/opt/CA/SharedComponents
CASP_BIN_PATH=/opt/CA/UnicenterNSM/bin
CASP_DATA=/opt/CA/UnicenterNSM/perfdata
CASP_LIB_PATH=/opt/CA/UnicenterNSM/lib
CASP_PATH=/opt/CA/UnicenterNSM
CA_CAILANGUAGE=enu
CA_DIA_HOME=/opt/CA/SharedComponents/ccs
CA_DIA_JREPATH=/opt/CA/SharedComponents/JRE/1.4.2_09
CA_LOCALE=enu
CA_SECTION=all
CLASSPATH=/opt/CA/SharedComponents/JRE/1.4.2_09/lib/tools.jar:
COLORS=/etc/DIR_COLORS
COLUMNS=80
CSAM_SOCKADAPTER=/opt/CA/SharedComponents/Csam/SockAdapter
DIRSTACK=()
DSA_ARCH=LINUX
EUID=0
GROUPS=()
G_BROKEN_FILENAMES=1
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=ssspabc1
HOSTTYPE=i686
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/opt/CA/SharedComponents/JRE/1.4.2_09
KDEDIR=/usr
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/opt/CA/UnicenterNSM/lib:/opt/CA/SharedComponents/JRE/1.4.2_09/lib/i386/client:/opt/CA/SharedComponents/JRE/1.4.2_09/lib/i386:/opt/CA/SharedComponents/ccs/dia/dna/lib:/opt/CA/SharedComponents/ccs/dia/lib:/opt/CA/SharedComponents/JRE/1.4.2_09/lib:/usr/lib:/opt/CA/CAlib:/opt/CA/SharedComponents/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=25
LOGNAME=root
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'
MACHTYPE=i686-redhat-linux-gnu
MAIL=/var/spool/mail/root
MAILCHECK=60
OLDPWD=/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/opt/CA/SharedComponents/JRE/1.4.2_09/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/CA/SharedComponents/bin:/opt/CA/SharedComponents/ccs/atech/services/bin:/opt/CA/SharedComponents/ccs/atech/agents/bin:/opt/CA/SharedComponents/ccs/cam/bin:/opt/CA/UnicenterNSM/nsmutils/bin:/opt/CA/UnicenterNSM/bin:/root/bin
PIPESTATUS=([0]="0" [1]="0")
PPID=22027
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '
PWD=/var/tmp
SETU=0
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:interactive-comments:monitor
SHLVL=1
SPDAGROUP=root
SPDAUSER=root
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SUPPORTED=en_SG.UTF-8:en_SG:en:en_US.UTF-8:en_US:en
SYSPERF_GROUP=root
SYSPERF_USER=root
SYSTYPE=Linux
TERM=linux
TMOUT=900
UID=0
USER=root
_=
env_var=/opt/CA/UnicenterNSM/lib
os=Linux
setu=0
0
 
sunhuxAuthor Commented:

I've also tried to define DISPLAY variable to "localhost:0.0" & remove all the /tmp/.X*  files (that
coincide with the timings I tried to do startx but no luck as startx still hangs there).  The
/var/log/messages  log attached:


I can't reboot this server
msgs2.txt
0
 
torimarCommented:
If there are lock files then this means that there is another X process still running in the background. You may remove the lock files, then 'startx' will execute, but the other X process will still be there and X will not work properly. By now, you may have several processes half running that all impede each other. In fact, if what you did since posting this question was all done without a reboot, your system must be in some real mess by now.

The best remedy by far would be a reboot.

If that is impossible the only way is to try and clear it all out manually. Run:
ps -e | grep X

This will show all the X related processes running. Then do this again:

killall -9 X

Run the above 'ps' command again to verify that they are all gone. Then don't run 'startx' but run:

ps -e | more

Examine all processes for remnants of 'gnome' or 'gm'. Write down their PIDs. Then do a:

kill -9 pid

for each of them. Run 'ps-e' again and post the output here.
0
 
sunhuxAuthor Commented:

Yes, "ps -ef |grep gn" showed there's still a gnome process so I've killed it.

Besides, all the /tmp/.X  has to be removed too & that's it
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now