13

I'm running Ubuntu 18.04 LTS with GNOME Shell.
Nautilus does not want to occupy 50% (left or right) of the screen sized at 1366x768.

Snapping Nautilus window in Ubuntu 18.04 LTS on GNOME Shell

Other applications (such as GNOME Terminal, Eye of GNOME, Gedit) are normally snapping to the left/right half of the screen.

But Nautilus can be resized to the width lower than half of screen (I can get 650 px, which is smaller than 1366/2 = 683 px).

The first usable screen resolution seems to be 1400x1050, then goes 1440x900. But large amount of current devices are still using 1366x768.

Is it just me?


Updates:
1. standard shortcut Super+ or Super+ do not work too.
2. I reported bug 1801317 to launchpad which has linked upstream bug 411.
3. It does not work on GNOME FlashBack session too.

4
  • 4
    It's not just you! I too couldn't get the snap to half left or half right in Ubuntu 18.04. This is with the default, whether that's GNOME Shell or not I don't know.
    – DK Bose
    Oct 30, 2018 at 16:23
  • I can confirm that this has something to do with monitor resolution. I have a dual monitor setup, and I am able to snap to left/right in my larger monitor but not in my smaller monitor. Of the applications I tested, this issue exists only with nautilus.
    – b_laoshi
    Nov 2, 2018 at 6:13
  • Does the hotkey still work? Super+left and Super+right Nov 6, 2018 at 2:38
  • @AlvinLiang No, they do not work.
    – N0rbert
    Nov 6, 2018 at 19:56

7 Answers 7

5

It would appear that this has something to do with the sidebar. My guess is it's a bug.

If you turn the sidebar off, the snap starts working as it should. Try the following commands from a terminal window.
Edit: The commands I've written out below hide and show the sidebar which can more easily be accomplished (as pointed out in comments) by simply pressing F9.

Turn the sidebar off:

gsettings set org.gnome.nautilus.window-state start-with-sidebar false

 

Turn the sidebar back on:

gsettings set org.gnome.nautilus.window-state start-with-sidebar true

 
While this is an answer, it's more of an option than a solution ... and probably not the solution you are looking for. It's certainly not the fix I or most other people would want, but it gives you a direction as far as reporting a bug!

3
  • 3
    Pressing <F9> also helps, but sidebar is very useful and I can't imagine using Nautilus without it.
    – N0rbert
    Nov 2, 2018 at 9:04
  • 2
    Press F9 to suppress left panel, then Super+arrow to move the winodws aside, then press F9 again to restore the panel. The window still in place. That works for me.
    – Tarass
    Nov 13, 2018 at 17:00
  • No need to change it through gsettings. Turning on and off the sidebar is available in Nautilus menu - at least in 3.26.4 on Ubuntu 18.04.
    – kcpr
    Nov 30, 2018 at 23:35
3

This problem has disappeared when I upgraded Ubuntu from version 18.04 to 18.10. So unless you want to stay on 18.04 (because of the LTS for example), the upgrade is a clean solution.

3
  • 1
    Yeah, that's solving the problem by shying from it! Hahaha... :) Dec 10, 2018 at 23:57
  • 3
    Weirdly enough, it's back in 21.04
    – Heisenberg
    Jun 30, 2021 at 17:42
  • That is why you should prepare before installation from iso file to usb stick or usb flash drive then you install fresh better then upgrading. Jun 26, 2022 at 18:38
2

Another solution is to install a different file manager, for example my personal favourite alternative (and very similar to nautilus) file manager is Caja. You can simply type "caja" into software center and download from there. Caja has no snap problems.

However, there are some other applications that have the snap in problem, such as Discord, that this will not fix.

1
  • I encountered this problem on Ubuntu 22.04 and decided to install Dolphin which also behaves as expected
    – stephan
    Nov 5, 2023 at 5:40
2
+50

Note: This is Only Workaround

my screen resolution is 1366x768 Ubuntu 18.04.1

pratap@i7-6550U:~$ xrandr
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768      60.00*+

when the sidebar is turned off, its working, it gave a clue that the width of the nautilus window is changed or system is calculating its width differently.

i have made changes to dock settings and see if its working in the same way..

Please don't make (you may not need) these below settings till you read the full answer.

by setting the dock to Auto-hide from settings

or with any of below settings

gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed false
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position TOP

in all the above cases width of the screen differs according to the system calculation.

or by installing dash-to-panel extension it works.

then the best way, i tried to change the width of the dock from default 48 to 47.

gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 47

pratap@i7-6550U:~$ gsettings get org.gnome.shell.extensions.dash-to-dock dash-max-icon-size
48
pratap@i7-6550U:~$ gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 47
pratap@i7-6550U:~$ 

it worked. i guess this is the best way to achieve by changing the least.

enter image description here

1

This same thing happens on Debian 10 (now stable) if I use GTK 3 theme Qogir. Other themes don't produce the same behavior. So problem must originate from the theme...

Try changing your theme and you might save this problem. That's what I did. But instead I would love to know how to fix the theme Qogir, which is otherwise insanely good.

0

The workaround provided by UnKNOWn worked fine for me (reducing the width of the dock from default 48 to 47/46). Remmember you can also use the graphical interface (Settings > Dock) to achieve this:

Settings > Dock (Ubuntu 18.04.6)

-1

More user-friendly solution would be to install Unity instead of GNOME Shell:

sudo apt-get install ubuntu-unity-desktop

then select Unity session on the login screen and use Nautilus window snapping as before:

Snapping Nautilus window in Ubuntu 18.04 LTS on Unity

1
  • Really? Nobody wants to change their desktop environment just for this bug
    – Heisenberg
    Jun 30, 2021 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .