Revision 1 as of 2007-06-10 16:12:47

Clear message

Openbox on hyvin kevyt ikkunointiohjelma, X-ikkunointia tukeville käyttöjärjestelmille. Jos et ole valmis työpöytään, jota säädellään päätteen kautta varsin paljon tekstieditorin avulla, tämä opas ei ole sinulle. Openbox ei ole sinulle "se oikea." Openboxin asennus: Se on helppoa, aukaise pääte (terminal) ja kirjoita/kopioi siihen tämä:

sudo apt-get install openbox openbox-themes obconf adesklets idesk rox-filer pypanel

Toimenpiteen jälkeen voit kirjautua ulos ja kirjautua Openboxin puolelle, istunnot kohdasta valitset Openboxin. Nyt kun Openbox on asennettuna ja kaikki muut tarvittavat, joita tässä tutossa tarvitaan, katsotaan miten saat itsellesi taustakuvan:

cd
cp /usr/share/idesk/dot.ideskrc ~/.ideskrc
gedit .ideskrc

Vaihdat nyt tulevan taustakuvan polun Background.File riville. Tässä esimerkissä taustakuvan polku on ~/.idesktop/rain.jpg.

Background.File: ~/.idesktop/rain.jpg

Käynnistä idesk ja taustakuva tulee näkyviin.

idesk &

Seuraavaksi asennetaan Adeskletit.

cd
mkdir adesklets
cd adesklets
wget http://switch.dl.sourceforge.net/sourceforge/adesklets/weather-0.0.4.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/adesklets/modubar-0.0.1.tar.bz2

Puretaan ladatut tavarat, ole edelleen samassa hakemistossa.

tar -xvvf weather-0.0.4.tar.bz2
tar -xvvf modubar-0.0.1.tar.bz2

Asetuksia pitäisi vielä säätää, mutta rekisteröidään ensin adeskletit:

cd weather-0.0.4

Nyt sinun pitäisi olla ~/adesklets/weather-0.0.4 hakemistossa.

./weather.py

Paina r, mitään erikoista ei vielä tapahdu.

cd adesklets
cd modubar-0.0.1

Nyt sinun pitäisi olla ~/adesklets/modubar-0.0.1 hakemistossa.

./modubar.py

Taas painetaan r ja entteriä.

Varmista että sinun ~/.adesklets tiedosto näyttää kutakuinkin samalta kuin minun omani (Voit muokata omaa asetustiedostoasi komennolla editorisi ~/.adesklets (esim. nano ~/.adesklets) )

# This is adesklets configuration file. # # It gets automatically updated every time a desklet main window # parameter is changed, so avoid manual modification whenever # a desklet is running. In fact, manual changes to this file # should rarely be needed. See `info adesklets'. [/home/jani/adesklets/weather-0.0.4/weather.py] id=0 screen=0 x=0 y=0 [/home/jani/adesklets/modubar-0.0.1/modubar.py] id=0 screen=0 x=0 y=0

(MUISTA VAIHTAA POLUT OIKEAKSI!! Eli janin tilalle sinun tunnuksesi )

Modubarin kuvakkeiden käynnistyskäskyt voi säätää mieleisekseen. Halutut kuvakkeet laitetaan ~/adesklets/modubar-0.0.1/icons -kansioon. Modubarin oma asetustiedosto on ~/adesklets/modubar-0.0.1/config.txt. Adesklets käynnistetään komennolla adesklets. Pypanel käynnistyy kirjoittamalla päätteeseen pypanel. Paneeli tulee alareunaan, joten jos haluat paneelin yläreunaan paina päätteessä ctrl+c. Näppäinyhdistelmä lopettaa Pypanelin. Muokkaa sen jälkeen pypanelin asetustiedostoa.

tekstieditorisi ~/.pypanelrc

etsi sieltä kohta P_LOCATION ja muuta sen arvoksi 0. Nyt paneeli tulee ylös.

Idesk ikonit: Ikoneiden periaate on se, että jokaisella ikonilla on oma *.Ink tiedostonsa sekä tietenkin kuvansa ~/.idesktop hakemistossa. Tässä esimerkki *.ink-tiedostosta.

table Icon

Icon: /usr/share/pixmaps/firefox.png Width: 48 Height: 48

' Y: 68 endTässä vielä minun tiedostoni ~/.ideskrc ja ~/.pypanelrc josta voit ottaa mallia.

~/.ideskrc: Tätä kun tutkailee pystyy huomaamaan, että fonttia on säädetty paremmaksi ja vihreäksi sekä taustakuvan mode on scale. Tätä käyttämällä pääset helpoimmalla.

table Config

end table Actions

end~/.pypanelrc: Sitä on muokattu jo enemmän, fontit on nimittäin isonnettu ja värejä on säädetty jne. Tiedostossa ei saa olla ääkkösiä, edes kommenteissa joten muistakaapa se!

#


# # PyPanel v2.4 Configuration # # This configuration file is a Python script that will be executed when # PyPanel is started. In order for PyPanel to start properly, make sure that # this file contains proper Python formatting and no syntax errors. #


VERSION = 2.4 # Config file version #


# Colors: Format is hex triplet - 0xrrggbb #


BG_COLOR = "0xc6f6c6" # Panel background and tinting color TASK_COLOR = "0x80B080" # Normal task name color FOCUSED_COLOR = "0x80C080" # Focused task name color SHADED_COLOR = "0x808080" # Shaded task name color MINIMIZED_COLOR = "0x808080" # Minimized task name color DESKTOP_COLOR = "0x80B080" # Desktop name color CLOCK_COLOR = "0x80B080" # Clock text color LINE_COLOR = "0x606060" # Vertical line color # Text Shadow Colors TASK_SHADOW_COLOR = "0xffffff" FOCUSED_SHADOW_COLOR = "0xffffff" SHADED_SHADOW_COLOR = "0xffffff" MINIMIZED_SHADOW_COLOR = "0xffffff" DESKTOP_SHADOW_COLOR = "0xffffff" CLOCK_SHADOW_COLOR = "0xffffff" #


