Sida 1 av 1

execute

Postat: 08 aug 2007, 04:35
av Ulsak
Hej!
Jag har iofs en guru till hands, men jag är otålig så jag undrar följande.
Jag lyckades packa upp ett roguelike spel ( nethackliknande) som heter ADOM ( <a class="postlink" href="http://www.adom.de">http://www.adom.de</a>) i linuxversion ( i gnome) tar.gz och fick in dessa i en mapp  :o som heter adom på desktopen.
Men när jag försöker köra programmet ( genom att klicka) så händer inget. Jag lyckades även att manövrera till rätt mapp via terminal programmet :P men där tog mina kunskaper slut.  :-[
Hur exekverar man ett program i linux?

MVH nyfödd linux entusiast ( Har Unbuntu 7.04)

SV: execute

Postat: 08 aug 2007, 10:12
av klager
Det finns en Readme fil med i programmet (se ett avsnitt ur den nedan), sedan får du anpassa det lite efter Ubuntu (lägga till sudo kommandot före kommandona)

"VIII.B. Linux
=============

  When installing ADOM you have two choices.  If you have access to root
  privileges you can install Linux system-wide.  If you are just a simple
  user, installing ADOM is also possible.

  * Uncompressing the package
  --------------------------
  Distributions of ADOM usually consist of one file either called
  'adom-xyz-elf.tar.gz' or 'adom-xyz-aout.tar.gz'.  The 'xyz'
  normally corresponds to the version number contained in the distribution
  (e.g. 070 for version 0.7.0).  To install the package you need to issue
  the following two commands:
        gunzip adom-xyz-aout.tar.gz
        tar xf adom-xyz-aout.tar
  After doing this you should change to the new directory (called 'adom')
  and then continue as described below depending on whether you have root
  privileges or not.

  Installing ADOM globally will be a bit of work so that you should try the
  local version if you just want to take a quick look at it.  If you
  like what you see you can still install it globally.

  * If you _do_ have root privileges:
  -----------------------------------

    The following description will assume that you want to use the
    directory '/var/lib/adom' as your global highscore directory and that
    the binary itself will be installed in the directory '/usr/games'.

    First of all you will have to create a new user (e.g. named 'adomown')
    and a new group (also named 'adomown').  To create the new group you
    will have to add the following line to your /etc/group file:

        adomown:*:<gid>:adomown

    The term <gid> has to be replaced by the smallest number larger than
    99 that is not used by any other group.  Note the number.  You will
    need it once more.

    To create the new user you will have to add the following line to the
    /etc/passwd file:

        adomown:*:<uid>:<gid>:adomown:/usr/games:

    The <gid> term has to be replaced by the number you used above for the
    group entry. The <uid> term has to be replaced by a valid user id.

    Next you will need to copy the adom-binary to the /usr/games
    directory. Then enter the /usr/games directory and type the following:

        chown adomown.adomown adom
        chmod +x adom
        chmod +s adom

    Now we are nearly done. You need to create the highscore directory
    /var/lib/adom.  The directory has to be owned by 'adomown' (both user
    and group ownership).  The correct privileges can be set with

        chown adomown.adomown /var/lib/adom
        chmod 775 /var/lib/adom

    Finally you will have to create a file in the /etc directory called
    'adom_ds.cfg', which must contain but one text line: the path to the
    highscore directory (in our example '/var/lib/adom').

    The configuration file '.adom.cfg' for the individual users has to be
    put into the home directory of each user wishing to utilize the
    configuration variables (see the manual for details).

    The highscore will be saved in /var/lib/adom/.HISCORE (if you are
    using the default values).

    Finally you should make sure that the path variable lists the path to
    the globally installed ADOM binary before the one to any home
    directories.

  * If you do _not_ have root privileges:
  ---------------------------------------

    Copy the adom binary into a directory of your choice.  This directory
    must be included in your PATH variable.  To play ADOM just type
    'adom'.  In your home directory several subdirectories will be
    created:

        .adom.data/        to hold all data files
        .adom.data/tmpdat/  to hold the temporary files during a game
        .adom.data/savedg/  to hold the saved games

    Also two files might be created in your home directory:

        .adom.data/.HISCORE: to save the scores of your games
        .adom.prc:          a lock file to prevent you from starting ADOM
                            more than once
"

SV: execute

Postat: 08 aug 2007, 10:33
av per9000
Ofta räcker det med att berätta för filsystemet att programmet är körbart:

Kod: Markera allt

>chmod +x FILNAMN
(detta gäller speciellt om man bygger egna små script i bash, då brukar jag börja med

Kod: Markera allt

touch FILNAMN
chmod +x FILNAMN
(touch skapar en tom fil))


Har man tur räcker det.

/Per

SV: execute

Postat: 08 aug 2007, 21:37
av Ulsak
Tack så mycket Per9000 och Klager!

Jag får sätta mig ner lusläsa på både det ena och det andra.
Det är inte som att hacka DOS för 15 år sen..

/ulsak

SV: execute

Postat: 11 aug 2007, 20:50
av Ulsak
Tackar igen. jag har fått igång det hela! ;D
nu ska jag bara mecka lite med färgerna i CLI så att vissa tecken som * och # syns mot bakgrunden, men det går ju att köra i terminalläge oxå! :P

det känns underbart ha en ren linuxinstallation på en maskin man byggt själv..

nöjd ubuntuman