Re: open as root?
Posted: Wed Oct 28, 2009 12:40 am
freelY, I tried your fix and it launches pcmanfm from the menu entry but not as root.......
Code: Select all
#!/bin/sh
#-------------------------------------------------------
# Start program
export launchasroot='
<window title="Root Launcher" icon="/usr/share/icons/gnome/32x32/apps/file-manager.png" window-position="2" width-request="300">
<notebook labels="Launch as Root">
<frame>
<hbox>
<button>
<input file>"/usr/share/icons/gnome/32x32/apps/file-manager.png"</input>
<action>gksu -l /usr/bin/pcmanfm &</action>
</button>
<text use-markup="true" width-chars="17">
<label>"File Manager Superuser Mode"</label>
</text>
</hbox>
</frame>
</notebook>
</window>
'
gtkdialog --program=launchasroot
unset launchasroot
Code: Select all
#!/bin/sh
#-------------------------------------------------------
# Start program
export launchasroot='
<window title="Root Launcher" icon="/usr/share/icons/gnome/32x32/apps/file-manager.png" window-position="2">
<vbox>
<notebook label="Launch as Root ">
<vbox>
<frame>
<hbox>
<button>
<input file>"/usr/share/icons/file_tools_section.png"</input>
<action>gksu -l /usr/bin/pcmanfm &</action>
</button>
<text use-markup="true" width-chars="17">
<label>"File Manager Superuser Mode"</label>
</text>
</hbox>
</vbox>
</window>
'
gtkdialog --program=launchasroot
unset launchasroot
Code: Select all
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=PCMan Root
Categories=Application;System;Utility;Core;GTK;
Name[zh_TW]=檔案總管
Name[fi]=PCMan-tiedostonhallinta
Name[et]=PCMan failihaldur
Name[ja]=PCMan ファイルマネージャ
Exec=gksu /usr/bin/pcmanfm
Icon=pcmanfm
StartupNotify=true
Type=Application
Terminal=false
MimeType=x-directory/normal;inode/directory;
GenericName=File Manager
GenericName[ru]=Файловый менеджер
GenericName[zh_TW]=檔案管理程式
GenericName[fi]=Tiedostonhallinta
GenericName[et]=Failihaldur
GenericName[ja]=ファイルマネージャ
Comment=Browse the file system and manage the files
Comment[zh_TW]=瀏覽檔案系統及管理檔案
Comment[fi]=Selaa tiedostojärjestelmää ja hallitse tiedostoja
Comment[et]=Lehitse failisüsteemi ja halda faile
Comment[ja]=ファイルシステムをブラウズし、ファイルの管理を行います
Code: Select all
[Desktop Entry]
Name=Launch as Root
Exec=/usr/bin/launchasroot
Comment=Root Launcher
Icon=file-manager.png
Terminal=false
Type=Application
StartupNotify=true
Categories=Application;System;Utility;Core;GTK;
OnlyShowIn=LXDE;