First, be aware that I'm running a Fedora 25 system, so this may not be a real problem.
Anyhow, the
google-chrome.desktop file in in the
/usr/lib/applications/ directory, and is displayed on the menus of most of the other desktop environments (e.g., Mate, LXQT, ...).
When started from a terminal, it seems to work with no problems. (In fact, I'm typing this query using Chrome started in that way.)
I
assumed that the problem was because several of the GNOME
.menu files list google-chrome in the <exclude>...</exclude> sections, editing those file to remove references to "google-chrome" did not make the application appear on the menu.
I also tried remodeling the
google-chrome.desktop file so it looked more like the
Midori.desktop file, since the GNOME documentation talks about their "modifications" to the XDG_Desktop standard. That only resulted in the Midori application no longer being displayed. (I assume that I inadvertantly saved a messed-up copy while I was editing the Chrome .desktop file.)
So, my questions:
- Has anyone seen this problem on other Fedora releases?
- Are there other .desktop file that are not available from the "Activities" action of GNOME?
- If you've had a similar problem, have you solved it?
If you're interested, here's a
bash script I wrote that I use to start detached commands from a terminal window. (I needed this because I find the
KDE desktop much easier to use then the
GNOME one, and, for some -- as yet undetermined -- reason, the
KDM works, but the shell crashes when
plasmashell is started. So, if I want to use
KDM, I have to work mostly from terminal windows.)
Code:
$ cat ~/bin/Init
#!/bin/bash
help()
{
local i name lc
lc=${1,,?}
name=$(basename ${0})
if ( [ -z "${1}" ] || [[ "${lc}" =~ ^-+h ]] )
then
cat <<EOF >&1
${name}: Run a command, detached, supressing all terminal output.
Usage: ${name} command [arguments ...]
Special command values:
-h|--help Print this message to stderr and exit
-s|--setup[=n[oauto]] Run the set of predetrmined commands.
-r|--run= n1 n2 ... Run the pre-defined command <n> (See --list.)
-l|--list List pre-defined commands
-a|--auto List any command(s) automatically run
after the --setup command(s) are started.
unless the "noauto" optiom of "--setup" is used.
EOF
exit 0
fi
#elif
if [[ "${lc}" =~ ^-+l ]]
then
for (( i=1; i<=${#CMD[@]}; ++i ))
do
echo " $i = ${CMD[$i]}" >&1
done
echo "" >&1
exit 0
fi
#elif
if [[ "${lc}" =~ ^-+a ]]
then
for (( i=1; i<=${#AUTO[@]}; ++i ))
do
echo " ${AUTO[$i]}" >&1
done
echo "" >&1
exit 0
fi
#else return
}
# Function to run a command in as a detached process
dispatch()
{
echo -n '"'${1}'"' >&1
if ( [ -n "${*}" ] && [ -n "$(type ${1})" ] )
then
"$*" &>/dev/null &
job=$!
disown
echo " started as process #${job}" >&1
else
echo " does not appear to be a valid command." >&1
fi
}
#
# Main program
#
# Initialize CMD and AUTO
CMD=( [1]="konsole" [2]="google-chrome" [3]="gkrellm" )
AUTO=( [1]="Update --refresh" )
# Do we have any help arguments?
help "${*}"
# Convert the first argument to lowercase
lc=${1,,?}
# Do we have the "--setup" option?
if [[ "${lc}" =~ ^-+s ]]
then
# dispatch all the commands in the CMD array
for (( i=1; i<=${#CMD[@]}; ++i ))
do
dispatch ${CMD[${i}]}
done
# If the "noauto" option is not used, dispatch all commands in the AUTO array
if ![[ "${*,,}" =~ ^-+s.*=?[[:space:]]*n ]]
then
for (( i=1; i<= ${#AUTO[@]}; ++i ))
do
dispatch ${AUTO[${i}]}
done
fi
exit 0
fi
#
# Not an "--setup" command. Is it a --run command?
if [[ "${lc}" =~ ^-+r ]]
then
# Set the initial number of arguments to consume to 2
j=2
# The user may wik to start a subset of the available commands
# so we need to support "--run 1 3", etc.
while [ $# -gt 0 ]
do
cmd=${CMD[${!j}]}
if [[ -z "${cmd}" ]]
then
echo "\"${!j}\" is not a valid command number."
help "-l"
fi
# Get rid of the processed arguments
shift $j
# and reduce the number of arguments to 1
j=1
dispatch "${cmd}"
done
exit 0
fi
# If we get here, then assume that ${@} is a (single) command to be dispatched
dispatch ${@}