2

I'm currently using a Aquaris E4.5 Ubuntu Edition. Sure, it's working normally, but there's a terminal command that I want it to run everytime I boot my phone.

The command is: gsettings set com.canonical.Unity8 usage-mode Windowed

For those who doesn't know, this command enable the windowed mode in the phone.

I've tried various methods that I searched here and on the internet, but none of them worked.

  • Creating/Modifying the ~/.bash_login or .bash_profile didn't work.
  • Trying to modify /etc/rc.local is not a option, since I have to mount it as RW (but I don't want to do that because I still want to receive OTA updates).
  • Creating a (executable) .sh file and creating a .conf in ~/.config/upstart, but no success.

Do you guys have any idea on how to make it work?

Thank you.

Nori-chan
  • 865

1 Answers1

1

Ok, I found a way to to do that. I will post it here, maybe someone else want it too.

First, in /home/phablet/Documents, I created a file called myfile.sh with this content:

#!/bin/sh gsettings set com.canonical.Unity8 usage-mode Windowed exit 0

After that, I created another file in /home/phablet/.config/upstart called jobi.conf (didn't thought about a better name) with this content:

description "my script" start on started msyncd exec /home/phablet/Documents/myfile.sh

After that, I just restarted to test it, and it worked.

Nori-chan
  • 865