SliTaz SliTaz Forum

You are not logged in.

#1 2017-08-03 19:31:42

Red
Member
Registered: 2017-05-20
Posts: 29

how to get LibreOffice to work

Hi

I'm using Slitaz 5.0 rc3 and installed LibreOffice using the Package Manager some how it doesn't work.

It does not show up in the office applications.

Not beeing held back by any real computer knowledge I looked for the LibreOffice package.

I found it in /usr/bin when I dubbelklick it I get the choices * execute ( if I klick on it nothing happens )

* execute in terminal ( if I klick on it I get a blackscreen and have no idea what to do )

* open ( if I klick on that I get the following and still no idea )

#!/bin/sh

# get-LibreOffice - install LibreOffice excl. KDE/Gnome integration & test suite.

#

# (C) 2010 SliTaz - GNU General Public License v3.

# Author : Ben Arnold <ben@seawolfsanctuary.com>

#    via : get-OpenOffice3 (Eric Joseph-Alexandre <erjo@slitaz.org>)

#

PACKAGE="LibreOffice"

URL="http://www.libreoffice.org"

ROOT="$1"

DIR="stable"

SUFFIX="Linux_x86_rpm.tar.gz"

WGET_URL="http://download.documentfoundation.org/libreoffice/$DIR"

VERSION="$(basename $(wget -O - $WGET_URL/ 2> /dev/null | \

    sed '/href=\"[0-9]/!d;s/.*href=\"//;s/[/\">].*//' | tail -1))"

if [ -z "$VERSION" ]; then

    echo "Can't detect an appropriate version. The version numbering or URL may have changed. Aborted."

    exit 0

fi

VER="${VERSION/\-/}" # without hyphens

TARBALL="LibreOffice_${VER}_${SUFFIX}"

for LOC in ${LANG/_/-} ${LANG%_*}; do

    L_SUFFIX="Linux_x86_rpm_langpack_$LOC.tar.gz"

    L_TARBALL="LibreOffice_${VER}_${L_SUFFIX}"

    LANG_URL="$WGET_URL/${VERSION}/rpm/x86/${L_TARBALL}"

    busybox wget -s $LANG_URL 2> /dev/null || continue

    echo "Added $LANG ($LOC)."

    break

done

WGET_URL="$WGET_URL/${VERSION}/rpm/x86/${TARBALL}"

CUR_DIR=$(pwd)

TEMP_DIR="/tmp/$PACKAGE.$$"

SOURCE_DIR="/tmp/src.$$"

EXCLUDE="kde|gnome|test"

LOG="/tmp/$(basename $0 .sh).log"

# Status function with color (supported by Ash).

status()

{

    local CHECK=$?

    echo -en "\33[70G[ "

    if [ $CHECK = 0 ]; then

        echo -en "\33[1;33mOK"

    else

        echo -en "\33[1;31mFailed"

    fi

    echo -e "\33[0;39m ]"

    return $CHECK

}

# Check if user is root to install, or remove packages.

check_root()

{

    if test $(id -u) != 0 ; then

        echo -e "\nYou must be root to run [c]basename $0[/c] with this option."

        echo -e "Please use 'su' and root password to become super-user.\n"

        exit 0

    fi

}

check_if_installed()

{

     # Avoid reinstall

     if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ];then

         return 0

     else

         return 1

     fi

}

# We need to be root

check_root

# Check if package already installed

if (check_if_installed $PACKAGE); then

    echo "$PACKAGE is already installed."

    [ -n "$ROOT" ] && exit 0

    echo -n "Would you like to remove and reinstall this package [y/n]? "

    read answer

    case "$answer" in

    y|Y)

        tazpkg remove $PACKAGE ;;

    *)

        exit 0 ;;

    esac

fi

# Check if we have the tarball before.

if [ ! -f $SOURCE_DIR/$TARBALL ]; then

    echo "Downloading LibreOffice tarball (it's time to have a break)... "

    # Check if $SOURCE_DIR exist

    test -d $SOURCE_DIR || mkdir -p $SOURCE_DIR

    # Get the file.

    wget -c $WGET_URL -O $SOURCE_DIR/$TARBALL

    if [ -n $L_TARBALL ] ; then # Are we localised?

        wget -c $LANG_URL -O $SOURCE_DIR/$L_TARBALL

    fi

    status

fi

if [ ! -f $SOURCE_DIR/$TARBALL ]; then

    rm -rf $SOURCE_DIR

    echo "Could not download $TARBALL. Exiting."

    exit 1

fi

echo -n "Extracting files (this may take a while): "

# Creates TEMP_DIR and extract tarball

mkdir -p $TEMP_DIR

for TB in $TARBALL $L_TARBALL ; do

    tar xvzf $SOURCE_DIR/$TB -C $TEMP_DIR > $LOG 2>&1 || \

    (echo "Failed to extract $TB" ; exit 1)

done

# Get version found in archive (often directory is still RC version when final is present)

ARCHIVED_VERSION=[c]cd $TEMP_DIR;find . -type d 2> /dev/null | grep LibreOffice | head -n 1 | sed 's/_/ /g' | awk '{print $2}'[/c]

echo -n "(found v${ARCHIVED_VERSION})"

# Consolidate localisations into main package

if [ -n $L_TARBALL ] ; then # Are we localised?

      TARBALL_NAME="${TARBALL/.tar.gz/}"

    L_TARBALL_NAME="${L_TARBALL/.tar.gz/}"

    mv -f $TEMP_DIR/${L_TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS/*.rpm $TEMP_DIR/${TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS/

fi

status

# Extracted pkg can be removed: Save RAM

rm -rf $SOURCE_DIR

# Extract everything from RPMS

cd $TEMP_DIR/${TARBALL_NAME/$VERSION/$ARCHIVED_VERSION}/RPMS

for i in *.rpm

do

    if (! echo $i | egrep -qi $EXCLUDE); then

        echo -n "."

        (rpm2cpio $i | cpio -id >> $LOG 2>&1 ) && rm  -f $i

    fi

done

#rpm2cpio desktop-integration/*freedesktop*.rpm | cpio -id >> $LOG 2>&1

#rpm2cpio *freedesktop*.rpm | cpio -id >> $LOG 2>&1

# extracted pkg can be removed: Save RAM

rm -f desktop-integration/*freedesktop*.rpm

status

echo -n "Preparing package... "

# Make the package

mkdir -p $PACKAGE-$VERSION/fs/usr/lib/libreoffice  \

         $PACKAGE-$VERSION/fs/usr/share

# use mv instead of 'cp -a' to save RAM

mv opt/libreoffice* $PACKAGE-$VERSION/fs/usr/lib

mv usr/share/mime $PACKAGE-$VERSION/fs/usr/share

mv usr/share/icons $PACKAGE-$VERSION/fs/usr/share

mv usr/bin $PACKAGE-$VERSION/fs/usr

# relocalized libexec directory

bin=$(echo $PACKAGE-$VERSION/fs/usr/bin/libreoffice???)

if [ -L $bin ]; then

    target=$(readlink $bin)

    rm -f $bin

    ln -s ${target/opt/usr\/lib\/libreoffice} $bin

else

    sed -i 's#/opt/#/usr/lib/libreoffice/#'  $bin

fi   

# Create receipt

cat > $PACKAGE-$VERSION/receipt <<EOT

# SliTaz package receipt.

PACKAGE="$PACKAGE"

VERSION="$VERSION"

CATEGORY="office"

SHORT_DESC="Productivity suite."

DEPENDS="java6-jre cups"

WEB_SITE="$URL"

post_install()

{

        ln -sf /usr/lib/libreoffice?* /usr/lib/libreoffice

        path_libreoffice=\$(find /usr/lib/libreoffice -name libreoffice*.*)

        # Remove links if exist

        rm -f /usr/share/applications/libreoffice-*

        # Create links

        cd /usr/share/applications

        ln -sf \$path_libreoffice/share/xdg/base.desktop          libreoffice-base.desktop

        ln -sf \$path_libreoffice/share/xdg/impress.desktop       libreoffice-impress.desktop

        ln -sf \$path_libreoffice/share/xdg/writer.desktop        libreoffice-writer.desktop

        ln -sf \$path_libreoffice/share/xdg/calc.desktop          libreoffice-calc.desktop

        ln -sf \$path_libreoffice/share/xdg/math.desktop          libreoffice-math.desktop

        ln -sf \$path_libreoffice/share/xdg/draw.desktop          libreoffice-draw.desktop

        chmod +x \$path_libreoffice/share/xdg/*.desktop

        # If necessary, recreate links for soffice

        rm -f /usr/bin/soffice /usr/bin/libreoffice

        ln -sf \$path_libreoffice/program/soffice /usr/bin/libreoffice

        ln -sf \$path_libreoffice/program/soffice /usr/bin/soffice

}

post_remove()

{

    rm -f /usr/share/applications/libreoffice-*

}

EOT

status

# Pack

tazpkg pack $PACKAGE-$VERSION

# Clean to save RAM memory

rm -rf $PACKAGE-$VERSION

# Install pseudo package

tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT

case " $@ " in

*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;;

esac

# Clean

cd $CUR_DIR

rm -rf $TEMP_DIR

Offline

#2 2017-08-03 20:44:32

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Hi Red,

You can install latest LibreOffice from the SliTaz Next repository.

LibreOffice from this site is compatible with the SliTaz-5 series.

[*]Follow link to visit download page: http://cook.slitaz.org/next/LibreOffice/download

[*]Download the LibreOffice itself package (the biggest, 106.9MB package file) to your machine. Note, the package is big and need some amount of time to download.

[*]You can also download some langpacks (LibreOffice interface translations and dictionary). Note, I don't make Netherland langpack yet, but can make it for you if you want.

[*]On this step I advice you to remove old LibreOffice package (not necessarily, but desirable).

[*]Install new package(s) you download by double clicking them, entering root password, and pressing "Install" button. Note, package is big and required some time to installing...

That's all.

I tested it right now in my SliTaz-5-based distro, and it works well.

Offline

#3 2017-08-05 05:37:11

Red
Member
Registered: 2017-05-20
Posts: 29

Re: how to get LibreOffice to work

Thanks for the advice Aleksej.

I down loaded the package, removed the ,, old " one, dubble clicked on the new one and clickt on install.

It all seemed to work fine, it took some time to install but if I check the packagelist it's there.

So far so good, but how do I get it to work ?

It doesn't show up anywere. If I try to open a spreadsheet, don't get the option LibreOffice calc.

Red

Offline

#4 2017-08-05 08:43:43

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: how to get LibreOffice to work

you can try as root:

find / -name "libreoffice"

normally it should be somewhere in /urs/bin

Launchers should be:

Writer: /usr/bin/libreoffice -writer

Calc: /usr/bin/libreoffice -calc

Draw: /usr/bin/libreoffice -draw

Impress: /usr/bin/libreoffice -impress

Math: /usr/bin/libreoffice -math

Offline

#5 2017-08-05 09:42:03

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Hi there!

The list of all files (huge) is included, of course: http://cook.slitaz.org/next/LibreOffice/files

LibreOffice is installed to [c]/opt/libreoffice5.4/[/c] folder.

Binary is [c]/usr/bin/libreoffice5.4[/c] that is symlink to -> [c]/opt/libreoffice5.4/program/soffice[/c]

Desktop files are:

[c]/usr/share/applications/libreoffice5.4-base.desktop
/usr/share/applications/libreoffice5.4-calc.desktop
/usr/share/applications/libreoffice5.4-draw.desktop
/usr/share/applications/libreoffice5.4-impress.desktop
/usr/share/applications/libreoffice5.4-math.desktop
/usr/share/applications/libreoffice5.4-qstart.desktop
/usr/share/applications/libreoffice5.4-startcenter.desktop
/usr/share/applications/libreoffice5.4-writer.desktop
/usr/share/applications/libreoffice5.4-xsltfilter.desktop[/c]
Icons are in [c]/usr/share/icons/hicolor/[/c]

MIME data in [c]/usr/share/mime/packages/libreoffice5.4.xml[/c]

To solve problem step-by-step, first, please run in your terminal:

[c]libreoffice5.4[/c]
It warns about Java not installed: it required for LibreOffice extensions, and LibreOffice itself works without it. And the main window of LibreOffice opens for me. What about you? Is it shows something else than mine?—

[c]lexeii@slitaz:~$ libreoffice5.4
javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx[/c]

Offline

#6 2017-08-06 06:29:14

Red
Member
Registered: 2017-05-20
Posts: 29

Re: how to get LibreOffice to work

I started my post with,, not beeing held back by any real computer knowlege " so most of this is dubble dutch to me.

But I typed libreoffice5.4 in the Sakura terminal, and his is the result

tux@slitaz:~$ libreoffice5.4

/bin/sh: libreoffice5.4: not found

tux@slitaz:~$

there is no libreoffice 5.4 anywere

not in mime packages

not in applications

not in bin

according to the package manger it's installed

Red

Offline

#7 2017-08-06 07:41:53

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: how to get LibreOffice to work

open sakura terminal and get root:

find / -name "libreoffice" >result.txt

and attach result.txt

Offline

#8 2017-08-06 08:40:50

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Hi Red,

So, you claim that none of these files are in the system?

http://cook.slitaz.org/next/LibreOffice/files#LibreOffice

No folder [c]/opt/libreoffice5.4[/c], no file [c]/usr/bin/libreoffice5.4[/c], no menu files in [c]/usr/share/applications[/c]?..

Looks like some bad technical problems. Let's say, the free space in your hard disk was over. And when files are extracted from the package, they was discarded.

According to this info LibreOffice package need 422 MB of free space to install. Note, the package itself is 107 MB, and it is also on the hard disk (and also in the cache, I can't recall).

I'm using Slitaz 5.0 rc3

Or maybe you use it like Live CD on the system with small RAM. Acting in live mode, all the files are resides in the RAM, and your free RAM is ended... Looks like?

So I advice you to install SliTaz on the hard disk.

Or maybe, you already installed your SliTaz to the hard disk, but allocated a little space for "baby" SliTaz. In reality, 3 - 5 - 10 GB or even more will be perfect if you want to use SliTaz more, and to install programs.

Ah, output of next command will show the space available for root file system:

[c]df -h /[/c]
What it says for you?

Or, maybe SliTaz 5.0 RC3 has a terrible problems?

(I think, better to remove all that RC's from the server to not to fool people's head; leaving only "weekly stable" rolling ISOs).

-----------------

Hi Thomas,

Your command will not find anyone file from that package. But you probably have your own goals. So, just draw your attention.

-----------------

Have a nice day for all of you guys!

(it looks like less warmer than yesterday)

Offline

#9 2017-08-06 11:03:25

rerivero
Member
Registered: 2012-06-18
Posts: 235

Re: how to get LibreOffice to work

You can test this in SliTaz 5 on my 4.0 it works ok.

http://forum.slitaz.org/topic/get-libreoffice-patched#post-44697

Offline

#10 2017-08-06 20:33:45

aniguenni
Member
Registered: 2011-12-18
Posts: 153

Re: how to get LibreOffice to work

@Red

Why you don't try the much more powerful http://www.freeoffice.com/en/ ?

It's easy to install and works like a charme.

The FreeOffice works fantastically with files made and formatted in Microsoft Office. It’s loss-free.

System requirements: Windows 10, Windows 8, Windows 7, Vista, Windows XP or any PC-based Linux (32 or 64 bits)

...why not -  give it a try and enjoy ;-)

Offline

#11 2017-08-06 20:57:43

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Hi aniguenni,

Softmaker's FreeOffice isn't bad at all. But I not sure Red will be able to install it without any computer knowledge. And I can't make the SliTaz package with it because I doubt I can redistribute it at all. Seems, here we need yet another get-script.

(And why I not use it — it still missed formula support. And my papers are simply overflowing with formulas. Like this one:)

[attachment=45069,2532]

Offline

#12 2017-08-07 05:21:35

Red
Member
Registered: 2017-05-20
Posts: 29

Re: how to get LibreOffice to work

Oke Aleksej, you caught me redhanded.

I have been using Slitaz live eversinds my harddrive broke down.

I wanted persisting changes so I installed Slitaz on a sdcard ( with the help of Ceel )

Slitaz beeing verry small, I used a 1GB sdcard.

So you remark makes sense.

My mistake ( I'm the monkey that has'n learned the trick yet ) I'm not sure I have time to make an other

sdcard this week, bussy at work and a lot of try and error to get card working, but I let the results know

as soon as possible

Thanks so far

Red

Offline

#13 2017-08-07 08:04:43

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: how to get LibreOffice to work

Aleksej you are right - thats the correct question

find / -name "libreoffice*" >result.txt     or      find / -name "*office*" >result.txt

and I think, we can make a freeoffice.tazpkg, because they give it often to CDs in computermagazines and it is/was also part of fluxflux distribution - https://fluxflux.net/?p=541

Offline

#14 2017-08-08 19:43:38

Red
Member
Registered: 2017-05-20
Posts: 29

Re: how to get LibreOffice to work

Well I found some time, and the installation of Slitaz on a sdcard wend right the first time (I'm learning )

I downloaded the package and installed it, now it shows up, so far so good.......but

If I click on an icon, the LibreOffice logo shows up for 1 second and a little round thing is there for some

30 seconds and that's it.

This happens with write, calc, impress etc.

If I type  df -h / in the terminal this is the result

tux@slitaz:~$ df -h /

Filesystem                Size      Used Available Use% Mounted on

/dev/root                 3.6G    915.2M      2.6G  26% /

If I type LibreOffice 5.4 in the terminal this is the result

tux@slitaz:~$ libreoffice5.4

javaldx: Could not find a Java Runtime Environment!

Warning: failed to read path from javaldx

/opt/libreoffice5.4/program/soffice.bin: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory

It's a bit different from your's, looks like something is missing.

Should I reinstall LibreOffice ?

Or do you have some magic trick to fix it.

Red

Offline

#15 2017-08-08 19:47:49

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Hi Red,

The solution should be very simple — you need to install "libcups" package.

Offline

#16 2017-08-09 05:13:11

Red
Member
Registered: 2017-05-20
Posts: 29

Re: how to get LibreOffice to work

Yes ! it works!

Thanks Aleksej

Red

Offline

#17 2017-08-09 05:24:15

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: how to get LibreOffice to work

Nice to hear it smile

Have a nice day.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.020 seconds, 7 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]