Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OwnCloud Desktop Folder Icon #28963

Closed
JochenHWezel opened this issue Sep 10, 2017 · 5 comments
Closed

OwnCloud Desktop Folder Icon #28963

JochenHWezel opened this issue Sep 10, 2017 · 5 comments

Comments

@JochenHWezel
Copy link

JochenHWezel commented Sep 10, 2017

To be more visible on the local system as owncloud folder, windows provides possibility to setup a folder with its own folder icon.

image

To enable such folder icon, Microsoft has published the article at https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102(v=vs.85).aspx

For windows systems, it's pretty simple

  1. Provide a folder icon (as .ico, .exe or .bmp)
  2. Provide a desktop.ini (recommended with file encoding UTF-8 or UTF-16 + system flag + hidden flag); IconFile and IconIndex are required, all other entries might be senseful
[.ShellClassInfo]
ConfirmFileOp=1
NoSharing=1
IconFile=C:\Program Files (x86)\ownCloud\owncloud.exe
IconIndex=0
InfoTip=OwnCloud sync folder
  1. Add the system attribute to the OwnCloud sync folder
attrib +s {folderpath}

Especially when syncing several owncloud targets, this feature might be very useful to find the right folder more fast

image

For our OwnCloud solution, I'd suggest the following

  1. OwnCloud sync client automatically provides a folder icon by default by auto-adding a desktop.ini file to new sync folder setups (for existing installations: add the missing desktop.ini file) + adding the system attribute to all the target file sync folders
  2. OwnCloud server admin can provide a default folder icon (desktop.ini file + referenced .ico file should not be set to hidden automatically because the sync client doesn't sync hidden files)
    2.1. by adding an .ico file + desktop.ini file to the template folder for new users or
    2.2. by sharing an .ico file + desktop.ini file from his root folder to all users
  3. User can setup his own icon (for his individual, local machine only) by opening a search icon file dialog in the owncloud client at position (1)
    image
  4. At position (2), the folder icon will be displayed as configured by steps 1 to 3

Additional notes

  • Another option might be to use the registry to setup a folder with an icon.
  • The owncloud sync client might be installed to alternative paths, that's why it might be required to use an environment variable targetting the path to owncloud.exe or to use the registry option mentioned above to configure the folder icon - but I haven't verified yet, that customization of the folder icon would still be possible. If no, then the sync client should update the folder icon in registry on every launch and watch out for a foldericon.ico in every sync folder; if the file is there, use that file as folder icon, else use the owncloud sync client's default icon

What needs to be done at minimum? / Expected efforts

  • Minimum: To allow point 2 from above immediately, the owncloud sync client just had to configure the folder as system folder (attrib +s folder).
  • Point 1 might require a little bit more coding (but should be little)
  • Point 3 inclusive button at (1) and icon displaying at (2) might require the most development since it requires GUI development.
@michaelstingl
Copy link

duplicate for owncloud/client#5295

@jturcotte
Copy link
Member

jturcotte commented Sep 11, 2017

Mostly fixed by owncloud/client#5955 and owncloud/client#6018 (will use the icon of owncloud.exe).

@JochenHWezel
Copy link
Author

The folder icon should also be shown at this place in systray context menu:
image

@JochenHWezel
Copy link
Author

Maybe it is useful for some guys looking for a workaround meanwhile:

I've created a desktop.init file (which is a desktop.ini file but points to my favorite .ico file; see also my sample a few messages above in this thread), my favorite .ico file and a .cmd (batch) file which can be started on every client which I use. All 3 files will be synced to all my several devices.

At every device, start the .cmd file and it will copy the desktop.init file into a desktop.ini file, make it hidden plus make the folder a system folder.
image

The .cmd file has got following content:

@echo off
if exist desktop.ini del /a desktop.ini
echo Writing desktop.ini with folder icon reference . . .
copy desktop.init desktop.ini
echo.
echo Hiding desktop.ini file to match the MS Windows standards . . .
attrib +h desktop.ini
echo Setting up current folder as system folder to activate folder icon setting . . .
attrib +s .
echo.
echo FINISHED! Please review above output for any errors
pause

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants