File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public static void main(String args[]) {
6666 cfg = Linux .x11_rr_get_setup (cfg );
6767 Linux .x11_rr_set (cfg );
6868 }
69+ start_systemd ();
6970 start ();
7071 } catch (Exception e ) {
7172 JFLog .log (e );
@@ -159,11 +160,23 @@ private static void loginctl() {
159160 JFLog .log ("loginctl:\n " + loginctl );
160161 }
161162
163+ private static void start_systemd () throws Exception {
164+ String [] cmd = new String [] {
165+ "/usr/bin/systemctl" ,
166+ "start" ,
167+ "user@" + LinuxAPI .getInstance ().getUID (),
168+ };
169+ ShellProcess sp = new ShellProcess ();
170+ sp .keepOutput (true );
171+ String res = sp .run (cmd , true );
172+ JFLog .log ("start_systemd:" + res );
173+ }
174+
162175 private static void start () throws Exception {
163176 JFLog .log ("Starting window manager:" + window_mgr );
164177 int uid = LinuxAPI .getInstance ().getUID ();
165178 loginctl ();
166- String envfile = System .getenv ("XDG_RUNTIME_DIR" ) + "/environ " ;
179+ String envfile = System .getenv ("XDG_RUNTIME_DIR" ) + "/wm_environ " ;
167180 switch (window_mgr ) {
168181 case "openbox" :
169182 config_openbox ();
@@ -248,7 +261,7 @@ public void run() {
248261 window_mgr_process .addListener (new Startup ());
249262
250263 if (envs != null ) {
251- String envfile = System .getenv ("XDG_RUNTIME_DIR" ) + "/environ " ;
264+ String envfile = System .getenv ("XDG_RUNTIME_DIR" ) + "/wm_environ " ;
252265 try {
253266 FileOutputStream fos = new FileOutputStream (envfile );
254267 for (String e : envs ) {
You can’t perform that action at this time.
0 commit comments