How to set Desktop Mode off and make it stick?
-
@kugiigi @Fuseteam
I have a lateral thought:
How about a work-around?
Would it be possible write a script which could be run after start-up which would alter the system settings?
At present, after booting the tablet, I turn desktop mode off and tweak a couple of other settings to arrange the display to the conventional UT layout.
If I could run a script to do this automatically, it would be a great help. My wife would find this more acceptable.
I would like to try to do this if someone can explain which commands to use.
For example:
Step 1 - turn desktop mode off;
Step 2 - etc
In short, is this feasible? -
-
@dtarrant I don't exactly know how or if it's actually feasible but you can try putting the command as an upstart script (
~/.config/upstart
). The command would involvegsettings
and sorry I can't remember the exact command -
@dtarrant I had a look, yes, the app is not using a terminal command (as I thought). It is changing a gsetting.
gsetting values can be changed via terminal too as described here.
The schema is "com.canonical.Unity8". The actual setting value is "usageMode". (taken from UT Tweak Tool's code, not checked)
So in theory something like this run in terminal should work:
gsettings set com.canonical.Unity8 usage-mode Staged gsettings set com.canonical.Unity8 usage-mode Windowed gsettings set com.canonical.Unity8 usage-mode Automatic
Havn't tried it though.
Edit:
If you wish to do this without terminal but from inside an app, have a look at my ThemeSwitch branch where I implemented a working way of changing a gsetting.Edit 2:
I edited the mispelled commands here too as pointed out by @Pulsar33.Thanks for that.
Although if it isusage-mode
, then I don't know why or how UT Tweak Tool can work, because that is using usageMode. But maybe I overlook something. -
@danfro
Interesting, I looked up gsettings and it seemed to be about keyboard mappings. However, in view of what you've told me, I'll take another look.
Thanks for the information. -
@danfro
I tried one of the commands you suggested and it failed with the message "no such key as rusageMode" (or similar).
I would value your suggestion as to how to trouble-shoot.
Thank you in anticipation. -
@dtarrant it should be
usageMode
. It's a mistype -
@kugiigi
Wow! Thanks Kugi, I'll try again. -
-
@dtarrant mispellings ...
Use
gsettings set com.canonical.Unity8 usage-mode Windowed gsettings set com.canonical.Unity8 launcher-width 6 gsettings set com.canonical.Unity8 autohide-launcher true
The opposite of Windowed is Staged
BR
Pulsar33 -
@pulsar33
Many thanks. I will try and let you know how it goes. -
-
@kugiigi
This looks interesting:
I now know the correct gsettings command.
I can access .config/upstart with file manager and currently this location is empty (no files).
Please can you explain the format of the script I need to put here so the gsettings command is executed when I boot the tablet.
Not sure if this is relevant, but I just noticed that file manager has an "open terminal here" option at .config/upstart/.... -
@dtarrant said in How to set Desktop Mode off and make it stick?:
Not sure if this is relevant, but I just noticed that file manager has an "open terminal here" option at .config/upstart/....
It has this option in any folder.
@dtarrant said in How to set Desktop Mode off and make it stick?:
Please can you explain the format of the script I need to put here so the gsettings command is executed when I boot the tablet.
See there .
For instance, i assume you can call your file rotate-screen-fix.conf, put the right code to start script in it, and then create a rotate-screen-fix file in home folder and put the @Pulsar33 code above in it.
-
@pulsar33 @Keneda @kugiigi
Now I have confirmed the correct gsettings command to switch to staged mode, I need to arrange for it to be executed automatically when I boot the tablet.
I like Kugi's suggestion to use config/upstart/...
I have experimented with file manager which provides an easy way to created folders and files and also the facility to start a terminal wbich makes it possible to delete files and folders.
The problem I have is how best to add text (commands) to the empty file I created.
I have searched for a solution and some approaches seem over-complicated.
I would appreciate your suggestion please. -
@dtarrant You can use
vi
ornano
via terminal. Or Seabass from the store for ease of use.Here's a sample code that the tweak tool uses to set the scaling. Not sure if you can do the same of putting the command directly instead of creating a separate script.
start on starting dbus exec initctl set-env --global GRID_UNIT_PX=28
Here's another example of executing a script/bibary instead
start on started unity8 exec /opt/click.ubuntu.com/dekko2.dekkoproject/current/lib/aarch64-linux-gnu/bin/dekkod
-
@kugiigi
I like your previous suggestion of putting the gsettings command in ~/.config/upstart/....
For me, nano and vi look very tedious to learn and use.
After a quick play, Seabass2 looks much easier, so I will give that a try and let you know how I get on.
Watch this space!
In the words of Pete Juliano:
"If you know stuff, you can do stuff" -
@kugiigi @Luksus
So I put the gsettings command in ~/.config/upstart/...
using Seabass2.
I did not succeed in making the tablet start in staged mode.
I did notice a few things:- My BQ M10 tablet file manager enables access to ~/.config but the TB-X605F does not.
- Seabass2 can access ~/.config on the BQ, but not on the Lenovo.
- Seabass2 was harder to use that I anticipated.
- On the Lenovo, I had to use the command line to access ~/.config/upstart/... and add my gsettings command.
Next I will re-visit the other suggestions that have been offered and try a different approach.
It's worrying that the Lenovo behaves differently to the BQ.
Looks like the Lenovo may have some significant bugs.
-
@dtarrant Do you have set a lock-password (sudo-password) on the X605?
-