Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
Like Tree1Likes

Thread: INFO: permissions for "mount" command

  1. Default INFO: permissions for "mount" command

    Hi,

    I've have put an icon on the application menu that runs a scrip for me:

    #!/bin/bash
    mount --bind /ezxlocal/fonts /usr/language/fonts
    touch /mmc/mmca1/c.txt

    When running the script by telnet (as root), everything works. When runing it from the phone by tapping the application icon, the file c.txt is created, but the mount is not being perfomed.

    It seems that somehow I can not perfom the mount by tapping the application icon, but can do it with telnet. Any ideas ??????

  2. #2

    Default Re: permissions for "mount" command

    Quote Originally Posted by yanivaloemail
    Hi,

    I've have put an icon on the application menu that runs a scrip for me:

    #!/bin/bash
    mount --bind /ezxlocal/fonts /usr/language/fonts
    touch /mmc/mmca1/c.txt

    When running the script by telnet (as root), everything works. When runing it from the phone by tapping the application icon, the file c.txt is created, but the mount is not being perfomed.

    It seems that somehow I can not perfom the mount by tapping the application icon, but can do it with telnet. Any ideas ??????
    If you mean you are trying to run with Loadlin, then the script run as "ezx" user. You need to rerun the script as root. Try this code at the begining of your script.

    if [ "$(id -u)" != "0" -a -z "$1" ]; then
    exec /sbin/start-stop-daemon -S -c root:root -x "$0" -- restart
    exit 1
    fi
    Spidey likes this.

  3. Default solved it

    Thanks for the answer. Wasn't using linloader, but your answer encouraged me to solve it. Now I can change fonts on my phone by tapping one icon on the applications menue, and then changing language settings on setup. This is the attribute that I had to add to the CardRegistry:

    [AppLinkRecord100000012]
    Attribute = 2
    BigIcon = images/audio.png
    Directory = /mmc/mmca1/
    Exec = changeFonts2.sh
    Name = Hebrew
    UserID = root
    GroupID = root
    Type = 2
    uid = 100000012

    Now the changeFonts2.sh can mount the relevant files. This saved me flasshing my phone

  4. #4

    Default Re: solved it

    Quote Originally Posted by yanivaloemail
    Thanks for the answer. Wasn't using linloader, but your answer encouraged me to solve it. Now I can change fonts on my phone by tapping one icon on the applications menue, and then changing language settings on setup. This is the attribute that I had to add to the CardRegistry:

    [AppLinkRecord100000012]
    Attribute = 2
    BigIcon = images/audio.png
    Directory = /mmc/mmca1/
    Exec = changeFonts2.sh
    Name = Hebrew
    UserID = root
    GroupID = root
    Type = 2
    uid = 100000012

    Now the changeFonts2.sh can mount the relevant files. This saved me flasshing my phone
    I see now what you are trying to do.
    I think other users will also be interested in your program.

  5. #5
    Join Date
    Mar 2007
    Location
    India
    Posts
    19

    Default

    oh yes!!! I am intersted

    yanivaloemail,
    So your way of changing the font worked. Thats great!!!

    I was trying to change the font by doing

    mount --bind /mmc/mmca1/digital.ttf /usr/language/fonts/AMCSL.TTF

    This did not work.

    If I understand it right. You have done the following
    1. Created a changeFonts2.sh as follows
    #!/bin/bash
    mount --bind /ezxlocal/fonts /usr/language/fonts
    touch /mmc/mmca1/c.txt

    2. Added the following to cardregistry
    [AppLinkRecord100000012]
    Attribute = 2
    BigIcon = images/audio.png
    Directory = /mmc/mmca1/
    Exec = changeFonts2.sh
    Name = Hebrew
    UserID = root
    GroupID = root
    Type = 2
    uid = 100000012

    With this you can execute changeFonts2.sh and change the font on the fly.


    Am i right?

    /usr/language/fonts contains AMCSL.TTF and fontdef.cfg
    What is the contents of your /ezxlocal/fonts directory?

    Will doing a mount change the font immediately or we have to restart the phone?

    I could not create a fonts directory in /ezxlocal. How did u do this?

  6. Default

    chandra:

    You are right - just create fonts directory in ezxlocal (I created it through telnet with username roor), and put the regular fontdefs.cfg file and your own AMCSL file.

    In order to replace fonts you will need to tap the new icon in your application menu, and then change language from the phone setup to Automatic, or to any other language (this will load the new fonts).

    One exception: the new fonts does not appear in the calling progrma (the one you use to dial numbers).

    If you want to avoid the need to change language in the setup menu, then add the lfollowing line to the script:
    killall -9 "am"

    Good luck.

  7. #7
    Join Date
    Mar 2007
    Location
    India
    Posts
    19

    Default

    Didn't work for me. I could not even execute the script by clicking on the icon.
    But I did manage to change the font by doing the following
    1. To execute the commands as root, I modified the userid & groupid to "root" for LinLoader in the cardregistry file.
    2. Created a script file fonts.txt containing
    #!/bin/bash
    mount --bind /mmc/mmca1/comicbd.ttf /usr/language/fonts/AMCSL.TTF
    3. executed with linloader.

    This changed the font. I didnt change the language. Went to main menu (i.e. closed all the open windows). After this all the windows that were opened had the new font. But the main screen, main menu, address book and messages did not change. May be because these tasks are already running. So went to language settings and changed to some other language and switched back to english. Now the new font could be seen everywhere

    Thanks to your idea

    But every time i restart my phone, i have to run this script. Any idea how to execute this script during bootup. I read in one of the post about startup script but that didnt work for me.

    How about adding this line ("mount" the font) in /etc/init/d/mountfs.sh?
    I don't know much about linux so don't know if this will work?

  8. #8
    Join Date
    Jun 2007
    Location
    bangalore INDIA
    Posts
    312

    Default

    hi chandra, can u simplify the steps in an easily understandable language for a non-techy?
    my phone is runnin on .08p fw n cant change the fonts by just runnin startup1.txt n myfont.ttf in the root folder
    can i run those scripts through eKonsole?
    plz explain how in simple terms
    thanks..

  9. #9
    Join Date
    Apr 2007
    Location
    53rB14
    Posts
    589

    Default

    You can change fonts easily, just put myfont.ttf in the root of your memory car and execute this in eKonsole
    mount --bind /mmc/mmca1/myfont.ttf /usr/language/fonts/AMCSL.TTF
    And then this
    start-stop-daemon -K -q -n am
    M355 W1th Th33 b35T, d13 L1k3 tH3 R35t
    m41d3n is not the same person anymore, he sold his MING to me and now I'm just using his username.
    http://www.zopcar.cg.yu/

  10. #10
    Join Date
    Jun 2007
    Location
    bangalore INDIA
    Posts
    312

    Default

    YO...U RULE I SAY..U RULE...
    Thanks a tonnnn dude...u have always helped me..
    it worked magical..
    Thanks..


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 07-02-2009, 12:30 PM
  2. Replies: 7
    Last Post: 06-02-2008, 11:16 AM
  3. Q: How can i "busy" or "ignore" a incoming call in flip mode?
    By zeroonea in forum A1200 General Chat
    Replies: 4
    Last Post: 04-15-2008, 06:41 AM
  4. INFO: "Wear and Tear" covered by phone warranty
    By fundo81 in forum A1200 General Chat
    Replies: 8
    Last Post: 08-27-2007, 09:27 AM
  5. "Missed Calls" "Messages" dont display
    By wizard1 in forum A1200 General Chat
    Replies: 5
    Last Post: 08-02-2007, 10:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1