Solved

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

Posted on 2010-09-15
13
1,844 Views
Last Modified: 2013-12-21
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
Comment
Question by:sunhux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 35

Accepted Solution

by:
torimar earned 500 total points
ID: 33687980
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
 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 33687994
Sorry, made a blunder above:
For virtual consoles, hit CTRL + ALT + F1 through F7, not simply CTRL plus the F key.
0
 

Author Comment

by:sunhux
ID: 33689000

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 33689072
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
 

Author Comment

by:sunhux
ID: 33699810

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
 

Author Comment

by:sunhux
ID: 33703424

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
 
LVL 35

Expert Comment

by:torimar
ID: 33703513
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
 
LVL 35

Expert Comment

by:torimar
ID: 33703565
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
 
LVL 35

Assisted Solution

by:torimar
torimar earned 500 total points
ID: 33703638
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
 

Author Comment

by:sunhux
ID: 33713765


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
 

Author Comment

by:sunhux
ID: 33714865

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
 
LVL 35

Expert Comment

by:torimar
ID: 33722421
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
 

Assisted Solution

by:sunhux
sunhux earned 0 total points
ID: 33726102

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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux SFTP 8 80
Advice on ESXi 5.1 Health / Storage 1 47
Nee dhelp identifying the OS and how to access 7 43
DB2 9.7 Grant Execute SP 4 16
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question