Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 43

Thread: a cmg in a .desktop file(alpha release)!

  1. #11
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Unfortunately, I get the error: Unknown host bcvrf.yahoo.com

    Perhaps you can use a smaller application, let's say klik://xvier for demonstration (it's only a few KB in size)

    I probably still don't fully understand how you do it, but one thing would be of extreme importance to me: that you can freely move the "1 file" to whatever location you want, and that it does not need to unpack itself before the application can run.

    Greetings,
    probono

  2. #12
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    29
    it can be place any where.
    because every time you click the .desktop file it runs the Run.sh script that search for the file(it send to the Run.sh script the name and the rNum(a random number created at creation of .desktop file).
    this is the Run.sh script:
    Code:
    #/bin/sh
    #get the random number $1=filename $2=random number fPATH is the searching path
    fPATH="/home"
    files=$(find $fPATH | grep $1)
    for filex in $files
    do
    rNum=$(head -n 2 $filex | tail -n 1 | cut -d" " -f2)
    if [ $rNum = $2 ]
    then
    	$filex
    fi
    
    done
    Question: why this forum doesn`t have attachments?

  3. #13
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    29
    i made a .desktop file of xvier here:

    http://easy.savefile.com/urielka/xvier.zip

    just unzip copy the Run.sh script to /usr/bin and chmod +x him
    and then click the xvier.desktop file!

    Noteon`t change the name of the file changing it will make the file unrunable
    Note2on`t enter Properties of the files it will make it corrupt
    Note3: the file must be in the path of /home(including all the subdirectorys) if you want it to be any where set the fPATH in the Run.sh to /(i don`t recommend it coz it will take alot of time).
    Note4: the Run.sh is not finished,when i finaly finish it ,it will have multiplie path and index searching for more speed.

    More to come!!!

  4. #14
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Looks like a clever idea, but I would change it a bit:

    - The logic for mounting should still be outside of the cmg, e.g., in ~/.zAppRun, because it's not really stable code yet and should be easy to upgrade anytime w/o having to rebuild all cmg files

    - Why the GUIDs? That looks "Windowsy" to me. What do you think about the following, it basically calls "itself":

    Code:
    #!/bin/sh
    Do_Nothing ()
    {
    [Desktop Entry]
    # for the specs
    # see http://standards.freedesktop.org/des...t/ar01s06.html
    Exec= sh -x %k # tail +9 %k | sh # skips the first 9 lines but removes $0
    Icon=info
    Name=Self-contained test application
    Name[de]=Selbstablaufendes Testprogramm
    Type=Application
    Terminal=true
    }
    
    #
    # How to insert icon data into this file?
    #
    
    #
    # here a shell script can be inserted
    #
    
    #
    # below this, the cramfs image could be appended
    # to be mounted from ~/.zAppRun with loop offset
    #

  5. #15
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    29
    about the :
    Code:
    sh -x %k # tail +9 %k | sh
    did you tested it?
    because as far as i know the $0 when running a .desktop is kdesktop(because kdesktop run it).

    about using ~/.zAppRun it`s ok but it should contain at least a simple script that will run the ~/.zAppRun like this:
    Code:
    #!/bin/bash
    ~/.zAppRun *  #this script runs on the cmg directory by default!
    EDIT: i readed the specs now and i understood how it work and i must say : how the hell did you find this?! i looked at the specs about two hours and i didn`t saw this little (but very important) info.
    i will update the scripts and post them very soon.
    but for the time i will post a updated xvier using the code that you gave!.(uning sh -x %k and ~/.zApprun instead of using the zApprun inside the .deksktop)
    here is it:

    http://<br /> <a href="http://easy.....zip</a><br />

  6. #16
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Exec=sh -x %k
    works *perfectly* for me

    Do you know a way to calculate the neccessary offset= value for loop?

    Btw, would be great to see you on #klik on irc.freenode.net

  7. #17
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    This works:
    (Only .zAppRun has to be changed so that it calculates and uses the correct offset= parameter when loop-mounting)

    Code:
    #!/bin/sh 
    Do_Nothing () 
    {
    [Desktop Entry]
    # for the specs see
    # http://standards.freedesktop.org/des...t/ar01s06.html
    Exec= sh -x %k 
    Icon=info
    Name=Self-contained test application
    Name[de]=Selbstablaufendes Testprogramm
    Type=Application
    Terminal=true
    } 
    
    #
    # How to insert icon data into this file?
    #
    
    ~/.zAppRun "$0" 
    # we need to have .zAppRun calculate and use offset=
    
    #
    # below this, the cramfs image is appended
    #

  8. #18
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    29

  9. #19
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Now this is a bit of "cheating" because it unpacks the application before it runs it (requires disk space ram, and slows down the start of large apps considerably). So we should really try to use ~/.zAppRun and cramfs/zisofs - what do you think?

    Greetings,
    probono

  10. #20
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    29
    it`s uncommpresd tar so it doesn`t take so long(i think a 0.01 secs) but using the ~/.zAppRun and cramfs should be faster but you can`t have both the icon and the cmg.
    with my "cheating" you can tar the cmg+script+icon and then in the script check if the icon exsist on(let say) ~/.kde/share/icons/klik/icon1.png and if it doesn`t exsist it will copy the icon to ~/.kde/share/icons and the run the cmg.(of course the Icon= will be Icon=~/.kde/share/icons/klik/name_of_app.png)

Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. Desktop File Folders don't work
    By Keithj in forum Hdd Install / Debian / Apt
    Replies: 10
    Last Post: 09-10-2005, 05:55 AM
  2. How to have the remote smb file share on desktop
    By vi2004 in forum General Support
    Replies: 0
    Last Post: 02-13-2004, 11:04 AM
  3. Configuration file -- corrupt desktop, unusable network.
    By talyrath in forum General Support
    Replies: 0
    Last Post: 01-26-2004, 01:57 AM
  4. Help with Alpha Blending
    By Aslyum in forum General Support
    Replies: 1
    Last Post: 11-20-2003, 12:39 PM
  5. [SCRIPT] Install RealONE Player (alpha)
    By probono in forum Ideas
    Replies: 1
    Last Post: 04-23-2003, 01:19 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
  •  


Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p picture

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p

$499.88



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



DELL POWEREDGE R340 Server | Xeon E-2126G 64GB RAM PERC H330 (Onboard) picture

DELL POWEREDGE R340 Server | Xeon E-2126G 64GB RAM PERC H330 (Onboard)

$399.95



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$449.99



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD

$381.93



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$308.00



Dell PowerEdge R430 6-Bay 2-SATA SSD Server 2.40Ghz E5-2680v4 14-Core 32GB RAM picture

Dell PowerEdge R430 6-Bay 2-SATA SSD Server 2.40Ghz E5-2680v4 14-Core 32GB RAM

$527.95



Dell EMC VxRail E560F 10-SFF 2*Gold 6230R 2.1GHz No RAM HBA330 iDrac Ent Server picture

Dell EMC VxRail E560F 10-SFF 2*Gold 6230R 2.1GHz No RAM HBA330 iDrac Ent Server

$349.99



Dell PowerVault DL2200 2x Xeon E5620 24GB RAM H700 2x500GB SAS RAID1 picture

Dell PowerVault DL2200 2x Xeon E5620 24GB RAM H700 2x500GB SAS RAID1

$199.00