• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to set Desktop Mode off and make it stick?

Scheduled Pinned Locked Moved Solved Lenovo Tab M10 X605F/L
58 Posts 8 Posters 11.9k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dtarrant
      last edited by dtarrant 24 Apr 2022, 11:25

      My tablet always starts with Desktop Mode on. For normal use, I need it off. I can set it off and all is fine for using the tablet.
      However, after a power off and re-start, my setting has been lost.
      I believe @Luksus is aware and has tried to fix, but without success.
      What can we do to help?

      M L 2 Replies Last reply 24 Apr 2022, 14:34 Reply Quote 1
      • D dtarrant marked this topic as a question on 24 Apr 2022, 11:25
      • M Offline
        MrT10001 @dtarrant
        last edited by 24 Apr 2022, 14:34

        @dtarrant Unless you can code and work on the kernel, not a lot. I wouldn't know where to start!

        Xiaomi Redmi Note 7.... And more...
        I have too many devices...

        1 Reply Last reply Reply Quote 1
        • L Offline
          Luksus @dtarrant
          last edited by 24 Apr 2022, 18:00

          @dtarrant There is a config file, which should controll this: /etc/ubuntu/devices.conf.

          Usually the config for the [halium_arm64] device in this file should be enough.
          I tried to add another config, with different versions of the X605 codename, but nothing worked.

          One could make the rootfs writable and experiment with editing this config file. But already did that a lot and nothing works.

          What would make more sense is, to investigate how and when that file gets read, to understand how it should work and why it does not work in our case.
          I did not have the time to do this yet.

          Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

          D 1 Reply Last reply 5 May 2022, 01:40 Reply Quote 1
          • K Offline
            kugiigi
            last edited by 24 Apr 2022, 19:59

            As mentioned you can experiment with device config. Make sure the codename is correct. My S10's codename is beyond1lte but for the device config, it's beyond1 only.
            Normally, setting your device as tablet should be enough. There's another config located at /etc/ubuntu-touch-session.d but not sure how that affects things.
            Last I can think of that's a possibility is that the port detects a physical keyboard/mouse even though there's none. Lomiri has a logic to switch to desktop mode when those are detected.

            L 1 Reply Last reply 25 Apr 2022, 08:47 Reply Quote 2
            • L Offline
              Luksus @kugiigi
              last edited by 25 Apr 2022, 08:47

              @kugiigi said in How to set Desktop Mode off and make it stick?:

              Last I can think of that's a possibility is that the port detects a physical keyboard/mouse even though there's none.

              That is a good point also, which we should investigate.

              Devices: BQ e4.5, Fairphone 2, Fairphone 3, Lenovo X605F, Pinephone, Moto Z2 Force, OnePlus5T

              1 Reply Last reply Reply Quote 0
              • D Offline
                dtarrant @Luksus
                last edited by dtarrant 5 May 2022, 01:46 5 May 2022, 01:40

                @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?

                D 1 Reply Last reply 6 May 2022, 17:22 Reply Quote 0
                • D Offline
                  dtarrant @dtarrant
                  last edited by 6 May 2022, 17:22

                  @dtarrant @kugiigi @danfro
                  I have concluded that my idea isn't feasible.
                  I looked at the UT-Tweak-Tool pages on gitlab and it was all above my head. There is no chance of me finding a simple linux command which could be executed from the UT Terminal app to switch desktop mode off. ☹

                  K D 2 Replies Last reply 6 May 2022, 17:33 Reply Quote 0
                  • K Offline
                    kugiigi @dtarrant
                    last edited by 6 May 2022, 17:33

                    @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 involve gsettings and sorry I can't remember the exact command 😅

                    D 1 Reply Last reply 9 May 2022, 02:05 Reply Quote 0
                    • D Offline
                      danfro @dtarrant
                      last edited by danfro 5 Aug 2022, 10:51 6 May 2022, 20:41

                      @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 is usage-mode, then I don't know why or how UT Tweak Tool can work, because that is using usageMode. But maybe I overlook something.

                      D 2 Replies Last reply 7 May 2022, 13:59 Reply Quote 3
                      • D Offline
                        dtarrant @danfro
                        last edited by 7 May 2022, 13:59

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          dtarrant @danfro
                          last edited by 7 May 2022, 20:06

                          @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.

                          K 1 Reply Last reply 8 May 2022, 00:24 Reply Quote 0
                          • K Offline
                            kugiigi @dtarrant
                            last edited by 8 May 2022, 00:24

                            @dtarrant it should be usageMode. It's a mistype 😄

                            D 2 Replies Last reply 8 May 2022, 01:26 Reply Quote 0
                            • D Offline
                              dtarrant @kugiigi
                              last edited by 8 May 2022, 01:26

                              @kugiigi
                              Wow! Thanks Kugi, I'll try again. ☺

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                dtarrant @kugiigi
                                last edited by dtarrant 5 Aug 2022, 01:58 8 May 2022, 01:55

                                @kugiigi @danfro
                                Tried again - still no joy. Got msg:
                                No such key 'usageMode'
                                I feel we are on the brink of success.
                                Also tried 'useageMode' but also no joy. ☹
                                Any other ideas?

                                Pulsar33P 1 Reply Last reply 8 May 2022, 07:49 Reply Quote 0
                                • Pulsar33P Offline
                                  Pulsar33 @dtarrant
                                  last edited by 8 May 2022, 07:49

                                  @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

                                  Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                  Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                  Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                  D 3 Replies Last reply 8 May 2022, 08:55 Reply Quote 3
                                  • D Offline
                                    dtarrant @Pulsar33
                                    last edited by 8 May 2022, 08:55

                                    @pulsar33
                                    Many thanks. I will try and let you know how it goes.

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      dtarrant @Pulsar33
                                      last edited by 8 May 2022, 09:22

                                      @pulsar33 @kugiigi @danfro @Luksus @Fuseteam
                                      Brilliant! That worked!
                                      You've made me very happy.
                                      "If you know stuff, you can do stuff!" ☺

                                      1 Reply Last reply Reply Quote 1
                                      • D Offline
                                        dtarrant @kugiigi
                                        last edited by 9 May 2022, 02:05

                                        @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/....

                                        KenedaK 1 Reply Last reply 9 May 2022, 08:14 Reply Quote 0
                                        • KenedaK Offline
                                          Keneda @dtarrant
                                          last edited by Keneda 5 Sept 2022, 13:13 9 May 2022, 08:14

                                          @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.

                                          2015-2023 : Meizu MX4 ☠️⚰️✝️
                                          2023-2024 : Nexus 5 ☠️⚰️✝️
                                          2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                                          🇲🇫🇬🇧

                                          1 Reply Last reply Reply Quote 1
                                          • D Offline
                                            dtarrant @Pulsar33
                                            last edited by 10 May 2022, 18:27

                                            @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.

                                            K 1 Reply Last reply 10 May 2022, 18:36 Reply Quote 0
                                            • First post
                                              Last post