# Panel Spacing and Location Options: Measured in pixels #


P_LOCATION = 0 # Panel placement: 0 = top, 1 = bottom P_WIDTH = 0 # Panel width: 0 = Use full screen width P_START = 0 # Starting X coordinate of the panel P_SPACER = 6 # Spacing between panel objects P_HEIGHT = 24 # Panel height #


# Icon Size Options: Measured in pixels #


I_HEIGHT = 16 # Panel application icon height I_WIDTH = 16 # Panel application icon Width APPL_I_HEIGHT = 24 # Application launcher icon height APPL_I_WIDTH = 24 # Application launcher icon width TRAY_I_HEIGHT = 24 # System tray icon height (usually 16 or 24) TRAY_I_WIDTH = 24 # System tray icon width (usually 16 or 24)

#


# Panel Clock Format: 'man strftime' for detailed formatting options and help #


CLOCK_FORMAT = "%d.%m.%Y" # Ex: 2004-09-25 17:45 now %d.%m.%Y = 21.07.2006 #


# Clock Delay: Seconds between each clock update during periods of inactivity #


CLOCK_DELAY = 20 #


# Hidden Application List: Apps listed here will not be display on the panel # The application name is its WM_CLASS name, use 'xprop' to find WM_CLASS # Ex: ["xmms", "xine", "gDesklets"] #


HIDE_LIST = []

#


# Hidden Panel Size: Size of the panel when it's hidden/minimized #


HIDDEN_SIZE = 2 #


# Panel Text Font: This option takes either a traditional or Xft font string # Ex: "-schumacher-clean-medium-r-normal-*-12-*-*-*-*-*-*-*" # "aquafont-8" #


FONT = "bitstream vera sans-13" #


# Show All Applications: Show apps from all desktops or just the current # 0: Disabled - Only applications on the current desktop will be displayed # 1: Enabled - Selected apps are moved to the current desktop # 2: Enabled - Current desktop is changed to the selected apps desktop #


SHOWALL = 0 # 0, 1 or 2 - see descriptions above #


# Show Minimized/Iconified Applications: Show only minimized apps or all apps # 0: Disabled - Show all applications on the panel # 1: Enabled - Show only minimized apps on the panel #


SHOWMINIMIZED = 0 #


# Application Icon List: List of custom icons for specific applications # The application name is its WM_CLASS name, use 'xprop' to find WM_CLASS # # The "default" entry is used for applications with no icon. If left "", # PyPanel will use the default icon distributed with the source. # # Add entries using the following format - # "<application name>" : "<full path to icon>", #


ICON_LIST = {

#


# Application Launch List: Ordered list of icons and applications for the # application launcher. # # Add entries using the following format - # ("<executable>", "<full path to icon>") #


# katso /usr/share/pixmaps siella on kuvakkeita mm. #/usr/share/pixmaps/gnome-terminal.png # ("komento", "kuvake"), # ("komento2", "kuvake2"), LAUNCH_LIST = [

#


# Background Alpha/Shade Level: 0 (Fully Translucent) -> 255 (Fully Opaque) # BG_COLOR is used for tinting #


SHADE = 35 #


# Misc. Options: 1 = Enabled/Yes, 0 = Disabled/No #


ABOVE = 1 # Panel is always above other apps #On theTop APPICONS = 1 # Show application icons AUTOHIDE = 0 # Autohide uses the CLOCK_DELAY timer above SHADOWS = 0 # Show text shadows SHOWLINES = 0 # Show object seperation lines SHOWBORDER = 0 # Show a border around the panel #


# Desktop Names: Configure the names of your desktops # If the option is [], PyPanel will attempt to use the desktop name specified # by the XServer, if that fails it will use the desktop number as its name # Ex. ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight"] #


DESKTOP_NAMES = [] #


# Panel Layout:


# [ 1 ][ 2 ][ 3 ][ 4 ][ 5 ] #


# # The panel layout is split into 5 sections numbered 1, 2, 3, 4 or 5 as shown # in the diagram above. Each of the following objects can be enabled by # assigning it a section number or disabled by assigning it 0: #


DESKTOP = 4 # Desktop name section TASKS = 2 # Task names section TRAY = 3 # System tray section CLOCK = 5 # Clock section LAUNCHER = 1 # Application launcher section #


# Button Event Function Definitions #


# Left click - button 1 # Middle click - button 2 # Right click - button 3 # Wheel up - button 4 # Wheel down - button 5 # # changeDesktop(x) # - Change Desktop: Increase or decrease the current desktop by 'x' amount # # toggleShade(task) # - Shade or Unshade an application # # toggleHidden() # - Minimize the panel to the top or bottom depending on its start location # # toggleMinimize(task, traise=1) # - Minimize or Unminimize an application and optionally raise it # # taskRaise(task, focus=1) # - Raise an application to the top of the window list and optionally focus it # # taskLower(task, focus=0) # - Lower an app to the bottom of the window list and optionally focus it # # taskFocus(task) # - Give focus to the selected application, if it has focus then minimize it # # showDesktop() # - Toggle between hiding and unhiding ALL applications #


#


def desktopButtonEvent(pp, button): #


#


def clockButtonEvent(pp, button): #


# pp.toggleHidden()

#


def panelButtonEvent(pp, button): #


#


def taskButtonEvent(pp, button, task): #