Skip to content

Instantly share code, notes, and snippets.

@higebu
Last active December 13, 2015 19:49

Revisions

  1. higebu revised this gist Feb 17, 2013. 1 changed file with 10 additions and 12 deletions.
    22 changes: 10 additions & 12 deletions mintMenu-plugins-execute.py.patch
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,11 @@
    --- /usr/lib/linuxmint/mintMenu/plugins/execute.py.old 2012-11-03 00:01:32.000000000 +0900
    +++ /usr/lib/linuxmint/mintMenu/plugins/execute.py 2013-02-16 14:01:40.785256405 +0900
    @@ -5,6 +5,10 @@
    def RemoveArgs(Execline):
    NewExecline = []
    Specials=["\"%c\"", "%f","%F","%u","%U","%d","%D","%n","%N","%i","%c","%k","%v","%m","%M", "-caption", "/bin/sh", "sh", "-c", "STARTED_FROM_MENU=yes"]
    + Execline = ''.join( Execline )
    + for special in Specials:
    + Execline = Execline.replace( special,'' )
    + Execline = Execline.split()
    for elem in Execline:
    elem = elem.replace("'","")
    elem = elem.replace("\"", "")
    +++ /usr/lib/linuxmint/mintMenu/plugins/execute.py 2013-02-17 10:55:17.443476511 +0900
    @@ -15,7 +15,7 @@

    # Actually execute the command
    def Execute( cmd ):
    - if isinstance( cmd, str ):
    + if isinstance( cmd, str ) or isinstance( cmd, unicode ):
    if (cmd.find("/home/") >= 0) or (cmd.find("su-to-root") >= 0) or (cmd.find("\"") >= 0):
    print "running manually..."
    os.system(cmd + " &")
  2. higebu created this gist Feb 16, 2013.
    1 change: 1 addition & 0 deletions mintMenu-no-such-file-or-directory-error.log
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    [Errno 2] No such file or directory
    13 changes: 13 additions & 0 deletions mintMenu-plugins-execute.py.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    --- /usr/lib/linuxmint/mintMenu/plugins/execute.py.old 2012-11-03 00:01:32.000000000 +0900
    +++ /usr/lib/linuxmint/mintMenu/plugins/execute.py 2013-02-16 14:01:40.785256405 +0900
    @@ -5,6 +5,10 @@
    def RemoveArgs(Execline):
    NewExecline = []
    Specials=["\"%c\"", "%f","%F","%u","%U","%d","%D","%n","%N","%i","%c","%k","%v","%m","%M", "-caption", "/bin/sh", "sh", "-c", "STARTED_FROM_MENU=yes"]
    + Execline = ''.join( Execline )
    + for special in Specials:
    + Execline = Execline.replace( special,'' )
    + Execline = Execline.split()
    for elem in Execline:
    elem = elem.replace("'","")
    elem = elem.replace("\"", "")