https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mashi&feedformat=atomArchWiki - User contributions [en]2024-03-28T22:56:00ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Changing_filetype_association_via_MIME&diff=21319Changing filetype association via MIME2007-02-27T10:04:35Z<p>Mashi: created</p>
<hr />
<div>Many of you will be wanting to run windows apps within your linux installation, and you can do this via the wonderful [[Wine]]. This guide will show you how to alter your MIME database in a safe way so that you can associate windows executables with Wine.<br />
'''Warning''': Do NOT attempt to modify the mime database directly!<br />
<br />
<br />
* First, create the file "~/.local/share/mime/packages/mine.xml", as such:<br />
<br />
<br />
$ mkdir -p ~/.local/share/mime/packages<br />
$ cd ~/.local/share/mime/packages<br />
$ touch mime.xml<br />
(Or you can just do it with your graphical file browser)<br />
<br />
<br />
* Next, open up mine.xml and paste the following inside:<br />
<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"><br />
<mime-type type="application/x-ms-dos-executable"><br />
<comment xml:lang="en">Windows Executable</comment><br />
<glob pattern="*.exe"/><br />
</mime-type><br />
</mime-info><br />
<br />
<br />
* Finally, enter this at the command prompt:<br />
<br />
<br />
$ update-mime-database ~/.local/share/mime<br />
<br />
<br />
That's it!<br />
<br />
The method outlined above will intergrate the xml file you made with the mime database, so that you can make your own associations for .exe files (probably [[Wine]]).</div>Mashihttps://wiki.archlinux.org/index.php?title=Xfce&diff=21250Xfce2007-02-22T02:46:35Z<p>Mashi: Added instructions to enable compositor (Xfce4.4+)</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:Tutorials (English)]]<br />
<br />
== What is Xfce?==<br />
Xfce is a Desktop Environment, like GNOME or KDE. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce?==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast, faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's Xinerama support is the best out of any WM/DE, IMO.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
<br />
== Why not use Xfce?==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce==<br />
The Xfce source and documentation are available at http://xfce.org. But since you're using ArchLinux, you can grab Xfce from Pacman.<br />
<br />
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.<br />
<br />
To install the base Xfce4 system, run:<br />
<br />
<pre><br />
# pacman -S xfce4<br />
</pre><br />
<br />
If you want extras, like Panel plugins (you probably do), run this:<br />
<br />
<pre><br />
# pacman -S xfce4-goodies<br />
</pre><br />
<br />
Note that after installing Xfce, you will want to log your user out so that paths update (as Xfce is installed to /opt).<br />
<br />
== Running Xfce4==<br />
<br />
There are two ways to run Xfce4. One is the "automatic" method. To start Xfce from the console, you can simply run:<br />
<br />
<pre><br />
# startxfce4<br />
</pre><br />
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.<br />
<br />
To customize the Xfce startup using this method, you'll copy /opt/xfce4/etc/xdm/xfce4/xinitrc (/opt/xfce4/etc/xdg/xfce4/xinitrc instead for me using Noodle release) to $HOME/.xfce4, and edit that file<br />
To add programs to the startup up using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.<br />
<br />
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):<br />
<br />
<pre><br />
xfce-mcs-manager<br />
xfwm4 --daemon<br />
xfdesktop &<br />
exec xfce4-panel<br />
</pre><br />
<br />
or<br />
<pre><br />
# exec xfce4-session<br />
</pre><br />
<br />
== How To Use Xfce With DM's==<br />
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply [[ Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup| Enable a DM]].<br />
<br />
==How to shutdown and reboot from Xfce==<br />
* Install sudo:<br />
# pacman -S sudo<br />
* Add the following line at the end of <code>/etc/sudoers</code> file with visudo command:<br />
# visudo<br />
<br />
user ALL=(root) NOPASSWD: /opt/xfce4/libexec/xfsm-shutdown-helper<br />
where 'user' is the name of the user you want to allow to shutdown and reboot pc from Xfce.<br />
<br />
Alternatively you can create ''shutdown'' group and allow all its members to shutdown:<br />
%shutdown ALL=(root) NOPASSWD: /opt/xfce4/libexec/xfsm-shutdown-helper<br />
<br />
# groupadd shutdown<br />
# gpasswd -a user shutdown<br />
where 'user' is name of the user.<br />
<br />
To allow all users to be able to shutdown system add this to /etc/sudoers:<br />
%users hostname=NOPASSWD:/opt/xfce4/libexec/xfsm-shutdown-helper<br />
Where hostname is the name of current machine.<br />
<br />
==How to enable the compositor in Xfce 4.4+==<br />
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.<br />
<br />
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:<br />
* Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that ''<option name="Xfwm/UseCompositing" type="int" value="1"/>'' is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.<br />
* Make sure the following lines are in your /etc/X11/xorg.conf file:<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
</pre><br />
* Finally, restart X and the compositor should be available.<br />
<br />
== Related Articles ==<br />
* [[Build order for XFCE]]<br />
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]<br />
<br />
== External Resources==<br />
* [http://www.us.xfce.org/documentation/ XFCE.org] - The complete documentation.<br />
* [http://www.xfce-look.org/ XFCE-Look] - Themes, wallpapers, and more.<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Mashi