Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [TUTORIAL-WIP] N900-LINUX: Ubuntu, Fedora and Archlinux

    Reply
    Page 25 of 53 | Prev | 15   23     24   25   26     27   35 | Next | Last
    deny_winarto | # 241 | 2010-12-13, 17:22 | Report

    Originally Posted by juandp77 View Post
    @deny_winarto: OpenOffice Desktop

    Code:
    #!/usr/bin/env xdg-open
    [Desktop Entry]
    Encoding=UTF-8
    Name=OpenOffice
    GenericName=OpenOffice
    Exec=ubuntu openoffice.org
    Icon=ooo-gulls
    X-Osso-Type=application/x-executable
    X-HildonDesk-ShowInToolbar=true
    Terminal=true
    Type=Application
    StartupNotify=true
    so all you have to do is change debbie for ubuntu
    Sorry juan it doesn't work, it only flashes for a sec and that's it..
    Maybe the script also needs to be modified?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to deny_winarto For This Useful Post:
    mivoligo

     
    juandp77 | # 242 | 2010-12-13, 18:09 | Report

    no the script its fine, so rare dude, you create a new desktop entry or just edited the ooo.desktop file on /usr/shere/applications/hildon?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    deny_winarto | # 243 | 2010-12-14, 00:00 | Report

    Originally Posted by juandp77 View Post
    no the script its fine, so rare dude, you create a new desktop entry or just edited the ooo.desktop file on /usr/shere/applications/hildon?
    Well at first i edit the ooo.desktop file on /usr/shere/applications/hildon but strangely it doesn't show up on the app list.
    (I just deleted the debian img file, is it because of that?)

    So i deteled it, then create a new one with the same name and the scrip you told me..
    It does show up on the app list but it only flashes for a sec when i clicked it..
    I'm pretty sure there are no typo, i copy paste from your post

    Oh yea and it's that it always crashes my device when i try to save the script in gnu nano.. So i had to restart it.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by deny_winarto; 2010-12-14 at 00:06.

     
    qole | # 244 | 2010-12-14, 00:09 | Report

    deny_winarto: what happens when you enter "ubuntu openoffice.org" at a terminal? Does it start OpenOffice? Or does it cause an error? If you just get an error, then post it here.

    For those wondering about "Easy Ubuntu", I made something like that with my ubuntu-m5-v1.img.ext2.lzma image, but I couldn't really see any advantage over Debian, so I didn't pursue it very far. Have things changed recently?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    deny_winarto | # 245 | 2010-12-14, 00:18 | Report

    Originally Posted by qole View Post
    deny_winarto: what happens when you enter "ubuntu openoffice.org" at a terminal? Does it start OpenOffice? Or does it cause an error? If you just get an error, then post it here.

    For those wondering about "Easy Ubuntu", I made something like that with my ubuntu-m5-v1.img.ext2.lzma image, but I couldn't really see any advantage over Debian, so I didn't pursue it very far. Have things changed recently?
    I get "not found"

    So i rename the "debbie" script in /usr/bin into "ubuntu" and i get mounting error. It seems the script must also be changed

    I don;t know but ubuntu runs faster than debian on my device,
    I tried openoffice on debian but it's too laggy..
    i don't OC my device and i put the debian image on mmc so that's probably why..But with the same setup ubuntu's OO is still faster

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by deny_winarto; 2010-12-14 at 01:25.

     
    juandp77 | # 246 | 2010-12-14, 01:27 | Report

    @qole: thanks to your image and your instructions i could start building this, so thanks a lot for that, I see this like a proof that we could do amazing things with the n900

    @deny_winarto: debbie file its a script that uses debian.img.ext2, it doesn't have anything to do with ubuntu, so if you change it you will be changing debian, not ubuntu. You are having so many troubles, maybe you have your device overloaded with so many things, have you experimented some others issues besides the problems with ubuntu

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to juandp77 For This Useful Post:
    Boemien

     
    deny_winarto | # 247 | 2010-12-14, 02:04 | Report

    Originally Posted by juandp77 View Post
    @qole: thanks to your image and your instructions i could start building this, so thanks a lot for that, I see this like a proof that we could do amazing things with the n900

    @deny_winarto: debbie file its a script that uses debian.img.ext2, it doesn't have anything to do with ubuntu, so if you change it you will be changing debian, not ubuntu. You are having so many troubles, maybe you have your device overloaded with so many things, have you experimented some others issues besides the problems with ubuntu
    If i'm not mistaken the "ubuntu" in

    exec=ubuntu openoffice.org

    points to the "ubuntu" file in /usr/bin?
    Which doen't exist when i look for it in filebox

    So i created a new ubuntu file using gnu nano in /usr/bin by modifying qole's script a bit

    Code:
    #!/bin/sh
    # Chroots to Debian and runs a shell, or any command-line as non-root.
    
    # By Alan M Bruce (qole), Benson Mitchell and Thomas Perl
    #
    # GPL licensed; keep code free!
    
    if [ "`whoami`" = "root" ] ; then
      echo "please don't run me as root!"
      exit 9
    fi
    
    #Pull in the config, if possible...
    [ -f /home/user/.chroot ] && . /home/user/.chroot
    
    #This comes from the config file... If not, fall back on 'user'
    #[ "x$DEBUSER" != x ] || DEBUSER=user
    DEBUSER=$USER
    
    CHROOTUSER=$DEBUSER
    
    #If display's not given, go to primary display. If it's set, let's not
    #mangle it to allow convenient use of USB VGA out, or multiple Xomaps.
    [ "x$DISPLAY" != x ] || export DISPLAY=:0.0
    
    #This enables long-hold-to-right-click in all GTK+ apps.
    #Maybe we'd be better to add libgtkstylus.so anyway, but for now, we'll
    #just leave it if they've got any non-empty GTK_MODULES 
    [ "x$GTK_MODULES" != x ] || export GTK_MODULES=libgtkstylus.so
    
    #Note use of su below, so no Debian-side script req'd to drop privileges.
    #With no args, use a shell; su will get the right one, with no -c
    #With args, just run them as $DEBUSER.
    
    if [ $# = 0 ] ; then
      echo Starting Ubuntu shell... >/dev/stderr
      sudo /sbin/ubuntu su $DEBUSER
    else
      # Workaround to allow "debbie" to be used as login shell
      if [ "$1" == "-c" ]; then
        shift
      fi
      echo Starting Ubuntu $* >/dev/stderr
      sudo /sbin/ubuntu su $DEBUSER -c "$*"
    fi
    And apparently the script also points to an ubuntu (or debian in the original script)file in /sbin which doesn' exist as well. so i created it by modifying the debian script found in the same folder.

    Code:
    #!/bin/sh
    # Sets up (if necessary) for chroot into a Debian 
    environment.
    # Expects root privileges, does not drop them. 
    # Look to /usr/bin/debbie for a friendly wrapper.
    
    # By Alan M Bruce (qole) with help from Benson 
    Mitchell and Thomas Perl
    #
    # GPL licensed; keep code free!
    
    if [ "`whoami`" != "root" ] ; then
      echo "please run me as root!"
      exit 9
    fi
    
    #Pull in the config, if possible...
    if [ -f "/home/user/.chroot" ] ; then
    
    . /home/user/.chroot
    
    else
      echo "No ~/.chroot file." >/dev/stderr
    fi
    
    #This comes from the config file... If not, fall back 
    on '/debian'
    if [ "x$CHROOT" = "x" ] ; then
      CHROOT=/.ubuntu
      echo "No chroot dir specified; using $CHROOT" 
    >/dev/stderr
    else
      echo "Chroot dir specified: $CHROOT" >/dev/stderr
    fi
    
    #This comes from the config. If not, search for 
    ubuntu*.img.ext2
    if [ "x$IMGFILE" = "x" ] ; then
      echo "No image file or partition specified." 
    >/dev/stderr
      IMGMMC="`ls -1 /home/user/ubuntu*.img* 
    /media/mmc1/ubuntu*.img* | head -1`"
      if [ "x$IMGMMC" != x ] ; then
        IMGFILE="$IMGMMC"
      else
        MSG1=`printf "ERROR!\n\nYou have no 
    ubuntu.img.ext2 file on your memory cards.\n\nPlease 
    use the Debian Image Installer in Extras."`
        if [ ! -f "/usr/bin/gxmessage" ] ; then
          echo $MSG1 >/dev/stderr
        else
          gxmessage -center -alignbuttons center -buttons 
    GTK_STOCK_OK:0 -geometry 680x250 -title "MISSING DISK 
    IMAGE" "$MSG1"
        fi
        exit 9
      fi
    else
      echo "$IMGFILE specified in ~/.chroot" >/dev/stderr
    fi
    
    #
    #Make the temp dir bigger for OpenOffice etc.
    #
    #This comes from the config file... 
    #If not, fall back to a 6MB /tmp dir
    #
    
    [ "x$TMPSIZE" != x ] || TMPSIZE=6M
    mount -o remount,size=$TMPSIZE /tmp
    
    #Messy hack to make tap-and-hold work with GTK apps.
    export GTK_MODULES=libgtkstylus.so
    
    #Some OpenOffice environment variables
    export SAL_USE_VCLPLUGIN="gtk"
    export OOO_FORCE_DESKTOP="gnome"
    export SAL_NOOPENGL="true"
    export OOO_DISABLE_RECOVERY="true"
    export 
    SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION="true"
    #export SAL_DISABLE_CUPS="true"
    
    qchroot $IMGFILE $CHROOT "$@"
    I tried running it in x-terminal and this is what i got :

    Code:
    ~ $ ubuntu openoffice.org
    Starting Ubuntu openoffice.org
    /sbin/ubuntu: line 3: environment.: not found
    /sbin/ubuntu: line 8: Mitchell: not found
    /sbin/ubuntu: line 27: on: not found
    Chroot dir specified: /.debian
    /sbin/ubuntu: line 37: ubuntu*.img.ext2: not found
    No image file or partition specified.
    ls: /home/user/ubuntu*.img*: No such file or directory
    /sbin/ubuntu: line 60: /media/mmc1/ubuntu-m5-v1.img.ext2: Permission denied
    /sbin/ubuntu: line 60: GTK_STOCK_OK:0: not found
    ~ $ sudo chmod +x /media/mmc1/ubuntu-m5-v1.img.ext2
    ~ $ ubuntu openoffice.org
    Starting Ubuntu openoffice.org
    /sbin/ubuntu: line 3: environment.: not found
    /sbin/ubuntu: line 8: Mitchell: not found
    /sbin/ubuntu: line 27: on: not found
    Chroot dir specified: /.debian
    /sbin/ubuntu: line 37: ubuntu*.img.ext2: not found
    No image file or partition specified.
    ls: /home/user/ubuntu*.img*: No such file or directory
    /sbin/ubuntu: line 60: /media/mmc1/ubuntu-m5-v1.img.ext2: Permission denied
    /sbin/ubuntu: line 60: GTK_STOCK_OK:0: not found
    ~ $ sudo chmod 777 /media/mmc1/ubuntu-m5-v1.img.ext2
    ~ $ ubuntu openoffice.org
    Starting Ubuntu openoffice.org
    /sbin/ubuntu: line 3: environment.: not found
    /sbin/ubuntu: line 8: Mitchell: not found
    /sbin/ubuntu: line 27: on: not found
    Chroot dir specified: /.debian
    /sbin/ubuntu: line 37: ubuntu*.img.ext2: not found
    No image file or partition specified.
    ls: /home/user/ubuntu*.img*: No such file or directory
    /sbin/ubuntu: line 60: /media/mmc1/ubuntu-m5-v1.img.ext2: Permission denied
    /sbin/ubuntu: line 60: GTK_STOCK_OK:0: not found
    ~ $
    As you can see i also tried to chmod the /media/mmc1/ubuntu-m5-v1.img.ext2:
    but i still get permission error, what did i miss here?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by deny_winarto; 2010-12-14 at 02:06.

     
    juandp77 | # 248 | 2010-12-14, 02:23 | Report

    I think I know how to fix it, ok do this

    Code:
    sudo nano /usr/bin/ubuntu
    erase all and copy this

    Code:
    if [ "x$UBUNTUIMG" = "x" ] ; then
      UBUNTUIMG="`ls -1 /media/mmc1/ubuntu*.img* | head -1`"
    fi
    
    if [ "x$UBUNTUCHROOT" = "x" ] ; then
      UBUNTUCHROOT="/.ubuntu"
    fi
    
    if [ ! -d "$UBUNTUCHROOT" ] ; then
      sudo mkdir $UBUNTUCHROOT
    fi
    
    sudo qchroot $UBUNTUIMG $UBUNTUCHROOT "$@"
    give it permission for execution

    Code:
    sudo chmod +x /usr/bin/ubuntu
    now try again with the desktop entry I provided to you

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to juandp77 For This Useful Post:
    deny_winarto

     
    deny_winarto | # 249 | 2010-12-14, 02:52 | Report

    Originally Posted by juandp77 View Post
    I think I know how to fix it, ok do this

    Code:
    sudo nano /usr/bin/ubuntu
    erase all and copy this

    Code:
    if [ "x$UBUNTUIMG" = "x" ] ; then
      UBUNTUIMG="`ls -1 /media/mmc1/ubuntu*.img* | head -1`"
    fi
    
    if [ "x$UBUNTUCHROOT" = "x" ] ; then
      UBUNTUCHROOT="/.ubuntu"
    fi
    
    if [ ! -d "$UBUNTUCHROOT" ] ; then
      sudo mkdir $UBUNTUCHROOT
    fi
    
    sudo qchroot $UBUNTUIMG $UBUNTUCHROOT "$@"
    give it permission for execution

    Code:
    sudo chmod +x /usr/bin/ubuntu
    now try again with the desktop entry I provided to you
    Edit : Thanks it finnaly works, but the first time running it i get "another instance is running" error then it closes. Then the second time i get the recovery doc option
    So i do so, then it asked me to press "finish" but i don't see finish button and i can't move the screen down..

    So i'm stuck there..maybe we need to resize the display size?



    Also, where does open office store the file for recovery docs?
    I want to delete that file on the pic, so that i don't have to do the recovery process everytime i start open office..

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by deny_winarto; 2010-12-14 at 03:03.

     
    qole | # 250 | 2010-12-14, 03:17 | Report

    juandp77: I see you're recommending the use of 'sudo qchroot', why not use quserchroot to run the apps as user instead of root?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 25 of 53 | Prev | 15   23     24   25   26     27   35 | Next | Last
vBulletin® Version 3.8.8
Normal Logout