[Tutorials][2014-06-01] How to tweak your Ubuntu Touch installation

Search This thread
T

TobiH8

Guest
Many things have changed within Ubuntu Touch. All of the tips and tweaks mentioned here have not been tested with newer Ubuntu Touch builds and many links are broken (and I can't fix them because I don't have all the files). If you do still want to try them proceed with caution!

Everyone is encouraged to share new tweaks in this thread. If you want I can add you to the first post so you can get the "Thank you" and all Ubuntu Touch users can easily find tweaks.
 
Last edited:
T

TobiH8

Guest
Old posts:

I want to explain you how to do simple UI changes (installing apps...) in Ubuntu Touch and do some other things under the hood.
First: Check out the Release notes. A lot of tweaking is explained there (changing language or keyboard layout).

I want to start with changing the system time zone:
Connect your device via SSH to your computer (explained in the release notes).
The type into a terminal:
sudo dpkg-reconfigure tzdata
root password is phablet ;)

1. Change the system time zone
2. How to change the wallpaper.
3. How to update Ubuntu Touch without a PC
4. Create a simple web app
5. Installing Core Apps

If you see this smiley: :p You should type in the Terminal this: : p without the space. ;)

How do I change my Ubuntu Touch Wallpaper?

This is really simple! Thanks to blmvxer showing us the path where all those wallpapers are! He made a really nice script for changing it. Check it out here: http://xdaforums.com/showthread.php?t=2387117

First of all upload the script to a cloud storage (Google Drive does not work; I use Ubuntu One).
Optional: Create a goo.gl link out of this (easier; otherwise you might not know the filename).

I will post the script first:

wget http://goo.gl/{ID} && mv {ID} /usr/share/unity8/graphics/tablet_background.jpg && wget http://goo.gl/{ID} && mv {ID} /usr/share/unity8/graphics/phone_background.jpg

The first wget downloads the script. After that we move it to the right path (thanks again to blmvxer to show us the path). Then it downloads it again and replaces the second wallpaper. After a reboot you will have a new background.
 
Last edited:
T

TobiH8

Guest
How do I update the whole Ubuntu Touch without a PC?

Note: You can't update everything in the current builds but you can update a lot!

The first thing you have to do is adding a new repository to your Ubuntu Touch device. Open a Terminal and type:
sudo add-apt-repository ppa:phablet-team/ppa

After that hit
sudo apt-get update && sudo apt-get upgrade -y
. This updates your system. You can do this as often as you want.
I have created a simple script so I do not have to type in so much:
sudo apt-get update -y && sudo apt-get upgrade -y && sudo bash {myWallpaperchangescript} && sudo reboot
I have added the wallpaper change script because if unity gets updated you have to run it again because you have the purple wallpaper back again.
 
Last edited:
T

TobiH8

Guest
How to create a web app?

Create a *.desktop file with a text editor (I used gedit because it just works ;)).
Copy the following into the file:

[Desktop Entry]
Type=Application
Terminal=false
Exec=webbrowser-app --chromeless https://{put_URL_in_here}
Name={put_application_name_here]
Icon=/usr/share/{application_name}/{picturename}.png
X-Ubuntu-Touch=true
X-Ubuntu-StageHint=SideStage
Name[en_GB]=

Replace the text in “{}” with the variables of your choice.
Save the file.
Search for an icon which represents your web application. (You can find these icons on Google Play or anywhere else)


How do install my new web app?

Upload the file to a cloud storage of your choice (Google Drive does not work; I use http://one.ubuntu.com/) and create a public link. Copy the link.

Now we are going to create a script with a text editor:
{put_a_name_in_here}.sh

Now we are going to put content in:
wget http://{cloudservicelink}/{filename_or_ID}
This line downloads the *.desktop file onto your Ubuntu Touch device into the current folder. For my test app it would be: “wget http://ubuntuone.com/337i5uukUMjH4gtPehpdXq ”.

Second line:
mv {fileID} /usr/share/applications/{applicationname}.desktop
This moves the app into the directory where all the other apps are located. For my test-app it would be: “mv 337i5uukUMjH4gtPehpdXq /usr/share/applications/stadtbremerhaven.desktop”

In the third line we have to create a new directory for the icon:
mkdir /usr/share/{applicationname}
Important: You have to use the same path like in the *.desktop file!

In the fourth line we have to download the icon (I use the one from the Google Play Store):
wget http://goo.gl/{ID}
It is important to use http://goo.gl/ because other shorteners do not work!

An the last line:
mv {goo.glID} /usr/share/{applicationname}/{picturename}.png
This moves the icon into the right directory. It is important to use the picturename used in the *.desktop file.
My line looks like the following: “mv 0wEYju /usr/share/stadtbremerhaven/unnamed.png”

Great! You have now your first Ubuntu Touch web app (it is as REALLY simple one ;)).
Now we you have to connect the lines. Remove all new lines so it is a really long line and put between the different actions “&&”.
So for my app it looks like this:
wget http://ubuntuone.com/337i5uukUMjH4gtPehpdXq && mv 337i5uukUMjH4gtPehpdXq /usr/share/applications/stadtbremerhaven.desktop && mkdir /usr/share/stadtbremerhaven && wget http://goo.gl/0wEYju && mv 0wEYju /usr/share/stadtbremerhaven/unnamed.png
If you want to add more programms just add them after the last command with “&&”.
So for me it looks like this:
wget http://ubuntuone.com/337i5uukUMjH4gtPehpdXq && mv 337i5uukUMjH4gtPehpdXq /usr/share/applications/stadtbremerhaven.desktop && mkdir /usr/share/stadtbremerhaven && wget http://goo.gl/0wEYju && mv 0wEYju /usr/share/stadtbremerhaven/unnamed.png && wget http://ubuntuone.com/0f2KoDkZnre5lQMWqwsrP6 && mv 0f2KoDkZnre5lQMWqwsrP6 /usr/share/applications/duckduckgo.desktop && mkdir /usr/share/duckduckgo && wget http://goo.gl/Mzklu8 && mv Mzklu8 /usr/share/duckduckgo/unnamed.png

You can write a really large installer script with all of your web apps.
 
Last edited:
T

TobiH8

Guest
I have heard there is a mail client and there are other cool apps, too. Where can I f

To install all those apps you have to add a new repository. So type into a Terminal:
sudo add-apt-repository ppa:ubuntu-touch-coreapps-drivers/daily && sudo apt-get update

Now you have to install the right package:
sudo apt-get install touch-coreapps && sudo reboot
After the reboot you have those apps installed!
 
Last edited:
T

TobiH8

Guest
I hope you can understand everything, because I am not a native English speaker.
If you have any questions feel free to write a comment!
If you have tweaks and tips to share with the community it would be nice to post them in this thread so beginners can find them easily.
 
Last edited:

Trevor Chuah

Senior Member
Apr 9, 2012
182
49
May I ask a question? Maybe sounds stupid.

Do these all mod applicable to non-nexus Ubuntu touch phone.
I mean the phone not directly supported by Ubuntu.

Sent from my Xperia S using xda app-developers app
 
T

TobiH8

Guest
All mods except this one should work. I don't know if you can update the whole Ubuntu Touch system with a not official supported device and I wouldn't try it. ;) So juse the other tipps to make Ubuntu Touch your own.
 

Rasputin007

Member
Oct 23, 2011
22
2
www.mmus.us
This is really simple! Thanks to blmvxer showing us the path where all those wallpapers are! He made a really nice script for changing it. Check it out here: http://xdaforums.com/showthread.php?t=2387117

First of all upload the script to a cloud storage (Google Drive does not work; I use Ubuntu One).
Optional: Create a goo.gl link out of this (easier; otherwise you might not know the filename).

I will post the script first:



The first wget downloads the script. After that we move it to the right path (thanks again to blmvxer to show us the path). Then it downloads it again and replaces the second wallpaper. After a reboot you will have a new background.

Thanks mate.
I have used a slightly different approach.
Open terminal on phone (Nexus 4 is mine) and enter
Code:
[B][I]sudo passwd root[/I][/B]

You will be prompted to enter a new password for the "root" user and then retype it.
OK that done I used the guide on this page, https://wiki.ubuntu.com/Touch/ReleaseNotes, to use sftp and FileZilla to login as "root". Now I could replace the phone_background.jpg file.
Crude and dirty, but works!
Best thing now is I can use sftp and FileZilla from Linux, Windows and Mac PC's/laptops. ;)
 
T

TobiH8

Guest
...to use sftp and FileZilla to login as "root". Now I could replace the phone_background.jpg file.
Crude and dirty, but works!
Best thing now is I can use sftp and FileZilla from Linux, Windows and Mac PC's/laptops. ;)

Interesting idea using FTP to change the background! Only one problem for me: After every update you have to do it again.
When you write a script you can add it to an updater script and you don't have to do it again. ;)
But really interesting way of changing the wallpaper.
 

Rasputin007

Member
Oct 23, 2011
22
2
www.mmus.us
I am so used to use ftp/sftp with FileZilla for years now to mess with the phone file system. It started with the Linux based Motomagx OS from the Motorola V8, then I used it on the iPhones and like to use it on the Nexus 4 as well. ;)
The problem with being logged in as "phablet" user is you can not replace files that belong to "root".
As "root" you can do anything, but then with great power comes great responsibility. :D

Another alternative could be a symlink. That's the nice thing about Linux, there is always more then one way to achieve the goal.
 
Last edited:
T

TobiH8

Guest
How to change brightness.

With the new Ubuntu Touch updates you can't change the brightness.
I have figured out how can adjust it via Terminal.
Open the Terminal and type
cd /sys/class/backlight
now type
and press [TAB] and press [ENTER].
After that type
sudo nano brightness
and hit [ENTER]. Enter your password and change the value to everything you want. The problem with this is that you have to change it after every reboot. :(

If you have other tipps, please share them in this thread!
 
Last edited:
T

TobiH8

Guest
How can I block ads with Ubuntu Touch (or other unwanted sites)?

This is really easy.
Open the Terminal (or connect via SSH) and type
sudo nano /etc/hosts
Add you unwanted sites under the lines containing "localhost".

For Adblock search the internet for an adblocking hosts file and add the sites to your /etc/hosts file.
 
T

TobiH8

Guest
How can I change my hostname?

You want to change your Ubuntu Phone's hostname?

Type into a Terminal
sudo nano /etc/hostname && sudo nano /etc/hosts
In the first file change "phablet" (or any other current hostname) to the hostname of your choice. In the second change "phablet" (or any other current hostname) to the hostname you have set in /etc/hostname.

How can I change my password from "phablet" to something more secure to prevent installing of malware?


Type into a Terminal
enter the current password (phablet) and enter your new secure one. But be aware! You can't change the password back to "phablet" because it is to insecure.
 

davjan

Senior Member
Jun 2, 2008
610
111
willebroek
With the new Ubuntu Touch updates you can't change the brightness.
I have figured out how can adjust it via Terminal.
Open the Terminal and type

now type and press [TAB] and press [ENTER].
After that type and hit [ENTER]. Enter your password and change the value to everything you want. The problem with this is that you have to change it after every reboot. :(

If you have other tipps, please share them in this thread!

I got no problem changing brightness , using the battery tab on the status bar
on nexus 4
 

blmvxer

Senior Member
Jan 13, 2012
1,480
607
I got no problem changing brightness , using the battery tab on the status bar
on nexus 4

With a recent update to unity8 you can't change the brightness.

Sent from my LG-LS970 using xda app-developers app

---------- Post added at 09:45 AM ---------- Previous post was at 09:42 AM ----------

With the new Ubuntu Touch updates you can't change the brightness.
I have figured out how can adjust it via Terminal.
Open the Terminal and type

now type and press [TAB] and press [ENTER].
After that type and hit [ENTER]. Enter your password and change the value to everything you want. The problem with this is that you have to change it after every reboot. :(

If you have other tipps, please share them in this thread!

Echo the brightness with an init.d script.

Or rename the modified file .bak and at startup have it replace the original.

Sent from my LG-LS970 using xda app-developers app
 
T

TobiH8

Guest
Echo the brightness with an init.d script.

Or rename the modified file .bak and at startup have it replace the original.

Sent from my LG-LS970 using xda app-developers app


I thought about that for me but I do not restart my phone often and when we are able to change brightness again, I have to delete the script.
But for other people it is a better workaround than mine.