Error with using Launcher

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
kate
Level 1
Level 1
Posts: 29
Joined: Mon Jul 27, 2009 7:40 pm

Error with using Launcher

Post by kate »

Ok, so I use the following code:

LD_PRELOAD=/usr/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so /usr/games/smac/smac.dynamic

to launch SMAC (Sid Meier's Alpha Centauri) on my computer.
I wanted to create a Launcher, so I put that code in the command, but when I double click the Launcher afterward, I get this error:

There was an error launching the application.
Details: Failed to execute child process "LD_PRELOAD=/usr/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so" (No such file or directory)

So I thought Oh, ok maybe I just need the /usr/games/smac/smac.dynamic and removed the rest and nothing happened. Doing that in the command line gave a seg fault.

What is my problem?
Thanks.
David Hunter
Level 3
Level 3
Posts: 131
Joined: Sat Sep 26, 2009 9:03 am
Location: Melbourne, Australia
Contact:

Re: Error with using Launcher

Post by David Hunter »

I had this issue trying to put a launcher on my panel.
To fix it, I just found the one I wanted from the menu, and dragged and dropped, rather than manually creating a new launcher.
Is there a shortcut in the menu for you to do this?

Have you got SMAC to work previously? If so, what command do you run to launch it?
Image
Thanks beyecixramd!
Husse wrote:Actually I've never broken a Linux I have managed to install - but there are a few I never managed to install :)
David Hunter
Level 3
Level 3
Posts: 131
Joined: Sat Sep 26, 2009 9:03 am
Location: Melbourne, Australia
Contact:

Re: Error with using Launcher

Post by David Hunter »

Hi kate,

Did my suggestion help solve your issue?
Image
Thanks beyecixramd!
Husse wrote:Actually I've never broken a Linux I have managed to install - but there are a few I never managed to install :)
User avatar
DrHu
Level 17
Level 17
Posts: 7522
Joined: Wed Jun 17, 2009 8:20 pm

Re: Error with using Launcher

Post by DrHu »

With that size of command, most people are likely to suggest putting it into a script, that you run from the launcher..
http://ubuntuforums.org/archive/index.p ... 06578.html

Code: Select all

#!/bin/sh
# A simple shell script to launch SMAC on a modern Linux distribution

SCRIPTLOC=$0
DIRNAME=""

# Step through symlinks to find where the script really is
while [ -L $SCRIPTLOC ]; do
SCRIPTLOC=`readlink $SCRIPTLOC`
done
# Get the directory the script is in, then change to it
DIRNAME=`dirname $SCRIPTLOC`
cd $DIRNAME
# Run the game
LD_PRELOAD=../Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib32/libX11.so ./smac.dynamic 
Again, keep in mind you may need to change the last command slightly if you're on a 32-bit system, or if you installed the Loki_Compat libraries somewhere different.

http://lordhedgehog.hedgie.com/smac/
  • I suggest creating scripts, aliases, or menu items to avoid typing these each time:
    To start Alpha Centauri:
    LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so /usr/local/games/smac/smac.dynamic
    To start Alien Crossfire:
    LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so /usr/local/games/smac/smacx.dynamic
You also have space characters in the command line, so presumably you escaped or quoted the command line..
  • ' LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so /usr/local/games/smac/smac.dynamic '
--single quotes ( ' ) work better than double quotes ( " ) for most filename paths
Post Reply

Return to “Software & Applications”