Results 1 to 2 of 2

Thread: 17.10 - Living with GNOME/Wayland: No Recents or Show Desktop Buttons

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    17.10 - Living with GNOME/Wayland: No Recents or Show Desktop Buttons

    I haven't found a "Recents" or "Show Desktop" button for 17.10 using GNOME/Wayland. I've come up with a workaround for both, but there must be easier methods. Please post them.
    Until Then:

    Recents Button
    I created a button to display "Recents" by modifying a .desktop file and putting it in ~/.local/share/applications. One thing I've noticed is that the folder entries displayed don't show the owner of the file. This doesn't seem to be an issue if I open one of the displayed files from a nautilus window, but if I use pcmanfm, it opens read-only since it doesn't seem to properly detect the owner.
    Anyway, here is the .desktop file I am currently using to display my most recent files.

    Code:
    [Desktop Entry]
    Type=Application
    Icon=org.gnome.Nautilus
    Name=Recents
    Comment=Browse Recents
    Categories=System;FileTools;FileManager;Utility;Core;GTK;
    Exec=nautilus -s recent:///
    StartupNotify=true
    Terminal=false
    MimeType=inode/directory;
    Note: There is always the lazy-person approach - don't do anything and just open Files/Nautilus as normal and then click on the top entry Recents in the Favorites window of Nautilus ...


    Show Desktop Button with Mouse
    Same issue. I miss my Unity "Show Desktop" button. How do I get it back in GNOME/Wayland?
    Note: Keyboard CTRL_SUPER_D still works and the key combination is configurable via System Settings > Devices > Keyboard)
    Note 2: You can view your multiple workspaces by invoking the (default) upper left "Activities" button and clicking on the desired workspace entry displayed on the far right of the screen.

    Here is my (convoluted) Show Desktop workaround for now - but there has to be an easier way:
    I've used the wmctrl command, which is a bit crippled with Wayland, but it will do until something better is available or wmctrl is updated.

    1. Create an executable script (for instance, show_desktop.sh)
    Code:
    #!/bin/sh
    #Record Open Windows and Minimize Them
    	open_windows=$(wmctrl -l | cut -f1 -d " ")
    
    	if wmctrl -m | grep -e "mode: OFF" -e "mode: N/A" ; then
    		wmctrl -k on 
    	fi
    #Restore Minimized Windows (in the order in which they were opened - newest on top)*
    	if wmctrl -m | grep "mode: ON" ; then
    		for i in $open_windows
    			do	
    				wmctrl -i -R "$i"
    			done
    	fi
    * Script Note: All windows will be minimized. On restoration, windows are restored in the order they were opened.
    wmctrl does not recognize all application windows and these will remain minimized (but open).


    2. Create an executable Desktop Entry (Show_Desktop.desktop sample below)

    Code:
    [Desktop Entry]
    Name=Show_Desktop
    Exec=gnome-terminal -- "/path to script/show_desktop.sh"
    Icon=/usr/share/icons/Humanity/places/24/user-desktop.svg  # Or choose your own
    Terminal=false
    Type=Application
    StartupNotify=true
    Categories=GNOME;GTK;
    Note: You can always "steal" a desktop file from /usr/share/applications or ~/.local/share/applications and modify it. Just make sure you are the owner and make it executable.
    Note 2: If you don't want to make a script to turn "Show Desktop" off and on, you can just put wmctrl -k on on the "Exec=" line. This will minimize all windows but you will have to click on each shortcut to restore them (or perhaps use the "Activities" button.

    3. Put the .desktop entry on the Dock:
    Copy the .desktop file to ~/.local/share/applications
    Make it executable (chmod -x ~/.local/share/applications/Show_Desktop.desktop)
    Note: If you have used a valid icon path name, made it executable, and it is correctly written, there should be an icon for the file when viewed in your file browser. If not, you may have to double click the file in the applications folder and select "Trust" before the icon will appear. If you can't see an icon other than the generic one, you probably won't be able to drag it onto the Dock.
    Click the "Show Applications" button (default location is Lower Left on the Desktop) and drag the icon to the Dock.
    To make it permanent, right click and select "Add to favorites".

    Note: The favorites list is accessible via dconf-editor (GUI) in "org.gnome.shell favorites" or via "gsettings get org.gnome.shell favorite-apps" (terminal)
    To view a list of the current Dock favorites list, "dconf read /org/gnome/shell/favorite-apps"
    Note 2: gnome-tweak-tool offers the ability to use Ubuntu Dock rather than the standard Gnome Dock, and with Ubuntu Dock maybe none of this is necessary.

    Please post simpler ways to do these things! There most likely is a way...
    Last edited by drs305; October 23rd, 2017 at 09:04 AM.
    Back to Xorg...

    Retired.

  2. #2
    Join Date
    Aug 2009
    Location
    Constanta, Romania
    Beans
    2
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: 17.10 - Living with GNOME/Wayland: No Recents or Show Desktop Buttons

    For the show desktop problem, I created a file ".local/share/applications/Show Desktop.desktop" with this content:
    Code:
    [Desktop Entry]
    Version=1.0
    Name=Show Desktop
    Type=Application
    Exec=sh -c 'wmctrl -m | grep -q "mode: ON" && wmctrl -k off || wmctrl -k
    Then I searched for it in the app launcher, right click, Add to favorites, move it at the top of the favorites.

Tags for this Thread

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
  •