B4J Tutorial Ubuntu Sudo File Explorer

Here is a nice trick for those of you that develop with B4J for Ubuntu Linux which I found searching for my needs. This code runs a File explorer with priviledges of root. All you have to do is open Text Editor and paste in it this text. Then select filter 'All files' and save as f.e. sudo-files.desktop in the desktop folder. Be aware that the .desktop is needed. Running from this you can change the rights of files on the run without chmod in terminal.

Ubuntu Sudo File Explorer:
[Desktop Entry]
Type=Application
Name=sudo File Manager
Icon=system-file-manager
GenericName=File Manager
Comment=Browse the file system using sudo
Categories=FileManager;Utility;Core;GTK;
Exec=sudo open .
StartupNotify=true
Terminal=true
MimeType=x-directory/normal;inode/directory;
 

hatzisn

Well-Known Member
Licensed User
Longtime User
I imagine this is a bit more generic:

Bash:
Exec=gksudo xdg-open .

Thanks. I will try it a.s.a.p. I am not a linux guy but I know how to use Google :):):):)
 
Last edited:

Sandman

Expert
Licensed User
Longtime User
Here are two pages that might give you some starting information, good luck :)



Edit: Seems gksudo isn't available in the Ubuntu repos anymore, I haven't really looked into the reason. This thread probably has more info:

 
Top