Skip to content

GUI does not allow selecting of KSP in "hidden" .folders under Linux #894

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

Closed
netkan-bot opened this issue May 21, 2015 · 9 comments
Closed
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux ★★☆

Comments

@netkan-bot
Copy link
Member

Issue by JamesFaraday
Saturday Jan 10, 2015 at 23:39 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT
Originally opened as https://github.com/KSP-CKAN/CKAN-support/issues/58


(I feel like I am missing something, but have searched and gone over existing bugs I can't find a solution. Sorry if I missed something)

Steam on Ubuntu by default installed KSP in "home/[username]/.local/share/Steam/steamapps/common/Kerbal Space Program". Notice that 'local' is a hidden folder. CKAN does not auto detect this location. Furthermore, the file browser does not seem to support selecting hidden folders. This combo makes it impossible to direct CKAN to the KSP install.

I have rebooted and re-downloaded CKAN to no avail. I am on a hours old fresh install of Ubuntu 14.04 with the latest Steam and KSP version.

Suggested fixes.

  1. If possible, enable the file browser to see hidden folders.
  2. Allow the user to manually enter the path to KSP in plain text.
  3. Look for KSP install in said location as it is the default install location for Steam on Ubuntu.
@netkan-bot
Copy link
Member Author

Comment by AlexanderDzhoganov
Saturday Jan 10, 2015 at 23:46 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Hey, you can easily add a KSP install from the command- line. Try:

ckan.exe ksp add default "<path to KSP>"
ckan.exe ksp default default

@netkan-bot
Copy link
Member Author

Comment by JamesFaraday
Sunday Jan 11, 2015 at 00:19 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


So the commands posted above need to be prefixed with 'mono', at least so far as Ubuntu is concerned. Other then that, they work fine. I still suggest some gui based way of locating a KSP install in a hidden folder. For now, mentioning this problem and solution on the forum/wiki would be good.

@netkan-bot
Copy link
Member Author

Comment by hakan42
Sunday Jan 11, 2015 at 00:31 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


Beg your pardon, but is the handling of hidden folders not part of the operating system?

The best we could do would be a hint in the wiki about how to configure some of the more widely used file browsers, but especially on Linux, you can never cover all of them...

@netkan-bot
Copy link
Member Author

Comment by JamesFaraday
Sunday Jan 11, 2015 at 14:26 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


The default file browser on Ubuntu does give you a way to see hidden folders. However, the file browser CKAN pops up to select the KSP install location does not use it. It seems as though it is using a mono specific one as the browser looks quite different.

@netkan-bot
Copy link
Member Author

Comment by amedee
Saturday Jan 17, 2015 at 10:59 GMT # Sample: Friday Sep 13, 2013 at 22:58 GMT


This is NOT an issue in CKAN or in Linux, but an issue in .NET/Mono. However a workaround inside CKAN is possible. Google for "show hidden files in mono" turns up some interesting results, like this one:

mono's (2.10.1 and git) System.IO.Directory.EnumerateFiles() does show
hidden or read-only files; MS .NET does show all files.

The reason for this is that read-only/hidden files do not have the FileAttributes.Normal bit set,
which comes from the Win32 API (my emphasis):

FILE_ATTRIBUTE_NORMAL:
A file that does not have other attributes set.
This attribute is valid only when used alone."

So:
normal -> FileAttributes.Normal
ro -> FileAttributes.ReadOnly
hidden -> FileAttributes.Hidden
hidden/ro -> FileAttributes.Hidden | FileAttributes.ReadOnly

but:
directory/ro -> FileAttributes.Directory | FileAttributes.ReadOnly

(Which seems dumb: 'Normal' is the file type, like 'Directory' or 'Device'; 'ReadOnly', 'Hidden',
'System', 'Encrypted' are additional attributes. But that's beside the point.)

http://lists.ximian.com/pipermail/mono-list/2011-March/046708.html

I would suggest that development asks for further advice on StackOverflow and tags the question with Mono.

@pjf
Copy link
Member

pjf commented May 22, 2015

Our pre-1.0 releases of CKAN were able to locate steam installs under Linux just fine, so this represents two bugs:

  1. A regression in our code such that we're no longer find steam installs under Linux.
  2. An inability for users to navigate into . directories under Linux, even though these are commonplace and this functionality should be allowed.

Opening a new ticket for the first of these, making this the bug-tracking ticket or the second.

@pjf pjf added Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux ★★☆ labels May 22, 2015
@pjf pjf changed the title [ubuntu] Locating KSP install in hidden folder GUI does not allow selecting of KSP in "hidden" .folders under Linux May 22, 2015
@avalikarvamus
Copy link

I had same problem - but because reinstall of linux system. Previously Steam used .local folder structure (and its still present). So CKAN still automatically detects KSP there. But new Steam install uses .steam folder for its structure and this cannot be selected and wont be automatically detected.

@HebaruSan
Copy link
Member

Dot folders aren't shown in the list, but you can still select them by typing the folder name:

image

image

That seems like reasonable behavior for "hidden" folders in a file browser.

@politas
Copy link
Member

politas commented Aug 28, 2018

And then there's the workaround of creating a folder shortcut somewhere to bypass the hidden folder.

@politas politas closed this as completed Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI Linux Issues specific for Linux ★★☆
Projects
None yet
Development

No branches or pull requests

5 participants