Open Applications in Fullscreen on Ubuntu

One of my pet peeves with Ubuntu Linux is that several of the applications I'm using are not opened in fullscreen, even if I maximized them in the previous session. Not sure if that's a bug or a feature, but it is not the behavior I want.

There are different approaches to ensure applications open in fullscreen mode. Some have a corresponding setting, others have a command-line flag, and some applications offer neither of these options.

For applications that have a command-line flag, you can modify the corresponding .desktop file to open them in fullscreen.

Using Desktop Files

Desktop files (.desktop files) are configuration files that define how applications appear in your system's menu and how they behave when launched. Located typically in /usr/share/applications/, these files can be customized on a per-user basis by creating copies in ~/.local/share/applications/.

Let's walk through the process using Evince as an example:

1. Check the online help to see whether there is an option:

evince --help
...
-f, --fullscreen            Run evince in fullscreen mode
...

2. Create a local copy of the Evince desktop file:

mkdir -p ~/.local/share/applications
cp /usr/share/applications/org.gnome.Evince.desktop ~/.local/share/applications/

3. Edit the local copy and modify the Exec= line to include the --fullscreen option:

vim ~/.local/share/applications/org.gnome.Evince.desktop
...
Exec=evince --fullscreen %U
...

4. Update the desktop database:

update-desktop-database ~/.local/share/applications

Now, Evince will launch in fullscreen mode by default when you open a PDF or other supported documents.

Limitations

While this method works fine for Evince, it's not a universal solution. Some applications require different approaches:

Visual Studio Code

For VS Code, the desktop file modification approach doesn't work. Instead, adjust the application's settings:

  1. Open VS Code
  2. Go to Settings (Ctrl+,)
  3. Search for window.newWindowDimensions
  4. Set the value to maximized

This ensures new VS Code windows open maximised by default.

KeePassXC

KeePassXC lacks a command-line option to start in fullscreen and has no corresponding setting either. For these cases, I use the keyboard shortcut Super + Up Arrow or double-click the title bar to manually maximise the window.

Best Practices

  • Always create a local copy of the desktop file rather than editing the system-wide original — it will survive package updates and only affects your user session.
  • The local file must be a complete, standalone desktop file, not just a fragment with the changed line.
  • Not all applications support a fullscreen or maximised launch flag — check --help first.

Conclusion

Modifying desktop files offers a flexible way to customize application launch behaviors. While not a one-size-fits-all solution, it provides a powerful technique for personalizing your Linux desktop experience.


Published by Ramiro Gómez on . Subscribe to the Geeksta RSS feed to be informed about new posts.

Tags: guide sysadmin ubuntu linux

Disclosure: External links on this website may contain affiliate IDs, which means that I earn a commission if you make a purchase using these links. This allows me to offer hopefully valuable content for free while keeping this website sustainable. For more information, please see the disclosure section on the about page.


Share post: Facebook LinkedIn Reddit Twitter

Merchandise