Pages

Showing posts with label Xfce. Show all posts
Showing posts with label Xfce. Show all posts

May 01, 2016

Adding "Run" options to Thunar

 Clicking on executable shell files no longer executes them in Thunar.

While there is a hidden option to revert to the old behavior, I decided in a new install to instead add right menu "Run" and "Run in terminal" custom actions. First create the custom actions from within Thunar to get valid unique-ids, and then open ~/.config/Thunar/uca.xml and edit the entries as needed:

<action>
    <icon>system-run</icon>
    <name>Run</name>
    <unique-id>xxxxxxxxxxxxxxxx-x</unique-id>
    <command>exec ./&apos;%n&apos;</command>
    <description>Execute this file</description>
    <patterns>*</patterns>
    <other-files/>
    <text-files/>
</action>
<action>
    <icon>xterm-color</icon>
    <name>Run in terminal</name>
    <unique-id>yyyyyyyyyyyyyyyy-y</unique-id>
    <command>xterm -T &apos;%n&apos; -e &quot;./&apos;%n&apos;; echo &apos;&apos;; read -p &apos;Press &lt;Enter&gt; to close...&apos;&quot;</command>
    <description>Execute this file in a terminal</description>
    <patterns>*</patterns>
    <other-files/>
    <text-files/>
</action>

October 12, 2015

Midori browser font rendering

I was having issues with Midori not rendering fonts the way I thought it should in aptosid XFCE. I set a default.css in ~/.local/share/midori/styles/default.css:
* {
    font-smooth:always !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
    text-rendering: optimizeLegibility !important;
}
but that didn't fix what appeared to be wonky antialiasing. So I had a look in my ~/.Xresources and lo!:
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefaul  !!! Typo here !!! Should be "lcddefault".
Things are much improved now. I'm not 100% certain that it's 100% right, but it's definitely mostly right.

The takeaway for you, dear reader, is not to ignore your display configuration in  ~/.Xresources.

August 21, 2015

Fixing Qt5 themes in Xfce

A lot of my Qt apps (e.g., qpdfview, VLC) recently stopped respecting my GTK theme. I did some checking, and it turns out they are all Qt5 apps. Google led me to the QT5 apps don't obey GTK theme settings post at the Manjaro Linux forum, which has some interesting things to say (generally applicable to all distributions).

What I eventually did was add:

# Workaround for Qt5 app theming.
export QT_STYLE_OVERRIDE=gtk


to the end of my my .profile, logout and log back in. Works now.

September 08, 2013

Quicktile

 
Quicktile is an nifty Python script by Stephan Sokolow that lets you tile windows in non-tiling window managers. I am currently using it with Xfce and Fluxbox (with and without xcompmgr). So far it has been pretty sweet.

The default key-bindings assume you have a numeric keypad, which my main lappy lacks. So, I cobbled together the following quicktile.cfg. It uses the alphabetic keys on the right side of a QWERTY keyboard, with key locations mapping to tile location. It also uses Windows+Alt to mask the commands instead of the original Ctrl+Windows.
[general]
cfg_schema = 1
UseWorkarea = True
ModMask = Mod1 Mod4

[keys]
C = move-to-center
H = horizontal-maximize
V = vertical-maximize
0 = maximize
b = bottom-left
n = bottom
m = bottom-right
j = left
k = middle
l = right
i = top-left
o = top
p = top-right
KP_Enter = monitor-switch

June 22, 2012

Fixing Qt appearance under XFCE 4.8 (aptosid)

On my aptosid setup running Xfce, Qt apps don't honor the GTK appearance setting without some help. The post at http://forum.xfce.org/viewtopic.php?id=5605 provides a solution that worked for me:
# echo 'export GTK2_RC_FILES="$HOME/.gtkrc-2.0"' >> /etc/profile.d/qgtkstyle.sh
# chmod 755 /etc/profile.d/qgtkstyle.sh
then logout and back in.

With Xfce taking on increasing importance since the introduction of GNOME 3, I hope this will work out-of-the-box in the near future.

September 25, 2011

Selecting sudo/su authentication mode (without gconf-editor)

This may be Debian-specific.

Apps like 'Synaptic' and 'Root Terminal' when launched from a desktop menu (e.g., your panel's applications menu) will ask for authentication. By default, Debian uses gksu for these tasks. However, it's possible and quite easy to configure things so gksudo is used instead. The following assumes you have already configured your system and user to use sudo.

I first learned how to do change the setting by using gconf-editor. If you have gconf-editor installed, go to the entry for /apps/gksu and click the checkbox next to sudo-mode. But that's the fiddly way to do it. I just discovered by accident a much easier way -- one that doesn't require gconf-editor. Simply launch:

$ gksu-properties

as user (not root) and set Authentication mode to su (to use gksu) or sudo (for gksudo). While you're there, you can also disable screen grabbing, though why you'd want to I'm not really sure.

Note that this is a per user setting. There's probably a system-wide config for this, but I'm feeling too lazy to find it.

December 20, 2010

XDG menus in Openbox

Now I feel stupid. For year(s) I've been sorta griping about how the Openbox menu doesn't give you a program listing that coincides with what you get in GNOME, Xfce, and even fbpanel. I've hunted for solutions to this before but came up short. Turns out the solution is insanely simple.

The following is a direct quote from from the excellent ArchWiki. I tried it in Ubuntu Maverick and it works.

Obm-xdg

obm-xdg is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.

To use obm-xdg, add the following line to ~/.config/openbox/menu.xml:

{menu execute="obm-xdg" id="xdg-menu" label="xdg"/}

(note: the curly brackets above should actually be angled brackets, but this crazy Blogger interface makes it close to impossible to write the above with angled brackets.)

Then run openbox --reconfigure to refresh the Openbox menu. You should now see a sub-menu labeled xdg in your menu.

Note: If you do not have GNOME installed, then you need to install gnome-menus package for obm-xdg to work.

Update: This is having issues on Squeeze. More later as I (if I) figure it out.

October 19, 2010

Enabling touchpad clicking and edge scrolling in Squeeze

Gnome has a mouse configuration interface that lets you enable touchpad clicking and scrolling. But if you are a Debian Squeeze user and prefer Xfce, LXDE, or some handmade alternative, you will find that your touchpad's clicking and edge scrolling won't work [1]. You'll also find that those functions don't work in the GDM login screen even if you do use Gnome. No probs. The fix is easy.

To fix:
  1. Open  /usr/share/X11/xorg.conf.d/50-synaptics.conf (as root) in an editor.
  2. Add the text
    Option "TapButton1" "1"
    Option "VertEdgeScroll" "1"

    between Section "InputClass" and EndSection.
  3. Save, reboot and enjoy.
Note that if you use Gnome, you might find that your old mouse settings are messed up after the above. Set them again and all should be fine.

If you don't like the idea of changing system config files, you can use synclient in a startup script to enable things as well.

Useful links:

[1] At least at the time of this writing. When Squeeze is eventually released, this may change.