I tried to unlock partitions from the launcher, but they keeps reappearing after every reboot. Is there any good way to permanently remove partitions from the launcher?
This is happening only on Ubuntu 16.04
command linedevicesgsettingslauncherunlock
Best Answer
Although the solution below is not a fix to what seems to be a minor bug, you can use it as a workaround to automatically blacklist devices on startup (log in).
The solution
...is a small script that remembers your blacklisted items on log in. It runs with two arguments:
get
andset
. The first is to read the current blacklisted items, the second will (re-) set the list to the last read version.In practice
/path/to/remember_blacklist.sh get
This will make a snapshot of the currently blacklisted devices.Now the next time you log in or restart, the blacklisted devices are automatically removed. Of course you can add the command to a shortcut.
How to use / set up
Copy the script below into an empty file, save it as
remember_blacklist.sh
make it executable (!)
Add the following to Startup Applications Dash > Startup Applications > Add. Add the command
/path/to/remember_blacklist.sh get
Explanation
If you remove a device from the launcher, it is blacklisted. You can read the current list of blacklisted devices with the command:
This will output something like
What the script does is:
get
: it reads the current blacklist and saves the output in a hidden file:~/.currblacklist
when run with the argument
set
: it reads the content of the file~/.currblacklist
and sets the blaclist with the command: