Results 1 to 3 of 3

Thread: The Free Studio Project - part 6 Some additional optimizations

  1. #1

    Default The Free Studio Project - part 6 Some additional optimizations

    Now that Ardour is working properly we can make the system a true Dedicated Studio.

    Since it's not intended to be used as a Desktop or Laptop computer for general use we can switch Gnome to a less "heavy" GUI.

    This is not mandatory but Both Gnome and KDE need a lot of system resources and we can use them for Ardour instead.
    to be short Gnome looks a bit like OSX while KDE Looks more like Windows

    Linux has a number of Display Managers, Desktop Environments and Window Manager, but we are going for OpenBox a lightweight alternative.

    If you don't like openbox (it's very minimal) there is also LXDE, Blackbox, XFCE, XBMC, mate, Enlightenment, ... (Blackbox is minimal like openbox)

    to install openbox open a terminal and type : sudo apt-get install lightdm openbox openbox-menu openbox-gnome-session menu tint2 openbox-kde-session libxml2-dev obmenu && sudo apt-get autoremove && sudo apt-get clean

    This should ask your Password, present a list of all the software it will install and aks if you want to continue (choose Y or just press the Enter key).

    Wait for this to finish (it can take some time)
    you will be asked what Display Manager to use (GDM3 KDM LightDM, ...) choose gdm or gdm3 for now

    when done you should have openbox install and something we call tint2 (this is a small taskbar you can use with openbox since openbox doesn't have one by default).

    open a terminal and type :
    - cd $HOME
    - gedit .config/openbox/autostart

    enter the following in the text file :

    # Program to autostart
    tint2 &

    This should make tint2 autostart
    if you want to autostart more programs you can add them here.
    the linux convention is that the hash-tag # indicates that the following is a comment so # tint2 & will not do anything.

    I"ve noticed that whein qjackctl is set to start with gnome it should also autostart in openbox, but if it doesn't you'll need to add it to the autostart file.

    Save and exit

    now logout
    when you are in the login screen select your name and notice a gear icon next to the continue button, click this button and select openbox from the list, now enter your password and login.

    you should see a blank (gray) screen with no icons, no wallpaper, no menu only the taskbar at the bottom.
    when you rigt-click you'll see a menu (you can edit this by opening the "Terminal Emulator" from the menu and type obmenu

    If you don't like how openbox looks/works you can select gnome again or lxde or xfce or ... (lxde is a lightweight look-alike of KDE)

    If you do like openbox you can make Debian autologin to openbox so you don't need to enter your password every time but in it's default state there is no reboot or shutdown option in openbox so exit will bring you to the login screen, but that will autologin to openbox but we will solve this later

    Since Linux only allows the root user to shutdown/reboot the system (Unlike Windows there is no reason why you should reboot your system. The only exception is when you upgrade your kernel but all other updates should be no problem) we will need to do a quick hack to add a reboot and shut-down option to the OpenBox menu.

    Why you ask ?
    Well we are not running a server (I guess) so there is no reason to keep the system running when we are not using it (and IF you are running a server there is no real need to use a GUI).

    so open a terminal and do the following :
    REBOOT SCRIPT :
    type : gedit reboot.sh
    add the following 3 lines in the empty text file :
    #!/bin/sh
    reboot;
    exit 0


    Save and close the file
    now make it executable by typing : chmod +x reboot.sh

    next open the OpenBox menu, if you installed obmenu just type obmenu

    This should be pretty easy :
    click on New Item
    enter for label : Reboot
    leave ID as it is
    Action is Execute (default)
    Execute is gksu /home/USERNAME/reboot.sh (Replace USERNAME with your username)
    Click on Save

    Close obmenu
    Right-Click on your desktop
    Select Reboot from the menu
    A pop-up should now ask your password (gksu is a graphical version of sudo)
    When the password is correct your system should reboot. (instantly without asking so make sure you save/close everything).

    If this works you can add the shutdown script.
    This is the same as the reboot script (call it shutdown.sh).
    The shutdown command is a bit different compared to the reboot one so replace reboot with :
    shutdown -h now

    what is this command :
    - shutdown tells the system to shutdown (or reboot but typing reboot; is faster)
    - -h is halt (shutdown)
    - now is do it NOW ! (Instantly) you can replace now with 15 to make it wait 15seconds before the shutdown
    an as with the reboot command it's done instantly, there will be a message but you'll have no time to do anything (when you set it to 60 for example you'll have 60 seconds to close/save).

    Now that we have a working dedicated D.A.W. we can go to the autologin part to make it boot, login and start Ardour/Mixbus while we're going for a cup of coffee.

    open a terminal and type : su
    enter your password
    type dpkg-reconfigure gdm3
    in the following menu select lightdm as default
    This sets the LightDM display manager as the default over GDM3 which is the default for a Gnome desktop

    Now it's time for the automatic login to be set.
    type : sudo gedit /etc/lightdm/lightdm.confLook for the line : [SeatDefaults] near the middle of the text file
    edit the following entries :
    #autologin-user=
    #autologin-user-timeout=0

    change them into :
    autologin-user=USERNAME
    autologin-user-timeout=0

    notice that the # in the beginning is removed (so we "uncommented" it)
    USERNAME is as always your studio username
    Timeout is the time to show the login screen (in seconds) so if you want a 15 sec. delay so you can login with another user account (or start with another DE) if you want (I've set it to zero since I don't need to see the login dialog).

    Also remember that Linux uses your previously selected DE/WM as default in the future so if you logout from Gnome into OpenBox openbox will become the new default and vice-versa so there is nothing to be edited to make this stick

    If you are happy with your setup but still prefer to see a desktop background image (this will take some system resources) you can use Nitrogen

    You will need to install this by typing sudo apt-get install nitrogen in a terminal window
    once installed you can start it by typing nitrogen
    The problem is that this will be gone after a reboot so we'll need to do some extra stuff
    1. start nitrogen with nitrogen --save
    2. click on preferences and add the location where your wallpaper is located
    3. Select your wallpaper and clck Apply
    4. Close Nitrogen
    5. edit your autostart file (the one we make to start tint2 the taskbar)
    6. type : gedit .config/openbox/autostart
    7. change it into :

    # Program to autostart
    # Taskbar
    tint2 &
    # Desktop Wallpaper
    nitrogen --restore&

    Now the wallpaper should remain active after a reboot/shutdown.

    Note that the commands I enter in the console/terminal are made in the users home directory /home/USERNAME or $HOME
    if you use another location some commands may not work.
    Last edited by Patrick; 10-01-2014 at 03:56 AM.
    Fender 2012 American Standard Precision Bass (Left-handed)
    Fender '59 Bassman LTD.









  2. #2

    Default

    Phew,
    I should be finished now :-D
    Fender 2012 American Standard Precision Bass (Left-handed)
    Fender '59 Bassman LTD.









  3. #3

    Default

    A huge thanks to you Patrick for all your effort!!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •