Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 162086 - x11-wm/fluxbox- - fbestbg tool fails when path contains spaces
Summary: x11-wm/fluxbox- - fbestbg tool fails when path contains spaces
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
Depends on:
Reported: 2007-01-14 19:07 UTC by Josh
Modified: 2007-03-23 19:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Josh 2007-01-14 19:07:52 UTC
When using the fbsetbg tool provided with fluxbox- using the -r switch (for random desktop pattern in a directory) that contains spaces, the command fails. Eg: "fbsetbg -r /home/user/wall\ papers" will fail, but "fbsetbg -r /home/user/wallpapers" will work. Part of the process seems to only accept paths up to the first space, and this occurs regardless of if the directory path was quote or spaces escaped. In this case I have the eterm package installed, which is why fbsetbg in turn calls Esetroot to do the actual work of changing the desktop pattern.  Below is a more complete example with error output from a terminal. Note that the same directory is accepted fine using the symlink that does not contain a space in the path:

user@box ~ $ ls -ld test
lrwxrwxrwx 1 user user 49 Jan 14 12:38 test -> /home/user/pictures/downloaded/Abstract Fractals/
user@box ~ $ fbsetbg -r /home/user/pictures/downloaded/Abstract\ Fractals
ls: cannot access /home/user/pictures/downloaded/Abstract: No such file or directory
ls: cannot access Fractals: No such file or directory
expr: division by zero
ls: cannot access /home/user/pictures/downloaded/Abstract: No such file or directory
ls: cannot access Fractals: No such file or directory
Esetroot:  Unable to load image file "/user/user/pictures/downloaded/Abstract Fractals/".
user@box ~ $ fbsetbg -r /home/user/test
user@box ~ $

Reproducible: Always

Steps to Reproduce:
1. Install fluxbox-
2. Install eterm to provide Esetroot functionality for the fbsetbg backend
3. In a fluxbox session at any terminal, type the following: fbsetbg -r "<path_to_dir/with a space>"
Actual Results:  
A string of errors is produced citing "ls" and "expr" and the desktop background is not changed.

Expected Results:  
No error output and the desktop pattern correctly changes.

$ emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r6 i686)
System uname: 2.6.18-gentoo-r6 i686 AMD Sempron(tm)   2300+
Gentoo Base System version 1.12.6
Last Sync: Sun, 14 Jan 2007 08:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
CFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fforce-addr"
FEATURES="autoconfig distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
USE="x86 3dnow X a52 aac acl alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol amr berkdb bitmap-fonts bzip2 cddb cli cracklib crypt dlloader dri dts dvd dvdread elibc_glibc encode ffmpeg flac fortran gdbm gnutls gpm iconv idea input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux lame libg++ lzo mmx mp3 mpeg ncurses nls nptl nptlonly offensive ogg opengl oss pam pcre perl png ppds pppd python quicktime readline real reflection sdl session spl sse ssl tcl tcpd theora tiff truetype-fonts type1-fonts udev unicode userland_GNU video_cards_radeon vorbis win32codecs x264 xorg xv xvid xvmc zlib"
Comment 1 Andrew Hurst 2007-02-15 21:26:36 UTC
Can you test with the latest (unstable) ebuild 1.0_rc2-r2?

What's output of 'fbsetbg -i'?
Comment 2 Jim Ramsay (lack) (RETIRED) gentoo-dev 2007-03-23 19:23:15 UTC
I am unable to replicate this with fluxbox-1.0_rc3

If this still persists with fluxbox-1.0_rc3, please re-open this with the output of 'fbsetbg -i'.

0 ramsay@sed-192:~ $ fbsetbg /home/ramsay/test\ this/wallpaper/skysong.jpg 
0 ramsay@sed-192:~ $ fbsetbg /home/ramsay/test\ this/wallpaper/default.jpg 
0 ramsay@sed-192:~ $ fbsetbg -i

feh is a nice wallpapersetter. You won't have any problems.