[Gambas-user] Issue 400 in gambas: Exec of gksudo doesn't work if filname parameter contains a space

gambas at ...2524... gambas at ...2524...
Sun Feb 3 11:57:35 CET 2013


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 400 by john.aaron.rose at ...626...: Exec of gksudo doesn't work if  
filname parameter contains a space
http://code.google.com/p/gambas/issues/detail?id=400

Using Ubuntu 32 bit Precise & nemh's Gambas3 ppa (Gambas 3.3.4), the  
following works OK:
    sPath = "/home/john/Temp orary/q w.desktop"
    sLogPath = "/home/john/Temporary/Log.txt"
    Wait 1
    sCommand = "gksudo " & "desktop-file-install " & " " &
               Shell$(sPath) &
               " >/dev/null 2>" & Shell$(sLogPath)
    hProcess = Shell sCommand
    Do
      Wait 0.1
    Loop Until hProcess.State <> Process.Running

But the following comes back with the help lines for gksudo i.e. where
it does not understand the rest:
    sPath = "/home/john/Temp orary/q.desktop"
    Exec ["gksudo", "desktop-file-install", sPath] Wait
PS If I change sPath to not have a space in the directory (e.g. using
Temporary) but having a space in the filename (e.g. q w.desktop) then I
get the same.
PPS I've also tried Exec ["gksudo", "desktop-file-install", sPath] Wait  
which gives an error about a child process.

Attachments:
	MaintainDesktopConfigurationFiles.tar.gz  21.9 KB





More information about the User mailing list