Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HOWTO: Very simple way to manage wallpaper using Feh

  1. #1
    Join Date
    Feb 2005
    Location
    Umeå, Sweden
    Beans
    733
    Distro
    Ubuntu 14.04 Trusty Tahr

    HOWTO: Very simple way to manage wallpaper using Feh

    I have recently started to look for ways to decrease memory usage on my computer (I'm a bit low on RAM). One thing that I have done is replace xfdesktop with feh.
    The only thing that I found was missing when I did this, was a simple way to change my wallpaper, so I wrote a small (DE-independent) app and two scripts do do this for me.
    Since I think this app would be perfect for people like me, or people using light DEs/WMs, I decided to share it with you

    Also: This will not effect memory usage (only when you have the "wallpaper chooser" running)

    Step 1:
    Download: liten_0.1-1_i386.deb (see attachment) and install using:

    Code:
    sudo dpkg -i liten_0.1-1_i386.deb
    Only requirements are libqt4-gui and feh.

    Step 2:
    You must make feh set your wallpaper automatically when you login (so that you dont have to do it manually). Depending on which DE/WM you are using, you have to do this differently.

    The only thing you have to do, is ensure that the command:

    Code:
    minst
    is executed as your DE/WM starts up. In XFCE you would do it this way:

    Applications (XFCE Menu) -> Settings -> Autostarted Applications -> Add -> (set name and description to whatever you like) -> Command: minst

    After this is done, liten will remember your last wallpaper, and apply it automatically when you login.

    Step 3:
    Make a launcher somewhere on your desktop that executes the command:

    Code:
    liten
    This is the actual "wallpaper-chooser".

    Volontary Step (File manager integration):
    Another little advantage in using this method to set your wallpaper, is that it is easily integrated into file managers with custom actions, such as Thunar or Nautilus (Konqueror?). This is done using a helper script for liten (called: mindre)

    In Nautilus:

    open gedit and type:

    Code:
    #!/bin/bash
    
    mindre $*
    Then save as ~/.gnome2/nautilus-scripts/wallpaper.sh and run:

    Code:
    chmod  +x  ~/.gnome2/nautilus-scripts/wallpaper.sh
    Then, rightclick on an image in nautilus, then select: scripts->wallpaper.sh
    This will set the wallpaper to that image


    In Thunar:

    Edit->Configure Custom Actions -> + (add) -> Name: Set wallpaper -> Command: mindre %f -> (set the icon to whatever you want) -> Appearance Conditions -> Image Files (make sure this is the only thing checked)

    Then rightclick on an image and select: Set wallpaper

    Control using terminal:
    If you refuse to use a filemanager, or liten you can use the terminal to set your background:

    Code:
    mindre <path to file>
    Note:
    No mather which method you use to set the wallpaper, liten will always remember which one you used last and apply it when you login.

    If you want changes to the list saved, you must click on "Exit" when you close the application

    Trivia:
    Just thought I'd note: all names are swedish and mean:

    Liten = Small
    Mindre (invisible helper-script): Smaller
    Minst = Smallest
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Liten.png 
Views:	177 
Size:	15.2 KB 
ID:	43162  
    Attached Files Attached Files
    Last edited by Kimm; September 12th, 2007 at 04:18 PM.
    My cross-platform python modules for PVA or population simulation https://code.google.com/p/nobones/, written in Ubuntu!

  2. #2
    Join Date
    Feb 2005
    Location
    Umeå, Sweden
    Beans
    733
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    *bump*
    My cross-platform python modules for PVA or population simulation https://code.google.com/p/nobones/, written in Ubuntu!

  3. #3
    Join Date
    Feb 2007
    Location
    Port Clinton Ohio
    Beans
    207

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    i was actually going to write a program similar to this and you did it for me The only problem is that i see is libqt4-gui, is that qt file, or kde library file? I wanted it to be gtk1 but beggers cant be choosers.

  4. #4
    Join Date
    Feb 2005
    Location
    Umeå, Sweden
    Beans
    733
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    Quote Originally Posted by jseiser View Post
    i was actually going to write a program similar to this and you did it for me The only problem is that i see is libqt4-gui, is that qt file, or kde library file? I wanted it to be gtk1 but beggers cant be choosers.
    It has nothing to do with KDE. So no KDE libraries or processes will be loaded into memory
    My cross-platform python modules for PVA or population simulation https://code.google.com/p/nobones/, written in Ubuntu!

  5. #5
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,189

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    i usually would just use feh to do it.
    feh -t ~/.backgrounds <- displays thumbnails, right click the thumb nail you want> set as background.
    you have to click the 1 you want then right click to set.
    (i usually make a right click command for that)(in thunar actions> feh -t %d <if i remember correctly)
    (i've also on occasion just made a icon with that command)
    (ps: you should read man feh, feh can actually do alot more, i use it as my image viewer-> http://linuxbrit.co.uk/feh/wiki/FehHelp )

    and of course, start up would have "eval `cat $HOME/.fehbg`" to load what ever background was last chosen.

    i only have 1 background right now, but here's a pic anyway->
    Last edited by kerry_s; February 26th, 2008 at 09:55 AM.

  6. #6
    Join Date
    Feb 2007
    Beans
    6

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    I have a folder ~/.backgound which stores any images which I use for the background.
    I then have the following custom action in thunar:

    cp %f ~/.background & feh --bg-scale ~/.background/%n

    This copies the image into my background folder and uses feh to set the image as background.

    I then have:

    eval `cat $HOME/.fehbg`

    So that feh is draws the background on start up.

  7. #7
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,189

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    Quote Originally Posted by string158 View Post
    I have a folder ~/.backgound which stores any images which I use for the background.
    I then have the following custom action in thunar:

    cp %f ~/.background & feh --bg-scale ~/.background/%n

    This copies the image into my background folder and uses feh to set the image as background.

    I then have:

    eval `cat $HOME/.fehbg`

    So that feh is draws the background on start up.
    genius!

  8. #8
    Join Date
    Oct 2007
    Beans
    5

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    Okay, what am I doing wrong here. I am running awesomewm and have configured my .xinitrc to run this command (which by the way work in a terminal) but when I restart X my background doesn't change.

    feh --bg-scale ~/.background/1.jpg

    the above works in a terminal when I type it in, but now when I set it in the .xinitrc or a script that .xinitrc calls during startup.

    What gives?

  9. #9
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,189

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    put this in you ~/.xinitrc->
    Code:
    eval `cat $HOME/.fehbg` &
    open your background in feh and use the set background option.
    that's it your all set, it will load the last background used.

  10. #10
    Join Date
    Dec 2006
    Beans
    4

    Re: HOWTO: Very simple way to manage wallpaper using Feh

    It is possible to have liten source?
    i'm using a rpm based distro..
    Hello

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •