From 37f5a3311610ab14c0e393268c41d2cfdb162bef Mon Sep 17 00:00:00 2001 From: Bjoernsen Date: Fri, 13 Mar 2015 13:36:07 +0100 Subject: [PATCH 1/4] Enable multiple users Currently, it is not possible to use atom for multiple users on the same linux machine. The socket file '/tmp/atom.sock' belongs to the first user that starts atom. With this small change, a socket file will be created for each user. --- src/browser/atom-application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 1ecbe9570..52fc08c21 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -18,7 +18,7 @@ DefaultSocketPath = if process.platform is 'win32' '\\\\.\\pipe\\atom-sock' else - path.join(os.tmpdir(), 'atom.sock') + path.join(os.tmpdir(), "atom_#{process.env['USER']}.sock") # The application's singleton class. # From 66fa86e129a76fa2139ac6bc2f44cb22dcfb3057 Mon Sep 17 00:00:00 2001 From: Bjoernsen Date: Sat, 14 Mar 2015 13:42:54 +0100 Subject: [PATCH 2/4] Enable multiple users Enable atom for multiple users on same linux computer. --- src/browser/atom-application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 52fc08c21..138448f52 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -18,7 +18,7 @@ DefaultSocketPath = if process.platform is 'win32' '\\\\.\\pipe\\atom-sock' else - path.join(os.tmpdir(), "atom_#{process.env['USER']}.sock") + path.join(os.tmpdir(), "atom_#{process.env.USER}.sock") # The application's singleton class. # From d6338b0a2c1beb248f5892c62a56a4f555b09905 Mon Sep 17 00:00:00 2001 From: Bjoernsen Date: Mon, 16 Mar 2015 08:38:01 +0100 Subject: [PATCH 3/4] Update start-atom.coffee --- spec/integration/helpers/start-atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index b5f5a8c1f..9d57e93ae 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -9,7 +9,7 @@ webdriverio = require "../../../build/node_modules/webdriverio" AtomPath = remote.process.argv[0] AtomLauncherPath = path.join(__dirname, "..", "helpers", "atom-launcher.sh") ChromedriverPath = path.resolve(__dirname, '..', '..', '..', 'atom-shell', 'chromedriver', 'chromedriver') -SocketPath = path.join(temp.mkdirSync("socket-dir"), "atom.sock") +SocketPath = path.join(temp.mkdirSync("socket-dir"), "atom_#{process.env['USER']}.sock") ChromedriverPort = 9515 buildAtomClient = (args, env) -> From eaa72fc956e49699d19e1c352ff02206844e099c Mon Sep 17 00:00:00 2001 From: Bjoernsen Date: Mon, 16 Mar 2015 08:38:34 +0100 Subject: [PATCH 4/4] Update browser-process-startup.coffee --- benchmark/browser-process-startup.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/browser-process-startup.coffee b/benchmark/browser-process-startup.coffee index 06f2a0d48..53748f5d0 100755 --- a/benchmark/browser-process-startup.coffee +++ b/benchmark/browser-process-startup.coffee @@ -8,7 +8,7 @@ _ = require 'underscore-plus' temp = require 'temp' directoryToOpen = temp.mkdirSync('browser-process-startup-') -socketPath = path.join(os.tmpdir(), 'atom.sock') +socketPath = path.join(os.tmpdir(), "atom_#{process.env['USER']}.sock") numberOfRuns = 10 deleteSocketFile = ->