Commit Graph

9 Commits

Author SHA1 Message Date
Grant Hollingworth
fa1f4254cb Remove obsolete help text for mate -n 2013-07-21 13:25:14 +02:00
Allan Odgaard
17ef6ef5d0 Use path::is_absolute instead of custom code 2013-03-14 10:14:45 +01:00
Allan Odgaard
e75e7ec8e5 Change text::format → std::to_string (C++11) 2013-02-08 11:20:34 +01:00
Allan Odgaard
216bcb61ac mate: don’t disable untitled document when called w/o files 2013-02-03 10:48:44 +01:00
Allan Odgaard
84587dccc9 mate: disable untitled document via user defaults
This is instead of setting an environment variable. Since there already is a user defaults setting for whether or not we want an untitled document created at startup, it seems nicer to have mate set that, instead of effectively introducing an alias for the setting.
2013-02-03 10:48:43 +01:00
Allan Odgaard
eb3e7dd8f2 Fix running mate via sudo
Since we now use the (numeric) user ID as part of TextMate’s named socket (to allow multiple users on the same system to each run an instance of TextMate), mate needs to know this.

Running ‘mate’ via ‘sudo’ has getuid() return zero (root), hence why we need to specifically handle this.
2012-08-31 23:16:39 +02:00
Allan Odgaard
d38308f6c8 Move ‘mate’ socket (back) to /tmp
We moved it to TMPDIR so that multiple instances of TextMate could run (for different users) but have since gotten a lot of reports about problems with this location. The short version is that ‘ls’ shows the socket exists (in TMPDIR), but stat’ing it or similar will fail.

To still allow different users to use mate side-by-side we add the user ID to the socket name.

Hopefully this closes issue #183.
2012-08-21 21:54:18 +02:00
Allan Odgaard
5d0682d317 Use user-specific temp directory for mate’s socket
We have TextMate create a named socket that ‘mate’ can use to contact the main application. Previously it was hardcoded to ‘/tmp/avian.sock’ which is bad on a multi-user system.

Placing it in the user’s temporary directory should ensure it doesn’t clash, yet still give us a predictable path (for mate to use).

Presently we maintain the old socket path as a link to the new location so that old versions of mate will still work.
2012-08-11 21:01:40 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00