[Geoserver-devel] installer fun

I have been chatting with Mike offline (since I was sending him
pictures of some visual glitches). And am dragging a topic back to the
list for discussion...

One of the problems with running geoserver on Vista / Windows 7 is the
location of the data directory in "Program Files" (it results in a
bunch of strange consequences[1]). As long as Mike is producing a new
installer could we make use of the "App Data" location?

Jody
[1] Any attempt to modify a file in program files suffers an operating
system slight of hand and the modifications end up in the
AppData/Roaming folder

I'm fine with this, personally.

To add to the discussion, the "Application Data"/"AppData" folder is a subfolder of a user's home directory where user-specific editable program files go. This is akin to the "dot folders" that exist in UNIX home directories. Now, since this new installer allows for both manual (per user) and service (per system) install, the suggestion would be to put the data_dir in the user's AppData folder when running manually and the All Users AppData folder when installing as a service. Explicitly:

2000/XP/2003:
Manual = C:\Documents and Settings\[user]\Application Data\GeoServer
Service = C:\Documents and Settings\All Users\Application Data\GeoServer

7 (Vista?/2008?):
Manual = C:\Users\[user]\AppData\Roaming\GeoServer *
Service = C:\ProgramData\GeoServer

This looks more complicated than it actually is, but is slightly more involved than the standard drop into the ProgFiles directory. It is probably the most appropriate place for a data directory, though, so our defaults should probably match that. (And no worries, the installer writes a shortcut to the data directory in the Start Menu!)

Any Windows users have any thoughts?

* Jody, this is the default %APPDATA% environment variable, so evidently, things would end up in the Roaming folder anyway...

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

Jody Garnett wrote:

I have been chatting with Mike offline (since I was sending him
pictures of some visual glitches). And am dragging a topic back to the
list for discussion...

One of the problems with running geoserver on Vista / Windows 7 is the
location of the data directory in "Program Files" (it results in a
bunch of strange consequences[1]). As long as Mike is producing a new
installer could we make use of the "App Data" location?

Jody
[1] Any attempt to modify a file in program files suffers an operating
system slight of hand and the modifications end up in the
AppData/Roaming folder

The only problem I can see with this is that by default (on Vista anyway) AppData is a “hidden” directory so your basic user will not be able to see their data folder to drop shapefiles etc in to. I hadn’t noticed this problem because I always install GeoServer into my home directory anyway (in part due to this problem in the past).

Ian

Hi Ian. That is a valid consideration. The new installer does put a shortcut in the Start Menu to that folder, but you're right that the inability to simply navigate to the data_dir via Explorer could be a bit awkward. Do you have an alternate placement suggestion, or do you think we should leave things as is?

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

Ian Turton wrote:

The only problem I can see with this is that by default (on Vista anyway) AppData is a "hidden" directory so your basic user will not be able to see their data folder to drop shapefiles etc in to. I hadn't noticed this problem because I always install GeoServer into my home directory anyway (in part due to this problem in the past).

Ian

On Tue, Jan 12, 2010 at 11:56 AM, Mike Pumphrey <mike@anonymised.com> wrote:

Hi Ian. That is a valid consideration. The new installer does put a
shortcut in the Start Menu to that folder, but you're right that the
inability to simply navigate to the data_dir via Explorer could be a bit
awkward. Do you have an alternate placement suggestion, or do you think we
should leave things as is?

I guess $HOME/Geoserver_data would probably work best across most
systems - the user can find it easily, has write permission and you
could put a readme in the directory telling them how to change
$GEOSERVER_DATADIR to point to an new location if they want to change
it.

Ian

--
Ian Turton

Sent from State College, PA, United States

Ian Turton ha scritto:

On Tue, Jan 12, 2010 at 11:56 AM, Mike Pumphrey <mike@anonymised.com> wrote:

Hi Ian. That is a valid consideration. The new installer does put a
shortcut in the Start Menu to that folder, but you're right that the
inability to simply navigate to the data_dir via Explorer could be a bit
awkward. Do you have an alternate placement suggestion, or do you think we
should leave things as is?

I guess $HOME/Geoserver_data would probably work best across most
systems - the user can find it easily, has write permission and you
could put a readme in the directory telling them how to change
$GEOSERVER_DATADIR to point to an new location if they want to change
it.

Hmmm... except in some systems (Unix) a user can be there without having
a home, and that is especially true for users that run services.

However, this is the Windows installer. Can a user that runs services
exist without a home there?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Tue, Jan 12, 2010 at 12:09 PM, Andrea Aime <aaime@anonymised.com> wrote:

Ian Turton ha scritto:

On Tue, Jan 12, 2010 at 11:56 AM, Mike Pumphrey <mike@anonymised.com> wrote:

Hi Ian. That is a valid consideration. The new installer does put a
shortcut in the Start Menu to that folder, but you're right that the
inability to simply navigate to the data_dir via Explorer could be a bit
awkward. Do you have an alternate placement suggestion, or do you think we
should leave things as is?

I guess $HOME/Geoserver_data would probably work best across most
systems - the user can find it easily, has write permission and you
could put a readme in the directory telling them how to change
$GEOSERVER_DATADIR to point to an new location if they want to change
it.

Hmmm... except in some systems (Unix) a user can be there without having
a home, and that is especially true for users that run services.

However, this is the Windows installer. Can a user that runs services
exist without a home there?

I hadn't thought of people actually doing the install as
administrator. The problems that my students run in to are usually
related to only having user privileges on the machine. But I think
vista always makes you a home directory when you create an account -
for example posgres has a user folder on my vista machine.

Ian
--
Ian Turton

Sent from State College, PA, United States

Hmmm... except in some systems (Unix) a user can be there without having
a home, and that is especially true for users that run services.

However, this is the Windows installer. Can a user that runs services
exist without a home there?

Right now the user running the GeoServer service is the built-in LocalSystem, and correct, it doesn't have a home directory. But we could use "Users\Public" (aka "Documents and Settings\All Users") as a home for that case.

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

Andrea Aime wrote:

Ian Turton ha scritto:

On Tue, Jan 12, 2010 at 11:56 AM, Mike Pumphrey <mike@anonymised.com> wrote:

Hi Ian. That is a valid consideration. The new installer does put a
shortcut in the Start Menu to that folder, but you're right that the
inability to simply navigate to the data_dir via Explorer could be a bit
awkward. Do you have an alternate placement suggestion, or do you think we
should leave things as is?

I guess $HOME/Geoserver_data would probably work best across most
systems - the user can find it easily, has write permission and you
could put a readme in the directory telling them how to change
$GEOSERVER_DATADIR to point to an new location if they want to change
it.

Hmmm... except in some systems (Unix) a user can be there without having
a home, and that is especially true for users that run services.

However, this is the Windows installer. Can a user that runs services
exist without a home there?

Cheers
Andrea

This looks more complicated than it actually is, but is slightly more
involved than the standard drop into the ProgFiles directory. It is
probably the most appropriate place for a data directory, though, so our
defaults should probably match that. (And no worries, the installer writes
a shortcut to the data directory in the Start Menu!)

Any Windows users have any thoughts?

Thanks for taking this up - it results in a maddening set of problems
when UAC is turned on. Ian commented on dropping shapefiles in a
directory; after the shadow copy is made (if you edit a shapefile) you
cannot really "remove" a modified shapefile unless you hunt down both
copies ... very frustrating to explain.

* Jody, this is the default %APPDATA% environment variable, so evidently,
things would end up in the Roaming folder anyway...

understood :slight_smile:

If you would like to give this a go I am available to test this week;
indeed I am very impressed with your installer and would like to
update the udig training materials to use it.

If you would like to give this a go I am available to test this week;

Hi Jody. From the conversation, I don't think we have yet determined an optimal position for the data_dir yet. To recap:

#1: Keep as is (leave in ProgFiles)
Pro: It's always been this way
Con: Not great on Vista/7

#2: Move to %APPDATA% or Common AppData
Pro: Probably the most sensible place from an OS perspective
Con: Folders are hidden by default

#3: Move to %USERPROFILE% or AllUsers/Public
Pro: Visible folder, better permissions
Con: Slightly odd place to put Program Data

What do you think?

indeed I am very impressed with your installer and would like to
update the udig training materials to use it.

Thanks! :slight_smile:

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

Jody Garnett wrote:

This looks more complicated than it actually is, but is slightly more
involved than the standard drop into the ProgFiles directory. It is
probably the most appropriate place for a data directory, though, so our
defaults should probably match that. (And no worries, the installer writes
a shortcut to the data directory in the Start Menu!)

Any Windows users have any thoughts?

Thanks for taking this up - it results in a maddening set of problems
when UAC is turned on. Ian commented on dropping shapefiles in a
directory; after the shadow copy is made (if you edit a shapefile) you
cannot really "remove" a modified shapefile unless you hunt down both
copies ... very frustrating to explain.

* Jody, this is the default %APPDATA% environment variable, so evidently,
things would end up in the Roaming folder anyway...

understood :slight_smile:

If you would like to give this a go I am available to test this week;
indeed I am very impressed with your installer and would like to
update the udig training materials to use it.

Either of the last two options would be an improvement.

Ian did mention the idea of #2 with a short cut for people to load
data into? If you think you can do that it would make the most sense;
if you run into any trouble go for option #3.

By "not great for vista / 8" I literally mean we are violating the
operating system restrictions and it is bending over backwards to help
us not be broken. You may be able to run geoserver with heightened
security credentials in order to write into program files - but it is
not something we are doing right now?

Jody

On Thu, Jan 14, 2010 at 2:50 AM, Mike Pumphrey <mike@anonymised.com> wrote:

If you would like to give this a go I am available to test this week;

Hi Jody. From the conversation, I don't think we have yet determined an
optimal position for the data_dir yet. To recap:

#1: Keep as is (leave in ProgFiles)
Pro: It's always been this way
Con: Not great on Vista/7

#2: Move to %APPDATA% or Common AppData
Pro: Probably the most sensible place from an OS perspective
Con: Folders are hidden by default

#3: Move to %USERPROFILE% or AllUsers/Public
Pro: Visible folder, better permissions
Con: Slightly odd place to put Program Data

What do you think?

indeed I am very impressed with your installer and would like to
update the udig training materials to use it.

Thanks! :slight_smile:

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

Jody Garnett wrote:

This looks more complicated than it actually is, but is slightly more
involved than the standard drop into the ProgFiles directory. It is
probably the most appropriate place for a data directory, though, so our
defaults should probably match that. (And no worries, the installer
writes
a shortcut to the data directory in the Start Menu!)

Any Windows users have any thoughts?

Thanks for taking this up - it results in a maddening set of problems
when UAC is turned on. Ian commented on dropping shapefiles in a
directory; after the shadow copy is made (if you edit a shapefile) you
cannot really "remove" a modified shapefile unless you hunt down both
copies ... very frustrating to explain.

* Jody, this is the default %APPDATA% environment variable, so evidently,
things would end up in the Roaming folder anyway...

understood :slight_smile:

If you would like to give this a go I am available to test this week;
indeed I am very impressed with your installer and would like to
update the udig training materials to use it.