Sabayon Desktop

This is a BASH script that optimize, securing and adjust Sabayon Linux LXDE 9 in a way i like :-)
I run this script every time i want to upgrade my system.
No idea if anyone other than me find this script useful.

Have not done anything on this for a long time so it is kind of dead :-(

You can modify what the script shall do by editing variables in the beginning of the script. 
You also have three types of configurations in the script you can edit:
Variables used in the script (You should not need edit these)

Default settings, the script will ask you for the this information on execution. 
But if you just press enter, the following values will be used.

Settings (Modify to meet your requirements)

P.S. A stylish Chrome theme you can use is called: Slinky Classic
OBS! You use this script at your own risk, i don't take any responsibility if something goes wrong.

Here you can download the code: Google Drive


Please check this first

You must have Sabayon Linux LXDE 9 installed.
Daily build (Sabayon_Linux_DAILY_XXXX_LXDE.iso).

Edit the settings in the script for your taste.

And you must have logged in to LXDE ones with the same user you enter when executing this script.

You must have the in the same folder as the script.

And you must run this script as root.

The system can issue the following question several times during execution:
 - Please choose a file to update by typing its identification number."
   Type -5 and then enter.
 - You need to accept the licenses below.
   Type 3 and then enter.

This features the script will ask if you want

If you create a zip file named and put in the same directory as the script and have 2 folder in it named hidden-config and hidden-home. 
Then the content of hidden-home will be copied to ~/
And the content of hidden-config will be copied to ~/.config

Fixing laptop stuff (packages and powersave).
If you always have your laptop plugged into the outlet or it is a desktop choose false.

Mount some directorys to RAM.
/tmp, /var/log, /var/tmp, /var/run, /var/lock
The system log files will not be persistent between reboots (on a desktop i dont care about that).

Mount Chrome cache in RAM.
Will speed up surfing a bit.

Disable swap.
I always disable my swap if i have 2G of RAM or more.

Add to hosts file.
Add some computers on you network to the hosts file.
You need to edit the parameter 'hosts' in this script.

Disable IPv6.
IPv6 is almost never used.
Will speed up Internet connections under certain circumstances.

Optimize for SSD disk.
Set elevator to noop.

Enable, secure and optimize SSH-server.

Add guest samba mounts to NetworkManager.
You need to edit the parameter 'samba_mounts' in this script.

Enable Flash hardware acceleration.

Autologin user.

Add composite to LXDE.
Get some nice shadows around you windows.

Configure wine.
Remove Wine from application menu.
Also remove notepad and other crap from mimetypes. 

Install Windows Spotify using Wine.
Spotify Terms and Conditions of Use

Generate Windows 7 Virtualbox machine.
Will also create two virtual machnes in VirtualBox.
One named Windows-7 and one named Windows-7-fullscreen.
If you want to switch back to linux worksapce 1 or 2 in fullscreen mode copy the files Switch-1.bat, Switch-2.bat and Switch-3.bat (will be created in the same directory as this script) to the windows machine.
Execute this files in windows to switch to desktop one or two in linux.
You also need a shared folder named tmpfs (\\VBOXSVR\tmpfs\) pointing to /dev/shm folder in Linux (The script will also create this shared folder).
Script will also create a shared folder (\\VBOXSVR\Home\) pointing to you home folder in Linux.
For this to work your vdi file with windows 7 (32-bit) must be named Windows-7.vdi and located under ./.VirtualBox. 
If no vdi file is found a new will be created (16GB).
In summary: Before running this script, create a virtual machine with Windows7 (32bit) named Windows-7.vdi in /home/<username>/.VirtualBox/

Start Claws mail in tray at boot.

Start Pidgin at boot.

This features the script will add without asking

Upgrade all packages.

Install useful packages if it is not already done.
You can choose which packages by edit the variable 'install_packages'.

Remove useless packages.
You can choose which packages by edit the variable 'remove_packages'.

Remove useless application links.
You can choose which links by edit the variable 'del_file'.

Disable useless services.
You can choose which services by edit the variable 'remove_services'.

Select proprietary video drivers (NVIDIA, ATI).
Upgrade to new kernel if there is a newer.

Optimize grub.
Remove boot splash and other crap.

Optimize fstab. 
Add noatime,nodiratime.

Add commands to sudoers.
You can choose which command by edit the variable 'sudoers'.

Configure Java. 
Set default LookAndFeel to GTK.

Optimize rc.conf.
Disable rc logger.

Remove tty2 to tty6.

Enable preload and irqbalance.

Prelink the system.

Icon theme: Faenza icons.
GNU/GPL license (

GTK theme: Absolute theme.
GNU/GPL license (

Openbox theme: Absolute Obenbox, theme made by me that works with Absolute.
LGPL license (

These changes will be made in LXDE.
Larger LXpanel.
Application launcher on LXpanel.
LXpanel order: Menu, Launcher, Task Bar, System Tray, Volume, Clock.
Focus follow mouse.
Synapse start automatically.
Change size of icons.
List view in PCManFM.
Make QT look like Absolute Theme.
Make home dirs: Documents, Download, Music, Pictures, Projects, Videos.
Remove Sabayon menu.
Remove Sabayon desktop icons.
Menu order (Preferences not fixed).
Change wallpaper.
Move Catfish from System tools to Accessorys.
Move Rigo from Preferences to System tools.

Configure wine.
Remove Wine from application menu.
Also remove notepad and other crap from mimetypes.

Generate Filezilla servers list.
You can choose which servers by edit the script.

Generate Steelsquid Linux Utils GUI.
Create a menu item 'Steelsquid Linux Utils'.
Many of the features below require that you edit variables in the script.
Mount/umount guest samba shares (if you use this feature).
Umount all usb disk, will also search for all programs with open files and close them.
Link to run this script.
If you have this script and (and maybe files on a SSH server it can download and install it on this computer.
Enable/disable compositing (Window shadows).
Connect to list of SSH servers.
Connect to list of S/FTP servers.
Sync directorys via SSH and rsync.
Connect to Windows remote desktop server (this script contains the dirs).
Connect to VNC server over SSH tunnel, x11vnc must be installed on target computer.
Start VirtualBox machines.