Docs/Desktop/Desktops
From Mandriva Community Wiki
Contents |
[edit] KDE Desktop
- http://www.mandrivalinux.com/en/demos/tutorials/desktopconfig/ Tutorial: Configure the Mandriva Linux - KDE desktop:
[edit] KDE Tip Tricks and Tweaks
One of the things I hated in Windows and Mac is that they have decided what looks good in a desktop and you have to live with it (barring color changes, wallpaper and 3rd party software that you have to purchase 6 times over 2 years to finally get something that doesn't make your box unstable and require a gig of ram to run.) To that end I've run KDE since the pre-1.0 days. (like about 0.1 when it was !FreeBSD only.) So here come some tricks.
[edit] Auto start and Auto stop when logging in and out of KDE
I've found my self often enough wanting to key events to users loggin in and out of KDE. Most notably this would be something like doing an NFS or Samba mount of a data directory for a user. But what I don't want is for the user to login... the service gets mounted, then they log out and it gets mounted again! (Samba especially will allow this to happen over and over again.)
Originally about KDE 3.0 I found I needed this and it wasn't there ... some bugging of some KDE core members I've had the priviledge of meeting and I now find that there is a way to do this, and it seems to have been introduced for sure with the later 3.3 releases and possibly earlier.
$ cd ~/.kde $ mkdir Autostart (if it isn't already there) $ mkdir shutdown (if you use kgpg this may exist.)
This is all done as the user that owns this home directory. If you are a root admin either make sure that you chown the files and dirs correctly, or su to the user name before creating this.
Note to the case of the two directories. If you change the case things stop working. Why they used shutdown instead of Shutdown I don't know.
Now place in Autostart a small shell script, perl script, python script or any other binary you want to run on login. Make sure it is chmod 755 and it will get run. Then in shutdown you place a script/binary/executable to "reverse" what you did. You now have programs that get run automatically depending on the user's login status.
Note that cntrl-alt-bksp or non-intentional crashes of KDE and/or X will go "around" this shutdown.
[edit] KDE Power Management Tweaks 9.2 through 10.1
Open kcontrol (In the K menu System > Configuration >Configure Your Desktop > Power Control you want to open the Power Control section. The first thing you need to do is click on the "Low Battery Critical" tab and open it. Here you should consider setting the level to 5 min (time left on the battery) and then in the System State Change section I recommend choosing "Hibernate" This way if you are away from your computer when the battery goes critical you won't lose your work. System power off will close all open applications and logoff won't stop power usage. Click Apply to save your changes.
Now chose the Low Battery Warning. I recommend setting this at 15 minutes. At 15 minutes you will want it to give you a popup warning, and I like it to play a sound, or just do a system beep. Choose those checkboxes. I recommend against hibernation, logoff or shutdown here. There is plenty of time to get your power cord out of the case and you don't want to lose work. Click on Apply to save the changes.
Next pick the "Button Actions" tab and set your Lid Switch Closed section to Hibernate. That way when you close the lid in KDE it will hibernate the box. Click on Apply to save the changes.
Now click on the WebBrowsing section in the left hand menu and click on Cache UNCHECK the Use cache button. In the days of 486's and Pentium processors Cache helped immensly with speeding up browsing. Modern systems and with the advent of broadband, cache no longer helps but it can go a long way to destroying battery life. Why? Every time you visit a page your HDD will have to spin up to either read from or write to Cache. Cache on a laptop is a battery robber disable it. You won't notice the difference except in battery life. Click Apply to save your changes.
In the preferences section of your Mozilla or Firefox browsers do the same thing. Here you set the Cache size to 0 and this will disable the cache for them as well.
Turn off Screen Savers. You can't burn an LCD screen, like you can a CRT so a screen saver doesn't help you. If you need to lock the session there is an option in the KDE menu to lock session. But shutting off Screen Savers when on Battery goes a long way to saving power. If you have to have a screen saver at least go into kcontrol as before, under PowerControl-Laptop Battery the first tab "Battery" chose the check box "Use Blank Screen Saver when running on Battery" . Click Apply to save.
Consider turning off swap. On my laptop I don't even swap when doing a compile, so .... why keep it running. It also cuts down the chance that my HDD will need to spin up for a "system check" Basically if you are going to be doing something that is so memory intensive that you need to be swapping consider finding an outlet.
The way to get it to turn off/on is it edit the file /etc/acpi/actions/battery.sh . Add the command swapon -a to the "on-line" section and swapoff -a to the "offline section. Now when you pull the plug you won't have to worry about an application spinning up the drive just to "check" if swap is available.
If you have a program to control your backlight level from the command line you can also edit the same file as above to have it automatically lower or raise the backlight level depending on whether you are on battery or on AC.
Finally remember if you don't need it. Set it to turn off. If there is a tool for decreasing / increasing the brightness of the backlight on your laptop use that as well. If you drop the level of your backlight it can only serve to increase battery life.
[edit] GNOME
GNOME is a desktop for Linux/Un*x that puts heavy emphasis on simplicity, usability, and making things “just work”.
[edit] IceWM
This page contains info on the source files and links to the manual and FAQ. The manual is also available in /usr/share/doc if you have IceWM installed. And you should, as it is a very nice WM, especially in combination with ROX-Filer. Very customizable and very fast. Try it!
[edit] Other window managers
The other window managers in the Mandriva Linux distribution and 'contrib' include:
- AfterStep
- Enlightenment
- Blackbox
- Fluxbox
- Openbox
- Pekwm
- Ratpoison
- ROX
- Sawfish
- Waimea
- WindowMaker
- XFCE4
[edit] Support on Desktops and Window Managers
[edit] Login Managers
[edit] HOWTO add new sessions installed using Konstruct or Garnome to GDM
NOTE: I installed KDE3.4 in /home/gireeshb i.e. a new user as .kde files for KDE3.2 might create problems. Change the directory entries in the code shown below as per your setup.
1. Check in /etc/X11/wmsession.d. See what all is there and make sure you create new entry for your new KDE. I named mine 04KDE34. The file contents look as follows;
NAME=KDE34 ICON= DESC=KDE34 Environment EXEC=/usr/bin/startkde2 SCRIPT: exec /usr/bin/startkde2
2. Create a new script in /usr/bin. I named mine startkde2. The file looks as follows;
#!/bin/sh export QTDIR=/home/gireeshb/kde3.4 export KDEDIR=/home/gireeshb/kde3.4 export KDEDIRS=/home/gireeshb/kde3.4 export LD_LIBRARY_PATH=/home/gireeshb/kde3.4/lib export PATH=/home/gireeshb/kde3.4/bin:$PATH exec /home/gireeshb/kde3.4/bin/startkde
3. Check the entries in /etc/X11/dm/Session. Make a new entry for your KDE (HINT: they are .desktop files. Create them like the other GNOME and KDE entries.) I named mine 04KDE34.
[Desktop Entry] Encoding=UTF-8 Name=KDE34 Comment=KDE34 TryExec=/usr/bin/startkde2 Exec=/etc/X11/xdm/Xsession KDE34 Icon= Type=Application
4. When using garnome for GNOME2.10 create a garnome-session script in your home directory as follows
#!/bin/sh GARNOME=~/garnome PATH=$GARNOME/bin:$GARNOME/sbin:$PATH LD_LIBRARY_PATH=$GARNOME/lib:$LD_LIBRARY_PATH PYTHONPATH=$GARNOME/lib/python2.3/site-packages PKG_CONFIG_PATH=$GARNOME/lib/pkgconfig:/usr/lib/pkgconfig XDG_DATA_DIRS=$GARNOME/share XDG_CONFIG_DIRS=$GARNOME/etc/xdg GDK_USE_XFT=1 export PATH LD_LIBRARY_PATH PYTHONPATH PKG_CONFIG_PATH export GDK_USE_XFT XDG_DATA_DIRS XDG_CONFIG_DIRS exec $GARNOME/bin/gnome-session
5. Create /usr/bin/startgnome2 with the following
exec /home/gireeshb/garnome-session
6. Create entries in /etc/X11/wmsession.d and /etc/X11/dm/Session as done for KDE above.
7. as su, gdm-restart. Enjoy the newest KDE and GNOME
[edit] Cannot login as root
For security reasons, the latest version of mdkkdm (the Mandriva Login Manager) does not allow to log in as root. Here are some options if this is getting your goat:
- don't log in as root. Login to your desktop as a user, then open a console and become super user there (su). Any application can be launched from this command line with root priviledges. You can run the app with root priviledges simply by typing its name, eg. k3b-setup
- use one of the other display managers, kdm or gdm, instead of mdkkdm: choose one and then either urpmi gdm or urpmi kdebase-kdm to install, then urpme mdkkdm to remove the Mandriva login manager. Alternatively, there is a new drakXtool included with 9.1 that can do this for you. It's called drakedm and you can run it from the Mandriva Linux Control Center or from the command line.
- open a console (Ctrl+Alt+F1). login as root and then start another X session. startx -- :1
- If you login as a user and go to the login manager section of the KDE Control Center (kcontrol), then you can change the login screen to display the root login. You have the option of showing root in your user list or hiding all individual logins, so all user names must be typed in.
Note 1 : Once you're logged in as root, the system keeps prompting the password: This is due to the screensaver configuration.
If you only want to be root to install software, and like to work from a gui, in kde you can either
- From the menu, Configuration > Packaging > Install Software, which will ask for root password, or better:
- From Mandriva Linux Control Center, Software Management > RpmDrake, which also requires a root password
For other purposes in kde you can use File Manager Super User Mode.
Note 2 : Since 2005 LE the default login manager is kdm and no more mdkkdm.
Note 3 : It is generally not a good idea to login as root. Better log in as user and su to execute functions with the role of root.
Note 4 : 'su' is short for 'substitute user'; not 'super user'.
[edit] Menu System Issues
[edit] The menu is broken
In KDE or Gnome, if your menu does not contain all the entries it should (in the extreme case, it can even be empty), you can simply runupdate-menus -v
[edit] KDE-Specific
[edit] Updating KDE via urpmi
Hawkwind has written a HOW-TO for upgrading to KDE 3.4 with 2005LE at http://linuxfordummies.org/viewtopic.php?t=302
[edit] KDE: Cannot reboot
This is a known bug: http://qa.mandriva.com/show_bug.cgi?id=3084
(NB: This bug has been marked as 'OLD' and is not getting attention at all. If anyone does experience this bug, please reopen or copy to a new bug).
[edit] KDE: There is no screensaver available
They are not installed by default (?), install the package kdeartwork.
[edit] Useful Links
- http://kde-look.org/: Themes and backgrounds for KDE users
- http://art.gnome.org/: Themes and backgrounds for GNOME users
- http://xphowto.lunarhub.com/: Using Xplanet as a desktop background (MDK 8.x/9.0)