[SOLVED] zenity 3.8 broke my scripts

After updating from zenity 3.6 to 3.8, most of my scripts dont work.
A little example:
#!/bin/bash
title="Server Options"
prompt="Pick an option:"
options=("option 1" "option 2" "option 3")
while opt=$(zenity --width 500 --height 300 --title="$title" --text="$prompt" --list --column="Options" "${options[@]}"); do
case "$opt" in
"${options[0]}" ) zenity --info --text "option 1";;
"${options[1]}" ) zenity --info --text "option 2";;
"${options[2]}" ) zenity --info --text "option 3";;
esac
done
This normally, when selecting an option should execute: zenity --info --text "option X"
Now it does not execute anything.
Downgrading to zenity 3.6 fixes the problem.
Please, a little help !
Last edited by tritonas00 (2013-04-24 16:55:25)

Stebalien wrote:Please mark this thread as solved. Also, if you don't plan on reporting the bug upstream yourself, tell me so I can.
Sorry, i forgot.
I made the report yesterday -> https://bugzilla.gnome.org/show_bug.cgi?id=698683
Last edited by tritonas00 (2013-04-24 16:57:32)

Similar Messages

  • [SOLVED] help needed with active window script

    I am trying to receive the current window from a script. it works fine, but when no window is open i get an error.
    i am using this command:
    xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev
    error message is "Invalid Window id format: 0x0"
    I tried working around this by using this script:
    #!/bin/bash
    title_window () {
    xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev
    title_root () {
    title_window | grep 0x0
    if [[ -z title_root ]]
    then
    title_window
    else
    echo "Desktop"
    fi
    But now it shows "Desktop" for every window.
    Last edited by Rasi (2013-01-22 11:59:46)

    solved.
    solution:
    #!/bin/bash
    title_window () {
    xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev 2>&1
    title_root () {
    title_window |& grep -q 0x0
    if title_root;
    then
    echo "Desktop"
    else
    title_window
    fi

  • [SOLVED] Need help with simple a script.

    Hello, Iam searching for a small script that sorts my folders in alphabetical order.
    I want the script to create folder from A to Z and then move every folder that begins with A into the A folder etc etc..
    I really hope anyone understands what im searching for here.
    Last edited by nikihr (2009-09-01 20:25:33)

    scragar wrote:
    brisbin33 wrote:
    be careful, mv $I* will pick up your freshly created directory too;
    i'd `mkdir ./sorted/$I` instead, then `mv ./sorted/* ./ && rm -r ./sorted` at the end.
    you could also use
    find ./ -maxdepth 1 -iname "$I*" -exec mv {} ./sorted/ \;
    to do the actual move*
    *note: untested .
    While my `mv` code will throw an error the error will not stop the moving of the files, you'll just get 26 messages about being unable to move the directory to itself. I could probably find a way to avoid this that doesn't require the use of find(which I personally dislike) or a second dir, probably just using a file prefix like "_" or something. It would only be a small edit:
    #!/bin/bash
    for I in {a..z}; do
    echo "Moving $I";
    mkdir "_$I";
    echo "mv $I* \"$(echo $I | tr [:lower:] [:upper:])\"* _$I/";
    # mv $I* "$(echo $I | tr [:lower:] [:upper:])"* "_$I/";
    mv "_$I" $I
    done
    well, i have to politely disagree:  one, invoking find once is much better IMHO than mv with tr in a subshell.  and two, my ./sorted/ idea adds one additional mv command and one additional rm command where you're _$I suggestion added 26 additional mv commands....  just sayin'
    but we could also paint the bikeshed blue. .
    anyways, i think the OP's got more than he bargained for, hopefully we'll see a [SOLVED] on this one soon.

  • Solved-Quality Center 10 Mannual Runner Script - Setting the Cycle

    I can make a script to set the value for the user field on the Manual Runner window when it launches, but it is annoying because even though the value is there...you still have to select it from the drop down.
    I am setting the User Field for Cycle to equal the Target Cycle that has been set. It is pretty simple.
    Spoiler (Highlight to read)
    Run_Fields("RN_USER_01").Value = Run_Fields("RN_ASSIGN_RCYC").Value
    Run_Fields("RN_USER_01").Value = Run_Fields("RN_ASSIGN_RCYC").Value
    However I will still need to select it from the drop down list.
    I have tried setting the type of the user field to Number or String and the value will get set...but you can't start the test since it is still expecting to have the drop down value selected.
    Any help would be much appreciated.
    This question was solved.
    View Solution.

    Nevermind...I just went and commented out the script that checked for for the value entry and popped up the message box. Ran the test and the Cycle number was entered...I did have to make a new script for populating a Cycle Last Run field, but other than that it worked to rip it out.

  • [Solved] Problems with permissions for a script

    Hi I realize the topic "permissions in Linux" is something that you can find very easily in the internet but I cant seem to figure out a solution for my problem.
    I currently have a working script (taken from the ArchWiki) which enables me to change my display brightness. However I must be either superuser or root to be able to use it since it sends commands to the necessary devices.
    I am currently using fluxbox as "desktop environment" and I want to be able as normal user to change the brightness without calling "sudo" everytime. I have also bound the necessary keys in the fluxbox/keys file to send the necessary commands to the script so my only problem is now with the permission.
    Every help is much appreciated
    Last edited by Triver (2011-12-13 17:34:41)

    ok it works that way (at least when I execute the additional script which contains the sudo command).
    for some reason fluxbox doesnt react when I press the keycode that I looked up with xev (although it works with a combination like "Mod4 b: exec ~/script")
    anyway I think I'll stick with that solution and add some additional commands in the script (like toggle wlan on/off), thx for the quick help
    edit: ok now I'm having difficulties with extending the script
    I want to add additional paramters so the script can be used multifunctional depending on the parameter you launch it with.
    however he seems to think that the String which I want to compare with the parameter is a command.
    here's the code
    #! /bin/sh
    if [$1 = "brightness"]; then
    if [$2 = "up"]; then
    //call the actual brightness script with sudo
    elif [$2 = "down"]; then
    // call the actual brightness scrip with sudo
    else
    echo "invalid parameters!"
    exit 1
    fi
    fi
    exit 0
    I execute the script like this
    ~/script brightness up
    but he only returns me
    ~/script: line 2: [brightness: command not found
    so whats wrong with the code?
    Last edited by Triver (2011-12-13 16:03:07)

  • [SOLVED] (Perl) Help Modifying Conky Weather Script

    I'm using buttons' excellent Conky weather script, but it has more information than I need. It displays both the current weather condition and the temperature:
    [condition]:[temperature]F
    so right now it's
    Clear: 46F
    All I need is for it to display the temperature, without the current condition, colon, and letter 'F' (for Fahrenheit).
    the script:
    METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
    if [ -z $1 ]; then
    echo
    echo "USAGE: weather.sh <locationcode>"
    echo
    exit 0;
    fi
    curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'
    In Conky:
    {execi 300 /home/hex/.conky/weather.sh <zip code>}
    I'm not familiar with Perl yet so any help is much appreciated
    Last edited by Olson (2011-02-17 07:06:10)

    Try this
    curl ... | perl -ne 'if (/Currently/) {chomp;/\<title\>.*: (\d*).\<\/title\>/; print "$1"; }'

  • How to solve firefox crashing and continuous "unresponsive script" messages?

    I've had this issue for a couple days now. When in firefox and having multiple tabs open, the tab that I am on will freeze and an "unresponsive script" message will come up. When I only have one tab open, the browser will shut down completely without any message. I have already tried disabling all of my plugins, allowing the script to run longer, restarting firefox, and even uninstalling and reinstalling firefox. None of these seem to work for me. Does this mean I have a virus? Are there any other things I can try or should I have this looked at?

    Try this for your mac computer:
    Please do the following to give us crash IDs that will help us understand more about the crash.
    #'''(OS X 10.6 or previous)''' Click the '''Finder''' icon in the dock. Your home folder will be selected. In the right side of the window, click the Library folder to open it. Then open the "Application Support" folder, the "Firefox" folder, the "Crash Reports" folder and finally the "submitted" folder.<br>'''(OS X 10.7 or above)''' Click the '''Finder''' icon in the dock. On the menu bar, click the '''Go''' menu, hold down the '''option''' or '''alt''' key and select '''Library'''. A window will open containing your Library folder. Then open the "Application Support" folder, the "Firefox" folder, the "Crash Reports" folder and finally the "submitted" folder.
    #Open the 5 most recent files with a text editor and copy the IDs.
    #Paste each ID with '''bp-''' into the reply window on the forums.
    Thanks in advance!
    You can find more information and troubleshooting steps in the [[Firefox crashes]] article.

  • [Solved][KF5 Plasma] I broke my kwallet service

    Hello,
    I think I broke my kwallet service between updates and an attemp to reset it.
    Few week ago, after an update, kwallet started to ask password any time I wanted to connect to a WIFI network.
    As I didn't remember the kwallet password, I clicked "cancel" and entered the WIFI password manually.
    Today I looked for method to reset kwallet and I've done this :
    rm ~/.config/kwalletrc
    mv ~/.local/share/kwalletd ~/.local/share/kwalletd.bak
    Now i briefly see the kwallet password window, without any chance to do anything with that window.
    And I can't connect WIFI network as it doesn't ask for WIFI password anymore.
    kwalletmanager doesn't work :
    [thomas@thomas-xps-14:~]$ kwalletmanager
    QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
    QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    [thomas@thomas-xps-14:~]$ kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    kwalletmanager(7331)/kdeui (Wallet): The kwalletd service has been disabled
    Installed packakages
    [thomas@thomas-xps-14:~]$ pacman -Qs kwallet
    local/kdeutils-kwalletmanager 15.04.1-1 (kde-applications kdeutils)
    Wallet Management Tool
    local/ksshaskpass 5.3.0-3 (plasma)
    ssh-add helper that uses kwallet and kpassworddialog
    local/kwallet 5.10.0-1 (kf5)
    Secure and unified container for user passwords
    Is anyone could help me to get kwallet working again, or make the WIFI password prompt appear again ?
    Last edited by kanar (2015-05-15 09:03:07)

    Working again.
    mv .kde4/share/config/kwalletrc .kde4/share/config/kwalletrc.bak
    mv .kde4/share/config/kwalletmanagerrc .kde4/share/config/kwalletmanagerrc.bak
    Then reboot and it was ok.

  • [SOLVED] Removing E17 desktop from AUR script

    Hello,
    I went about today installing Arch with much success and was trying to install the E17 desktop which isn't working; anytime I type startx I get:
    xset: bad font path element (#0), possible cause are:
    Directory does not exist or has wrong permissions
    Director missing fonts.dir
    Incorrect font server address or syntax
    /home/fox/.xinitrc: line 4: exec: enlightenment_start: not found
    xinit looks like this:
    xset +fp /usr/share/fonts/local
    xset fp rehash
    exec enlightenment_start
    I was going to remove E17 and reinstall it, but since I used the easy_e17.sh script I don't know how to go about removing it. I got the script from the AUR and used pacman -U to install it, but I can't seem to find a way to undo it. I tried reading easy_e17 --help and googled for a while, but couldn't find any info. Any help is appreciated.
    Last edited by NexusX (2011-01-14 22:34:12)

    Awebb wrote:What's the objection against the package in the repos? Why all the hassle with a non-pacman install?
    I had the install from the repo's previously; the install was very smooth and it started just fine but I ran into a bug where if I attempted to remove a gadget from my desktop, my whole system would lock up. I jumped on to irc to see if anyone knew of a workaround when a dev told me that the snapshots in the repo's were about 2 weeks old, and that a large amount of work had been done over that time to that area, and that updating the snapshot would probably fix the issue. I know that at this point, it'd probably be easier to just re-install the package in the repos and avoid doing anything to reproduce the bug, but rather than take the easy way out I'd rather address the problem directly and have an up-to-date e17 install. In the meantime I got XFCE up and running so I have a fully functioning system.
    moetunes wrote:Enlightenment_start would be a script to set the environment up and start the window manager, it is important. It looks like the make errors, as they always are, are important and shouldn't be ignored. Try again and pay attention to what happens during make, more then likely it will be dependency problems.
    I went back and did another reinstall to see if I could read into those make errors a bit better, especially now that I have XFCE and a web browser to search with. The make errors didn't show up this time around (/shrug) but at the end of the install was a set of 3 instructions instructing the user to add 3 paths to their environment, one of which was the PATH argument listed in the wiki, the other two were for Python and an e17 library. Added them to /etc/profile:
    #E17 eas-e17
    PATH="$PATH:/opt/e17/bin"
    PYTHONPATH=":$PYTHONPATH"
    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/e17/lib"
    And shazaam, Enlightenment works I saw these instruction in previous installs, but dismissed them since 1 was in the wiki instructions, thinking that was all that was needed. I'm considering appending this finding to the wiki.
    The new updated install fixed the problem I was having with e17 before Now, lol, however a new one is showing up that might be worse.  Now that I can update the snapshot with a single command though I suppose I'll keep e17 around and play with it as updates happen. Thanks for sticking around, if it wasn't for you insistence that the problem probably was a fudged path variable, I might have missed it.

  • [SOLVED] Adapting conky "# of new emails" script to a message preview

    The Conky wiki has a section to display the number of new emails (Gmail) with a python script. It appears that script uses urllib for credentials and then xml.etree to navigate the xml.
    I'm trying to adapt the script to display the sender and title, since they exist in the xml.
    I've been reading the documentation and after looking at the xml I'm pretty sure I need to use indexing, can't get it to work though.
    Here's the script from the wiki with my comments on what I'm trying to add in.
    #! /usr/bin/env python
    import urllib.request
    from xml.etree import ElementTree as etree
    # Enter your username and password below within quotes below, in place of ****.
    # Set up authentication for gmail
    auth_handler = urllib.request.HTTPBasicAuthHandler()
    auth_handler.add_password(realm='New mail feed',
    uri='https://mail.google.com/',
    user= '****',
    passwd= '****')
    opener = urllib.request.build_opener(auth_handler)
    # ...and install it globally so it can be used with urlopen.
    urllib.request.install_opener(opener)
    gmail = 'https://mail.google.com/gmail/feed/atom'
    NS = '{http://purl.org/atom/ns#}'
    with urllib.request.urlopen(gmail) as source:
    tree = etree.parse(source)
    fullcount = tree.find(NS + 'fullcount').text
    # attempt to navigate to sender of email (feed/entry/author/name)
    firstemailsender = tree[0][5][5][0].text
    secondemailsender = tree[0][6][5][0].text
    # attempt to navigate to title of email (feed/entry/title)
    firstemailtitle = tree[0][5][0].text
    firstemailtitle = tree[0][5][0].text
    print(fullcount + ' new')
    # added print that doesn't work because of other things not working
    print (firstemailsender + ' - ' + firstemailtitle)
    print (secondemailsender + ' - ' + secondemailtitle)
    Last edited by heyitstallchris (2015-02-06 14:55:07)

    Hey,
    I've re-written the code to use XPath instead of indexing, IMO it's more robust and compact. findall() returns a list of all Elements that match the given XPath. Make sure to include the namespace before each element name in the path (you can see that below when I use findall() to get all "author/name" elements.
    The code saves all new mails in an array (mails) full of dicts, each with a 'sender' and 'title' keys. The script will blow up if you have zero or one new emails, but you can trivially check the length of the mails array before printing at the end.
    If you have any questions about the code just ask.
    #! /usr/bin/env python
    import urllib.request
    from xml.etree import ElementTree as etree
    # Enter your username and password below within quotes below, in place of ****.
    # Set up authentication for gmail
    auth_handler = urllib.request.HTTPBasicAuthHandler()
    auth_handler.add_password(realm='New mail feed',
    uri='https://mail.google.com/',
    user= '*****',
    passwd= '*****')
    opener = urllib.request.build_opener(auth_handler)
    # ...and install it globally so it can be used with urlopen.
    urllib.request.install_opener(opener)
    gmail = 'https://mail.google.com/gmail/feed/atom'
    NS = '{http://purl.org/atom/ns#}'
    with urllib.request.urlopen(gmail) as source:
    tree = etree.parse(source)
    root = tree.getroot()
    mails = []
    # only iterate over new mails, which have a tag "entry"
    for entry in root.findall(NS+'entry'):
    message = {}
    # locate sender and title info using XPath (?) again
    message['sender'] = entry.findall(NS+'author/'+NS+'name')[0].text
    message['title'] = entry.findall(NS+'title')[0].text
    mails.append(message)
    print(str(len(mails)) + ' new')
    print (mails[0]['sender'] + ' - ' + mails[0]['title'])
    print (mails[1]['sender'] + ' - ' + mails[1]['title'])
    Last edited by spupy (2015-01-28 14:00:56)

  • [SOLVED] error when execute a python script in home partition

    Friends,
       After of install the Arch in my notebook (note: "/" and "/home" in separated partition) if I open a terminal/shell and try execute a python program/script in the /home partition I receive many erros and the program don't run:
    [leandro@professionalit ~]$ alacarte
    'import site' failed; use -v for traceback
    Traceback (most recent call last):
    File "/usr/bin/alacarte", line 22, in <module>
    from Alacarte.MainWindow import MainWindow
    ImportError: No module named Alacarte.MainWindow
    [leandro@professionalit ~]$
    [leandro@professionalit ~]$ dropbox start
    'import site' failed; use -v for traceback
    Traceback (most recent call last):
    File "/usr/bin/dropbox", line 26, in <module>
    import optparse
    File "/usr/lib/python2.6/optparse.py", line 75, in <module>
    import sys, os
    File "os.py", line 2, in <module>
    import socket
    File "/usr/lib/python2.6/socket.py", line 92, in <module>
    __all__.extend(os._get_exports_list(_socket))
    AttributeError: 'module' object has no attribute '_get_exports_list'
    But, if I go to another partition, for example, the folder opt in partition / (/opt) and try execute the program it run OK.
    Any idea ?
    Best regards,
    Leandro.
    Last edited by LeandroTiger (2010-05-21 23:02:29)

    [leandro@professionalit ~]$ pwd
    /home/leandro
    [leandro@professionalit ~]$ python
    'import site' failed; use -v for traceback
    Python 2.6.5 (r265:79063, Apr 1 2010, 05:22:20)
    [GCC 4.4.3 20100316 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> print sys.path
    ['', '', '/usr/lib/openoffice/basis-link/program/', '/usr/lib/python26.zip', '/usr/lib/python2.6/', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload']
    >>> import site
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.6/site.py", line 62, in <module>
    import os
    File "os.py", line 2, in <module>
    import socket
    File "/usr/lib/python2.6/socket.py", line 92, in <module>
    __all__.extend(os._get_exports_list(_socket))
    AttributeError: 'module' object has no attribute '_get_exports_list'
    >>> import Alacarte
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named Alacarte
    >>>

  • [solved]libgtop 2.30 broke g15stats, what do I do?

    Libgtop 2.30 broke g15stats I really want to fix it and don't mind digging my hands a little through the source code to do it, I just have little idea what to do with the code (as in what lines to look for)
    Long story short:
    #g15stats
    g15stats: error while loading shared libraries: libgtop-2.0.so.7: cannot open shared object file: No such file or directory
    it is my understanding that this file is now called libgtop-2.0.so.10, but symlinking it to libgtop-2.0.so.7 did me no good.
    So how do I fix this?
    Edit: Silly me, I found out that the package worked fine if I installed it with yaourt. I assume I just had to recompile it, but this is weird because I had already done this, perhaps I needed to have the linux-headers installed for it to work? what was the catch?
    I suspect I just had to compile it again.
    Last edited by rabcor (2014-06-11 12:10:21)

    Libgtop 2.30 broke g15stats I really want to fix it and don't mind digging my hands a little through the source code to do it, I just have little idea what to do with the code (as in what lines to look for)
    Long story short:
    #g15stats
    g15stats: error while loading shared libraries: libgtop-2.0.so.7: cannot open shared object file: No such file or directory
    it is my understanding that this file is now called libgtop-2.0.so.10, but symlinking it to libgtop-2.0.so.7 did me no good.
    So how do I fix this?
    Edit: Silly me, I found out that the package worked fine if I installed it with yaourt. I assume I just had to recompile it, but this is weird because I had already done this, perhaps I needed to have the linux-headers installed for it to work? what was the catch?
    I suspect I just had to compile it again.
    Last edited by rabcor (2014-06-11 12:10:21)

  • [solved] Question about Quotes in Shell-Script

    I searched for a way to rename my music album folders strictly to the format '<artist> - <album> (<year>)'. I couldn't archieve this with KRename and didn't find an alternative way so i tried to script it. It's really bad i know, but it works for me. I usually use it to rename a bunch of folders in a zsh for loop 'for i in *; dirn $i | tee -a rename.sh'
    The Problem now is some albums have " Quotes in it so the Script fails (Line 56).
    http://pastebin.com/rePQev61
    Maybe someone here can enlighten me how to get folders like these right in the script:
    David Bowie - "Heroes" (1977)
    Portugal. The Man - Waiter: "You Vultures!" (2006)
    The Crickets - The "Chirping" Crickets (2004)
    The Long Blondes - "Couples" (2008)
    Last edited by modulation (2010-12-11 09:05:49)

    I'm not sure i get this. $newdir is the corrected name for the album folder. I already strip invalid chars in line 47 (sed -e 's/[|\<>%?^:*\/]/_/g'). But i've trouble with the output of the rename command.
    I'd like it to output something like:
    mv 'crinckets_the_chiping' 'The Crickets - The "Chirping" Crickets (2004)'
    so that the newdir really contains the "-Quotes.

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

  • [SOLVED]A simple question about bash scripting

    Just for fun, I thought I'd try making Arch as "parent friendly" as possible (i.e., easy to use once set up).  I've already made a nifty little "system maintenance" script that presents you with a "select" bash menu, with options being "Install, Remove, Update [Without AUR, with AUR, abs, exit], Search, Install and Search (using Yaourt), and exit"
    That works wonderfully, and it only requires typing "sm" into the terminal.
    But just to make it yet *more* "parent friendly", I thought I'd make a .desktop file.
    This is the problem.
    I want the shortcut to essentially open up the script in a terminal.  So it would have to execute, say, "xterm" and then open the "sm" script within the called terminal.
    I believe this would mean I need to either add something to my "sm" script or make a new script that opens terminal and calls sm.
    I'm sure this has an easy solution, but I'm a total amateur just having some fun.
    Any suggestions?
    Last edited by hwkiller (2010-07-13 00:32:48)

    I am not a 100% on .desktop files since I never use them.
    but if your command in the desktop file is something like
    xterm -e /path/to/your/sm/file
    that should work.
    EDIT: Bah too late !
    Last edited by Inxsible (2010-07-12 19:27:11)

Maybe you are looking for

  • Session variable not storing in custom trigger

    I have a custom trigger in which I want to store a session variable , so i can use the value in the insert transaction which happens after. But for some reason the session variable is not stored, resulting in the data not being stored. any clues woul

  • File Adapter Polling issue(Is there critical value of File size )?

    Hi I use File adapter as the Activation to initialize a BPEL process instance .The source data is a kind of Delimited file format.On my PC, when the file size is less than 4M ,everything works fine ,But when the size increased. The BPEL process will

  • UDF  missing return statement }

    Hi, I'm wondering how the missing return statement  error can be avoided in this code, I've tried all sorts of syntaxes but it just won't work: public String DetermineCostCenter(String KTOS,String KTOH,String FNR,String KST,Container container){ int

  • Old Imac G5

    Hi!After I reinstalled the original OSX 10.3 on my old Imac G5 20 inch. bought in2005, I can't open any applications and access my files. How do I fix that? Thanks! Michel D

  • How can I move the passwords folder on a external drive?

    Hello! I have a simple question: I do not want the passwords and filled forms data stored on my computer but rather on a flash drive. So, when I am done with the computer, I unplug the flash drive and take all sensitive data with me. How can I do it?