Jump to content

Do not begin to migrate content here, it may be wiped without notice. More info.

DebianDesktopHowTo: Difference between revisions

From Debian wiki2025 alpha
mok0>1129650288.68.5573 (ChristianGatzemeier)
network shares
mok0>1129650288.68.5573 (ChristianGatzemeier)
update
Line 2: Line 2:
__NOEDITSECTION__
__NOEDITSECTION__
{{Warning|This is a wiki migration test page}}
{{Warning|This is a wiki migration test page}}
This page is here so we can keep a list of things one needs to do in order to install a basic debian-desktop. The goal is to shorten this list integrating things into debian. For more details see the subpages of [[DebianDesktop]].  
This is a community maintained list of things to do in order to get an appealing [[DebianDesktop]]. Your goal is to integrate things into debian and shorten this list.
-----
 
  * Boot from a Sarge install CD. Enter "linux26" at the bootprompt to get a 2.6 kernel and udev installed. Then install the base-system to your needs. When prompted by "tasksel" select the following task:  
== Selecting the Distribution ==
 
Choose [[DebianStable]] if you want the Computer to just work for a prolonged period of time, without new packages breaking your habbits or workflow. You may still install some packages from [http://backports.debian.org] and [http://mozilla.debian.net] to get newer versions of specific programms and always have a current web browser.
However, if it is important to you to always have recent versions of the software you install, choose [[DebianTesting]] (see that page for more info).  
 
== Selecting a Desktop Environment ==
 
To select the desktop environment that the debian-installer installs, enter "Advanced options" on the boot screen and scroll down to "Alternative desktop environments". Otherwise, debian-installer will choose Gnome.
KDE is of course renown heavy alternative.
Xfce is a fast and light alternative, and especially suited if you where using Gnome 2 and don't like Gnome 3.  
For older computers consider using LXDE or Xfce, because they are less resource hungry then Gnome or KDE.
 
== Installing ==
 
=== System ===
 
Leave the root password empty, to use sudo with your regular password for system administration.
Consider setting RAMRUN and RAMLOCK to "yes" in /etc/default/rcS.  
 
With "green" harddisk models or on laptops, install laptop-mode-tools and set CONTROL_HD_POWERMGMT=1 in /etc/laptop-mode.conf, to stop them from parking/unparking the heads every 8 seconds (clicking noise). (On NON-mobile devices you may even consider using a tool like idle3ctl to prevent load cycling alltogether.) See 'smartctl -a /dev/sdX' for your current Load_Cycle_Count.
 
If you installed stable but need a more recent version of a programm refer to http://backports.debian.org, and [http://packages.debian.org] to see what is available.  
 
If you want to adjust system defaults for all users of the system look into the files under /etc. Some desktop environments allow you to preconfigure proxies, javascript and cookie policy etc. For KDE you may refer to [http://techbase.kde.org/SysAdmin] for more info about the configuration, including making settings immutable to users.
=== Web Browser ===
 
Follow the instructions on [http://mozilla.debian.net] to keep a recent web browser installed on your system.  
For secure and sane browsing install the following extensions with the debian package manager: xul-ext-noscript, xul-ext-adblock-plus, xul-ext-cookie-monster, xul-ext-https-everywhere, and xul-ext-refcontrol. Consider the betterprivacy extension if you need to use flash.


<pre>  * desktop-environment </pre>
=== Creating (windows/cifs) Network Shares ===
After base-config is done there are some things left to do:
== Network Shares ==


To be able to share directories by right-clicking in nautilus, install package "nautilus-share" and then "sudo adduser <username> sambashare" to allow <username> to create file shares.  
Install cifs-utils and samba (if not present already), then "sudo adduser <username> sambashare" to allow <username> to create file shares.  
To allow guest access, in /etc/samba/smb.conf add
In squeeze, you also need to edit /etc/samba/smb.conf to be able to allow guest access to shares. Add
<pre> usershare allow guests = yes </pre>
<pre> usershare allow guests = yes </pre>
to the global section, and  
to the global section, and  
<pre> map to guest = bad user </pre>
<pre> map to guest = bad user </pre>
below the line "; security = user".  
below the line "; security = user".  
If your router does not resolve local hostnames correctly, or your using public DNS servers that respond with false IPs instead of unknown, in /etc/samba/smb.conf enable the "name roslve order" line (remove the ";") and move "host" to the end of the list.  
If your router does not resolve local hostnames correctly, and your ISPs DNS servers respond with false IPs instead of returning "unknown", in /etc/samba/smb.conf: enable the "name roslve order" line (remove the ";") and move "host" to the end of the list.  
== Shared Directories ==
 
This is handy to easily share files, pictures, shared documents, etc. on multi-user systems (family PCs etc.).  
=== Additional packages you may want to install ===
Because Debian uses a ''user private group'' (UPG) scheme by default, the default  permissions for new files (umask) can be set to allow write access to the group. [http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/ref-guide/s1-users-groups-private-groups.html Explanation at RedHat website.]  
 
Use '''apt-get install <packagename>''', or the synaptic package manager to find, select and install the following packages:
* synaptic (not included with the Xfce desktop) * preload (will preload often used programms into ram) * mc (midnight commander, a console filemanager) * a ssh-askpass package (lets ssh use a graphical password prompt window when run under X) * geeqie (fast picture viewer) * vlc, browser-plugin-vlc, freetuxtv (video  player) * parcellite (clipboard manager) * autokey (keyboard shortcuts) * zim (mangaging notes) * goldendict-worldnet (englisch dictionary) * ding + trans-de-en + agrep (translations) * shotwell (photo manager)    === Locally Shared (Group) Directories ===
 
This explains how to easily share files, pictures, shared documents, etc. on a multi-user system (family PCs, servers etc.).  
Because Debian uses a ''user private group'' (UPG) scheme by default, the default  permissions for new files (umask) can be set to allow write access to the group by default. [http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/ref-guide/s1-users-groups-private-groups.html Explanation at RedHat website.]  
To create groups use "addgroup <GROUPNAME>" as root. For example on your home PC you could create a group "family" and add the appropriate users to it.  
To create groups use "addgroup <GROUPNAME>" as root. For example on your home PC you could create a group "family" and add the appropriate users to it.  
Then create a family group directory: Do "mkdir /home/family", give it to the group with "chown :family /home/family" and change its permissions for example with <code> chmod u+rwx,g+rws,o-rwx /home/family </code> to a privately shared set-group-id directory (in octal notation: 2770).  
Then create a family group directory: Do "mkdir /home/family", give it to the group with "chown :family /home/family" and change its permissions for example with <code> chmod u+rwx,g+rws,o-rwx /home/family </code> to a privately shared set-group-id directory (in octal notation: 2770).  
Finally, change the default umask to 002. Unless libpam-umask is installed (see below), this has to be set in /etc/profile and /etc/login.defs . Now family group members can work with each other's files in the group directory without permission hassle.  
Finally, change the default umask to 002. Unless libpam-umask is installed (see below), this has to be set in /etc/profile and /etc/login.defs . Now family group members can work with each other's files in the group directory without permission hassle.  
If you've already got an existing directory full of files (pictures/music/whatever), [http://www.stubbornroses.com/setgid this script might save you some time].  
If you've already got an existing directory full of files (pictures/music/whatever), [http://www.stubbornroses.com/setgid this script might save you some time].  
-----------
Until [http://bugs.debian.org/646692 bug 646692] is fixed, you need to configure /etc/pam.d/common-session: 
  * Security Note: It is not always a good idea to change your umask.  This will set any new file created as group writable.  Depending on what part of the system you're in, this could be a bad thing.  UPG Schemes do take most of the worry away; just be cognizant of these facts when you create files in any 'special' directories. There is another (more complicated) way to do this as well, using Access Control Lists (ACLs).  [http://72.14.203.104/search?q=cache:wFfovWzRbZcJ:www.linux-mag.com/2003-09/acls_01.html+shared+directory+permissions+groups+ext3&hl=en&gl=us&ct=clnk&cd=2&lr=lang_en&client=firefox-a Check here] [http://www.udel.edu/topics/os/unix/general/groupsharing.html and here] for more information.  
 
<pre> session    optional    pam_umask.so usergroups </pre>
 
--------------
   
There is another (more complicated) way to do this as well, using Access Control Lists (ACLs).  [http://72.14.203.104/search?q=cache:wFfovWzRbZcJ:www.linux-mag.com/2003-09/acls_01.html+shared+directory+permissions+groups+ext3&hl=en&gl=us&ct=clnk&cd=2&lr=lang_en&client=firefox-a Check here] [http://www.udel.edu/topics/os/unix/general/groupsharing.html and here] for more information.  


<pre> In a nutshell: apt-get install acl sarge kernels: filesystems supported -> ext2,ext3,jfs,xfs etch kernels support: ext2,ext3,reiserfs,jfs,xfs,nfs (with module nfs_acl) change /etc/fstab options for drive you want to use acls on ie /dev/hda5      /pub      ext3    defaults,acl    0      0 cd /pub mkdir family setfacl -m d:u::rwx,d:g:family:rw,d:m:rw,d:o:--- family        this will set the umask of the family directory such that all files created will be -rw-rw----+ and all directories created will be drwxrwS---+. This might not be entirely correct. At the very least, NFS has to be configured for ACLs, or an NFS server on Sarge and NFS Client in Etch can't handle ACLs. "getfacl family" will show you the permissions. </pre>
<pre> In a nutshell: apt-get install acl sarge kernels: filesystems supported -> ext2,ext3,jfs,xfs etch kernels support: ext2,ext3,reiserfs,jfs,xfs,nfs (with module nfs_acl) change /etc/fstab options for drive you want to use acls on ie /dev/hda5      /pub      ext3    defaults,acl    0      0 cd /pub mkdir family setfacl -m d:u::rwx,d:g:family:rw,d:m:rw,d:o:--- family        this will set the umask of the family directory such that all files created will be -rw-rw----+ and all directories created will be drwxrwS---+. This might not be entirely correct. At the very least, NFS has to be configured for ACLs, or an NFS server on Sarge and NFS Client in Etch can't handle ACLs. "getfacl family" will show you the permissions. </pre>
-----------
-----------
  * Good information James. Can you be more specific about your security concerns? Maybe move ACL stuff to a separtate page like [[FilesystemAccessControlLists]] and reference it from this how to? [[MultiUserManagement]] translation may also be of interest for you. Have you subscribed this page? Information about [http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-users-groups-private-groups.html user private groups]. A pretty good permissions primer can be found at: "http://linsec.ca/filesystems.php"  
  * Good information James. Maybe move ACL stuff to a separtate page like [[FilesystemAccessControlLists]] and reference it from this how to? [[MultiUserManagement]] translation may also be of interest for you. Have you subscribed this page? Information about [http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-users-groups-private-groups.html user private groups]. A pretty good permissions primer can be found at: "http://linsec.ca/filesystems.php"  
== CUPS Printing System ==
(default package selection) Install and configure the CUPS printing system packages as described on [[DebianCUPS]].
Start /usr/lib/openoffice/spadmin as root "add printer" and import your printers setup from /etc/foomatic/cups.
== Default package selection ==
(synaptic only recommending)) "apt-get install libgnome2-perl" if you want the Gnome debconf frontend to actually work when you install packages. You may need to configure debconf to use "GNOME" frontend with "dpkg-reconfigure debconf" (Doesn't Synaptic let debconf start in appropriate mode within GNOME?).
(default package selection) Start up Synaptic and find, select and install the following packages:
* anacron (desktops/laptops don't usually run all the time (at night, weekends, etc.) (alternatively fcron?) * If you need localized fonts: xfonts-base-transcoded and xfonts-*dpi-transcoded * zip and unzip * mc (midnight commander console filemanager) * ssh-askpass (lets ssh use a graphical password prompt window when run under X) Are the following actually needed? For what benefit? They are non-free anyway:
* x-ttcidfont-conf (needed for the next) * msttcorefonts (to display some webpages and documents correctly) -----
* Now some configuring: To actually make use of the private user groups in debian you have to set the default to "umask 002" in /etc/login.defs, /etc/profile and other shell config files, or better: install libpam-umask and you can centrally set a real system wide default umask with a line like this in /etc/pam.d/common-session:


<pre> session    optional    pam_umask.so umask=002 </pre>
== Desktop Specific Adaptions ==
(In this case don't forget to remove any umask lines from /etc/login.defs, /etc/profile etc.)
There is currently a bug (DebianBug:336214) in gdm which will prevent the umask settings above from working if you are using gdm (the Debian default) as your login manager.  To work around this bug, edit /etc/gdm/Xsession and add the line


<pre> umask 002 </pre>
=== Gnome ===
just after the line containing "Beginning session setup..."
 
The central settings for KDE in /etc/kde3 could also need some tweaking:
To create network shares with Gnome's nautilus, install package "nautilus-share".  
* set CUPS as default printing system (Put the following into /etc/kde3/kdeprintrc)
 
<pre>  ["General"]  PrintSystem=cups </pre>
=== Xfce ===
* If you like, make $HOME to be your Desktop for consistency. (Put the following into /etc/kde3/kdeglobals)
 
<pre>   ["Paths"]    Desktop=$HOME    Trash=$HOME/Trash/ </pre>
For network browsing, install gvfs-backends and gvfs-fuse and add your users to the 'fuse' group (sudo adduser <user> fuse). In squeeze, you also need to install and use gigolo, because the thunar file browser version used in sqeeze was not yet able to browse network shares (windows/cifs) directly.
* If you need particular KDE system defaults like proxy, javascript and cookie policy etc., set them in the same way, too. [http://www.kde.org/areas/sysadmin] has more info about the configuration files, including making settings immutable to users. ...have fun! And if you encounter bugs search the net, if the bug is not already filed, find the appropriate package and the file a bug against it, if it concerns Debian simply use the "reportbug" utility for that.  
To create network shares with Xfce's thunar, follow [http://forums.linuxmint.com/viewtopic.php?f=197&t=88255 these steps].
== Troubleshooting ==
Install catfish to be able to search for files.
For manual setup of the graphic you can use dpkg-reconfigure xserver-xfree86.
You can get rid of the space consuming "dock" thing by deleting Panel 2 in the Pannel settings and adding the desired starters to Pannel 1. You can move the panel to another location on the desktop while it is unlocked it in the settings.  
An alternative automatic configuration of the x-server is to install xdebconfigurator, run it, and then dexconf to generate a valid [[XF86config]].
 
== Things that have already been integrated ==
-----
* autoconfiguration of the xserver
...have fun! And if you encounter bugs search the net, if the bug is not already filed, find the appropriate package and file a bug against it. If it concerns Debian simply use the "reportbug" utility for that.  

Revision as of 17:21, 16 June 2012


⚠️ This is a wiki migration test page

This is a community maintained list of things to do in order to get an appealing DebianDesktop. Your goal is to integrate things into debian and shorten this list.

Selecting the Distribution

Choose DebianStable if you want the Computer to just work for a prolonged period of time, without new packages breaking your habbits or workflow. You may still install some packages from [1] and [2] to get newer versions of specific programms and always have a current web browser. However, if it is important to you to always have recent versions of the software you install, choose DebianTesting (see that page for more info).

Selecting a Desktop Environment

To select the desktop environment that the debian-installer installs, enter "Advanced options" on the boot screen and scroll down to "Alternative desktop environments". Otherwise, debian-installer will choose Gnome. KDE is of course renown heavy alternative. Xfce is a fast and light alternative, and especially suited if you where using Gnome 2 and don't like Gnome 3. For older computers consider using LXDE or Xfce, because they are less resource hungry then Gnome or KDE.

Installing

System

Leave the root password empty, to use sudo with your regular password for system administration. Consider setting RAMRUN and RAMLOCK to "yes" in /etc/default/rcS.

With "green" harddisk models or on laptops, install laptop-mode-tools and set CONTROL_HD_POWERMGMT=1 in /etc/laptop-mode.conf, to stop them from parking/unparking the heads every 8 seconds (clicking noise). (On NON-mobile devices you may even consider using a tool like idle3ctl to prevent load cycling alltogether.) See 'smartctl -a /dev/sdX' for your current Load_Cycle_Count.

If you installed stable but need a more recent version of a programm refer to http://backports.debian.org, and [3] to see what is available.

If you want to adjust system defaults for all users of the system look into the files under /etc. Some desktop environments allow you to preconfigure proxies, javascript and cookie policy etc. For KDE you may refer to [4] for more info about the configuration, including making settings immutable to users.

Web Browser

Follow the instructions on [5] to keep a recent web browser installed on your system. For secure and sane browsing install the following extensions with the debian package manager: xul-ext-noscript, xul-ext-adblock-plus, xul-ext-cookie-monster, xul-ext-https-everywhere, and xul-ext-refcontrol. Consider the betterprivacy extension if you need to use flash.

Creating (windows/cifs) Network Shares

Install cifs-utils and samba (if not present already), then "sudo adduser <username> sambashare" to allow <username> to create file shares. In squeeze, you also need to edit /etc/samba/smb.conf to be able to allow guest access to shares. Add

 usershare allow guests = yes 

to the global section, and

 map to guest = bad user 

below the line "; security = user". If your router does not resolve local hostnames correctly, and your ISPs DNS servers respond with false IPs instead of returning "unknown", in /etc/samba/smb.conf: enable the "name roslve order" line (remove the ";") and move "host" to the end of the list.

Additional packages you may want to install

Use apt-get install <packagename>, or the synaptic package manager to find, select and install the following packages:

  • synaptic (not included with the Xfce desktop) * preload (will preload often used programms into ram) * mc (midnight commander, a console filemanager) * a ssh-askpass package (lets ssh use a graphical password prompt window when run under X) * geeqie (fast picture viewer) * vlc, browser-plugin-vlc, freetuxtv (video player) * parcellite (clipboard manager) * autokey (keyboard shortcuts) * zim (mangaging notes) * goldendict-worldnet (englisch dictionary) * ding + trans-de-en + agrep (translations) * shotwell (photo manager) === Locally Shared (Group) Directories ===

This explains how to easily share files, pictures, shared documents, etc. on a multi-user system (family PCs, servers etc.). Because Debian uses a user private group (UPG) scheme by default, the default permissions for new files (umask) can be set to allow write access to the group by default. Explanation at RedHat website. To create groups use "addgroup <GROUPNAME>" as root. For example on your home PC you could create a group "family" and add the appropriate users to it. Then create a family group directory: Do "mkdir /home/family", give it to the group with "chown :family /home/family" and change its permissions for example with chmod u+rwx,g+rws,o-rwx /home/family to a privately shared set-group-id directory (in octal notation: 2770). Finally, change the default umask to 002. Unless libpam-umask is installed (see below), this has to be set in /etc/profile and /etc/login.defs . Now family group members can work with each other's files in the group directory without permission hassle. If you've already got an existing directory full of files (pictures/music/whatever), this script might save you some time. Until bug 646692 is fixed, you need to configure /etc/pam.d/common-session:

 session    optional     pam_umask.so usergroups 

There is another (more complicated) way to do this as well, using Access Control Lists (ACLs). Check here and here for more information.

 In a nutshell: apt-get install acl sarge kernels: filesystems supported -> ext2,ext3,jfs,xfs etch kernels support: ext2,ext3,reiserfs,jfs,xfs,nfs (with module nfs_acl) change /etc/fstab options for drive you want to use acls on ie /dev/hda5       /pub       ext3    defaults,acl    0       0 cd /pub mkdir family setfacl -m d:u::rwx,d:g:family:rw,d:m:rw,d:o:--- family         this will set the umask of the family directory such that all files created will be -rw-rw----+ and all directories created will be drwxrwS---+. This might not be entirely correct. At the very least, NFS has to be configured for ACLs, or an NFS server on Sarge and NFS Client in Etch can't handle ACLs. "getfacl family" will show you the permissions. 

* Good information James. Maybe move ACL stuff to a separtate page like FilesystemAccessControlLists and reference it from this how to? MultiUserManagement translation may also be of interest for you. Have you subscribed this page? Information about user private groups. A pretty good permissions primer can be found at: "http://linsec.ca/filesystems.php" 

Desktop Specific Adaptions

Gnome

To create network shares with Gnome's nautilus, install package "nautilus-share".

Xfce

For network browsing, install gvfs-backends and gvfs-fuse and add your users to the 'fuse' group (sudo adduser <user> fuse). In squeeze, you also need to install and use gigolo, because the thunar file browser version used in sqeeze was not yet able to browse network shares (windows/cifs) directly. To create network shares with Xfce's thunar, follow these steps. Install catfish to be able to search for files. You can get rid of the space consuming "dock" thing by deleting Panel 2 in the Pannel settings and adding the desired starters to Pannel 1. You can move the panel to another location on the desktop while it is unlocked it in the settings.


...have fun! And if you encounter bugs search the net, if the bug is not already filed, find the appropriate package and file a bug against it. If it concerns Debian simply use the "reportbug" utility for that.