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

SaveDialog not showing $HOME directory #447

Open
pcardona34 opened this issue Dec 23, 2024 · 11 comments
Open

SaveDialog not showing $HOME directory #447

pcardona34 opened this issue Dec 23, 2024 · 11 comments

Comments

@pcardona34
Copy link

Hi Sergiii,

Context :

Debian 12.8
Linux NEXTPI 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

  • Behaviour:
    When trying to save a new document (UNTITLED.rtf) whithin TextEdit
    menu: "Document / Save..."

In the Dialog Box :

  1. The User Home Icon (House) does not change Directory to $HOME;
  2. In the root list, only are there three paths available :
  • /Applications
  • /Developper
  • /Library

So the $HOME directory is not available and You cannot save the unsaved file.

  • Console maybe usefull messages:

2024-12-23 23:41:30.604 TextEdit[1796:1796] Creating a default printer since no default printer has been set in CUPS.
2024-12-23 23:41:30.627 TextEdit[1796:1796] Warning: (NSLayoutManager) -[NSLayoutManager setHyphenationFactor:] not implemented
2024-12-23 23:45:03.147 TextEdit[1796:1796] Error while establishing connection <<NSNibOutletConnector: 0x556b6d7f78> src= h=&-- v=--& <NSButton: 0x556ba6c6d8> f={x = 228; y = 6; width = 71; height = 27} b={x = 0; y = 0; width = 71; height = 27} dst=<NSFormCell: 0x556b924d18> label=nextKeyView>: [NSView -setNextKeyView:] passed non-view object <NSFormCell: 0x556b924d18>
2024-12-23 23:45:03.148 TextEdit[1796:1796] awakeFromNib
2024-12-23 23:45:03.161 TextEdit[1796:1796] NXTSavePanel: _selectTextInColumn:-1

@pcardona34
Copy link
Author

P.S.: It is the same for the Open File Dialog.

@trunkmaster
Copy link
Owner

@pcardona34 works for on Fedora 41 and Debian 12. By default Open/Save dialog displays home directory on its first appear.

What is your user home directory? What is inital location displayed in Save dialog? What do expect to see?

@pcardona34
Copy link
Author

Hi Sergii,

Thank You for your answer.

In Packaging/install_environment.sh
At line 106, in the add_user() function, the adduser command is called with options (-b, etc) not available within debian context of this command.
So my mistake was to comment these options and run the installation, so my home base directory has been: /home.

Wondering again about the -b /Users option, and after reading the OpenStep specs about /Users basename of the home directory, I realised this environment was mandatory.

Finally, I understood that the convenient command should be useradd instead of adduser at line 106 for a debian installation.
See: https://manpages.debian.org/bullseye/passwd/useradd.8.fr.html

The two commands: adduser and useradd exist on Debian, but those do not accept the same options.

So I shall try a clean installation again from a clean fork, with that modified, so I should have the good basename '/Users' VS '/home'...

Maybe the other issues I reported could also be concerned by this bad home base path. I shall tell You as soon as possible.

@pcardona34
Copy link
Author

Hi Sergii,

I tried again with a fresh install from source (see issue #448 for the detailed process).

Even I modified the line 106 in Packaging/install_environment.sh to obtain a /Users base home directory, it seems that this function was never called while You install NextSpace from Packaging/Sources scripts.

So I reproduced my first attempt : my $HOME var was again /home/patrick (not /Users/patrick) and it still never shows in Open or Save Dialogs.
The initial location of these File Windows is always the System root /, And only these three folders are there:

  • /Applications
  • /Developper
  • /Library

Maybe I am missing one step in the install process ? Can You confirm I sould have /Users and not /home as the user home base directory ?

@trunkmaster
Copy link
Owner

trunkmaster commented Jan 8, 2025

Hi Patrick,

/Users base home directory is not a requirement, any directory is good. To chek if you setup is correct - if you open Terminal application what is the shell's default directory (you may check it with pwd command)? What is $HOME variable value (echo $HOME)?

Next issue: Open/Save dialogs in NextSpace uses "Show Hidden Files" setting. If you want to see all files and directories you may set this setting in Preferences' application "Expert Preferences" section. I hope that helps.

image

@pcardona34
Copy link
Author

pcardona34 commented Jan 11, 2025

Hi Sergii,

Thank You for this help that makes me go forward.
echo $HOME give me the right path: /home/patrick in the Terminal app context.

And also as I checked the option "Show Hidden Files" in "Preferences/Expert Preferences", I could get home path within Open or Save Dialogs within TextEdit.

But this is also showing all dot files in the FileView of the Workspace, those are sensible config files in the *NIX world and I presume this should not be in a current way.

Other clues:

  1. If I build other apps (e.g. NoteBook.app, StepSync.app) only at a user stage, then opening from $HOME/Applications folder : the "Show Hidden Files" checked is not efficient : again, the $HOME path is missing in the context of theses apps while it is solved within the native NextSpace apps. So it seems something is broken between NextSpace apps and classic GNUstep apps. I also noticed that I did not have a rule to sudo make install for installing those apps in the System context. Maybe I should source a devel env before compiling, that does not seem available in my user context.

  2. When building the same apps on the same machine (pi 400 and debian 12 - aarch64 ) but on GS-Desktop (Onflapp alternative with GWorkspace) they do have the $HOME path available.

@pcardona34
Copy link
Author

P.S.: Please, Sergii, could You confirm that, following the Readme.md in Packaging/Sources We DO NOT need to run sh nextspace_install.sh after sudo sh setup_user_home.sh and sh setup_user_home.sh ?

@trunkmaster
Copy link
Owner

Hi Sergii,

Thank You for this help that makes me go forward. echo $HOME give me the right path: /home/patrick in the Terminal app context.

And also as I checked the option "Show Hidden Files" in "Preferences/Expert Preferences", I could get home path within Open or Save Dialogs within TextEdit.

But this is also showing all dot files in the FileView of the Workspace, those are sensible config files in the *NIX world and I presume this should not be in a current way.

That's how it was designed.

Other clues:

1. If I build other apps (e.g. NoteBook.app, StepSync.app) only at a user stage, then opening from $HOME/Applications folder : the "Show Hidden Files" checked is not efficient : again, the $HOME path is missing in the context of theses apps while it is solved within the native NextSpace apps. So it seems something is broken between NextSpace apps and classic GNUstep apps. 

Let me clarify a situation:

  1. NextSpace Open/Save dialogs are own implementations, so look and feel differs and that's why you see differences. Nothing is broken - it's normal behaviour.
  2. If you have some problems in GNUstep (NoteBook, StepSync) Open/Save dialogs then problem is out of NextSpace project's scope.

I also noticed that I did not have a rule to sudo make install for installing those apps in the System context.

Please ask appropriate developers.

Maybe I should source a devel env before compiling, that does not seem available in my user context.

Source /etc/profile.d/nextspace.sh in your shell to setup all needed environment variables (it's installed by Packaging/Sources/3_build_core.sh script).

2. When building the same apps on the same machine  (pi 400 and debian 12 - aarch64 ) but on GS-Desktop (Onflapp alternative with GWorkspace) they do have the $HOME path available.

I don't have problems on my different setups (Fedora, Ubuntu) like yours.
How do you start the Workspace?

@trunkmaster
Copy link
Owner

P.S.: Please, Sergii, could You confirm that, following the Readme.md in Packaging/Sources We DO NOT need to run sh nextspace_install.sh after sudo sh setup_user_home.sh and sh setup_user_home.sh ?

Confirm

@pcardona34
Copy link
Author

Hi Sergii,

I don't have problems on my different setups (Fedora, Ubuntu) like yours.
How do you start the Workspace?

In the last tests, I started the Workspace from Login.app .

But I think that this issue is concerned by design.

As I tried to point it out in my Draft PR, the fact is that the following file has an influence on all applications, native from NextSpace as classic GNUtep ones:

Core/os_files/dot_hidden

Admittedly We have the choice there to hide '/home' and '/media' by design, but doing that, We do not allow opening or saving files with classic GNUstep apps, even with the checked Show Hidden Files in Advanced Preferences, because this option is only related to native NextSpace apps.

  • Did You tried this with any classic GNUstep app ? If the Open/Save Dialogs shows $HOME in your context, so what hidden directories are now in your /.hidden file ?

  • And is your $HOME base directory set to /home ou /Users ? Because the second is never listed in Core/os_files/dot_hidden and then in /.hidden after installation. This could make a difference.

  • So, if You should not consider to add GNUstep classic in your Desktop, it is not an issue. But if You do, so it is worth knowing.

@trunkmaster
Copy link
Owner

Hi Patrick,

Some time ago I've decided to follow this approach in NextSpace: hidden directories (listed in /.hidden file) are not shown in File Viewer as well as Open/Save dialogs. Although if you click on home directory icon in File Viewer's shelf (icon with home and tree) home directory appears in browser path. The same should work for mounted media (USB, CD/DVD etc).

This works for Workspace's File Viewer but not for Open/Save dialogs: both NextSpace (my bad) and GNUstep (it's not designed to work that way).

You're right: I need to make a decision but it's quite obvious - remove "home", "Users" and "media" from ./hidden file to work for vanilla GNUstep applications as well as for NextSpace applications which use DesktopKit version of Open/Save dialogs.

Thank you for pointing to this issue. I'll fix it later and keep you informed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants