LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-15-2011, 03:42 PM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 135

Rep: Reputation: 23
replacing pcmanfm with Nautilus in Openbox/lxde


Edit: Changed the title to fit the solution I found (which is to replace pcmanfm), and added some stuff. This was originally about mailcap, which is an exotic thingummy to change preferred applications, but did not work.

Edit: Will not work in Oneiric, at least not with nautilus handling the desktop (worked for a while, but Nautilus no longer handles desktop fonts differently from window fonts, and if I change desktop fonts from black to white all fonts go white).

Last edited by nokangaroo; 09-27-2011 at 02:37 AM.
 
Old 06-19-2011, 01:12 PM   #2
nokangaroo
Member
 
Registered: Nov 2009
Posts: 135

Original Poster
Rep: Reputation: 23
Solved - installed nautilus, which works very well in openbox with the --no-desktop option (no perceptible speed disadvantage, and video still works without fractures. Edit: Speed is anyway perceptibly faster than in GNOME). Replaced pcmanfm in my desktop launchers with nautilus --no-desktop and unchecked "mount removable media automatically" in pcmanfm to get rid of a DBus error message. I just hope that nautilus will still be available after the demise of Gnome2. (Edit: I suppose lxde will switch to GTK 3 in time).

Edit: In the above solution the desktop is still drawn by pcmanfm. But it is possible to get by without pcmanfm entirely. As an experiment I let Nautilus draw my desktop, and it works perfectly (and Nautilus with the Sodio window border theme and Mist widget theme looks really cool, and the font rendering is excellent, better than in KDE). I installed lxde to get all the files, and then I manually deleted pcmanfm, leafpad and lxterminal (for which there are better alternatives: gedit, kate, gnome-terminal, konsole, all of which work perfectly well in openbox/lxde). What remains to be done is to get rid of the Nautilus desktop context menu (which is not much use without installing the whole GNOME kit & kaboodle, which of course I want to avoid). A wallpaper can be set with the nautilus-wallpaper extension. Adding launchers to the desktop from the menu works, also creating new launchers with lxshortcut, except you have to manually mark them as executable. Also, mounted USB volumes are shown on the desktop, which I am used to from GNOME.

So it seems that Nautilus needs only very few modifications to be a file manager of choice in Openbox. Of course you don't have to uninstall pcmanfm. I just wanted to see if it was really a dependency, which apparently it isn't.


Here are my config files:

/etc/xdg/lxsession/LXDE/autostart:
@/usr/bin/xkbcomp /usr/local/etc/xkb.dump.modified $DISPLAY #either here or in $HOME/.config/lxsession/LXDE/autostart
@xscreensaver -no-splash
@lxpanel --profile LXDE
@/usr/bin/nautilus -n
@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
#xkb.dump.modified is my customized keyboard map with the Ctrl and Win keys swapped

/etc/lxdm/lxdm.conf:
[base]
# autologin=<username>
session=/usr/bin/startlxde
# numlock=0
greeter=/usr/lib/lxdm/lxdm-greeter-gtk

[server]
# arg=/usr/bin/X -nr vt1

[display]
#gtk_theme=Mist
#bg=/usr/share/backgrounds/default.png
bottom_pane=1
lang=1
#theme=Sodio

[input]

[userlist]
disable=0
white=
black=

Also, I commented out the lines in /usr/bin/startlxde after "Ensure the existance [sic] of openbox config file".


Edit: Created a shortcut to show the root-menu (Win+Space, as Alt+Space was already assigned to the client menu). Right-clicking on the desktop shows the Nautilus menu as before, from which I have removed the nonfunctional entries "Add Launcher" and "Change Desktop Background" by editing /usr/share/nautilus/ui/nautilus-desktop-icon-view-ui.xml (removing lines 7 and 12) to look like this:

<ui>
<popup name="background">
<placeholder name="Before Zoom Items">
<placeholder name="New Window Items">
</placeholder>
<placeholder name="New Object Items">
</placeholder>
</placeholder>
<placeholder name="After Zoom Items">
<placeholder name="Background Items">
</placeholder>
</placeholder>
</popup>
<popup name="selection">
<placeholder name="Empty Trash Holder">
<menuitem name="Empty Trash" action="Empty Trash Conditional"/>
</placeholder>
</popup>
</ui>


As the instructions I found to configure the root menu were unclear, here is an example menu.xml that will work (replace nautilus with pcmanfm and konsole with lxterminal or xterm if necessary):

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="apps-menu" label="Applications">
<item label="Nautilus">
<action name="Execute">
<startupnotify>
<enabled>
yes
</enabled>
<icon/>
</startupnotify>
<command>
nautilus /
</command>
</action>
</item>
<item label="Terminal">
<action name="Execute">
<command>
konsole
</command>
</action>
</item>
<item label="Firefox">
<action name="Execute">
<command>
firefox
</command>
</action>
</item>
</menu>
<menu id="multimedia-menu" label="Multimedia">
<item label="VLC">
<action name="Execute">
<execute>
qvlc
</execute>
</action>
</item>
<item label="VLC (drive 0)">
<action name="Execute">
<execute>
vlc /dev/sr0
</execute>
</action>
</item>
<item label="VLC (drive 1)">
<action name="Execute">
<execute>
vlc /dev/sr1
</execute>
</action>
</item>
</menu>
<menu id="root-menu" label="LXDE">
<separator label="LXDE"/>
<menu id="apps-menu"/>
<separator/>
<menu id="multimedia-menu"/>
<separator/>
<item label="Openbox Configuration Manager">
<action name="Execute">
<startupnotify>
<enabled>
yes
</enabled>
<icon>
openbox
</icon>
</startupnotify>
<command>
obconf
</command>
</action>
</item>
<item label="Customize Look and Feel">
<action name="Execute">
<startupnotify>
<enabled>
yes
</enabled>
<icon>
openbox
</icon>
</startupnotify>
<command>
lxappearance
</command>
</action>
</item>
<item label="Reload Config Files">
<action name="Reconfigure"/>
</item>
<separator/>
<item label="Restart">
<action name="Restart"/>
</item>
<separator/>
<item label="Exit">
<action name="Execute">
<command>
lxsession-logout
</command>
</action>
</item>
</menu>
</openbox_menu>

Last edited by nokangaroo; 06-26-2011 at 03:41 PM.
 
  


Reply

Tags
mimetypes, pcmanfm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recent Mailcap Change? lopid Slackware 2 01-09-2011 07:49 AM
/etc/mailcap formatting error TheOneKEA Debian 6 02-22-2007 07:55 AM
Rox and mailcap merchtemeagle Slackware 0 06-01-2006 07:28 PM
file mailcap prob... khuti2005 Linux - Newbie 0 10-13-2005 07:21 AM
/etc/mailcap not there nomad438 Slackware 3 07-05-2004 03:25 PM


All times are GMT -5. The time now is 04:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration