ок. Только я не могу разобраться в этом скрипте... Вот например у меня в домашней папке лежит папка postal2, а в ней файл postal2 - собственно вопрос - как должен выглядеть скрипт?
Пользователь решил продолжить мысль 23 Августа 2009, 22:01:01:
Попробовал так:
svinopapa@hrundel:~$ cat ~/.config/bin/postal.sh ~/postal2/./postal2
Выдало так:
cat: /home/svinopapa/.config/bin/postal.sh: No such file or directory
#!/bin/sh
#
# postal2 startup script
#
# Function to find the real directory a program resides in.
# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
FindPath()
{
fullpath="`echo $1 | grep /`"
if [ "$fullpath" = "" ]; then
oIFS="$IFS"
IFS=:
for path in $PATH
do if [ -x "$path/$1" ]; then
if [ "$path" = "" ]; then
path="."
fi
fullpath="$path/$1"
break
fi
done
IFS="$oIFS"
fi
if [ "$fullpath" = "" ]; then
fullpath="$1"
fi
# Is the sed/ls magic portable?
if [ -L "$fullpath" ]; then
#fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/*//'`
fi
dirname $fullpath
}
# Set the home if not already set.
if [ "${POSTAL2_DATA_PATH}" = "" ]; then
POSTAL2_DATA_PATH="`FindPath $0`/System"
fi
LD_LIBRARY_PATH=.:${POSTAL2_DATA_PATH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
# Let's boogie!
if [ -x "${POSTAL2_DATA_PATH}/postal2-bin" ]
then
cd "${POSTAL2_DATA_PATH}/"
exec "./postal2-bin" $*
fi
echo "Couldn't run Postal2: Share the Pain (postal2-bin). Is POSTAL2_DATA_PATH set?"
exit 1
# end of postal2 ...
После попробовал:
svinopapa@hrundel:~$ sudo startx ~/.config/bin/postal.sh -- :1
Вроде запустил - и сразу вышел, а выдал следующее:
X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-23-server i686 Ubuntu
Current Operating System: Linux hrundel 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686
Build Date: 09 April 2009 02:10:02AM
xorg-server 2:1.6.0-0ubuntu14 (buildd@rothera.buildd)
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sun Aug 23 22:57:42 2009
(==) Using config file: "/etc/X11/xorg.conf"
xinit: No such file or directory (errno 2): no program named "/home/svinopapa/.config/bin/postal.sh" in PATH
Specify a program on the command line or make sure that /usr/bin
is in your path.
waiting for X server to shut down ddxSigGiveUp: Closing log
Пользователь решил продолжить мысль 24 Августа 2009, 23:57:10:
Проблема решилась отключением эффектов рабочего стола