Double window header on Gnome
gnome shell 44.4-1 on Arch Linux
Same problem happening with Cinnamon DE.
Maybe the problem lies on Electron's frameless windows conflicting with the .AppImage format? Just a random guess.
See here: https://forum.cursor.sh/t/double-title-bars-on-ubuntu-appimage/1316/5 for a build solution.
Or alternatively, CTRL + , to enter the settings and search titleBar. Set this option from custom to native.
#!/bin/bash
# Download Cursor IDE
wget https://downloader.cursor.sh/linux/appImage/x64 -O ./Cursor_orig.AppImage
chmod +x ./Cursor_orig.AppImage
# Extract the AppImage
./Cursor_orig.AppImage --appimage-extract
rm ./Cursor_orig.AppImage
# Fix it by replacing all occurrences of ",minHeight" with ",frame:false,minHeight"
TARGET_FILE="squashfs-root/resources/app/out/vs/code/electron-main/main.js"
sed -i 's/,minHeight/,frame:false,minHeight/g' "$TARGET_FILE"
# Download appimagetool
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage
chmod +x ./appimagetool-x86_64.AppImage
# Repackage the AppImage using appimagetool
./appimagetool-x86_64.AppImage squashfs-root/
# Cleaning Up
rm ./appimagetool-x86_64.AppImage
rm -rf squashfs-root/
i tried the solutions but unfortunately they didn't work. can someone confirm these still work in the latest versions or if there are any other solutions? wish cursor team would fix it on their side instead of relying hacks. vscode doesn't have this issue
i tried the solutions but unfortunately they didn't work. can someone confirm these still work in the latest versions or if there are any other solutions? wish cursor team would fix it on their side instead of relying hacks. vscode doesn't have this issue
+1 I have same problem
Edit: I fixed it with @Akiyamka's reply. Thanks!
~~hi @ovniroto is it possible to share how it looks like after the fix?~~
edit: looked more into it today and can confirm it works, root cause was how nix package for cursor handles appimages and its extraction
I also see the double title bar using the AppImage on GNOME. No success with using any of the settings in Cursor itself to remove it. But thanks to @Akiyamka https://github.com/getcursor/cursor/issues/837#issuecomment-2326443145 I was able to get it working and remove the double title bar. However with the latest release the location of the main.js file changed. It's now at "squashfs-root/resources/app/out/main.js". Here is an updated script that searches and replaces all relevant .js files.
#!/bin/bash set -ex # Download Cursor IDE wget https://downloader.cursor.sh/linux/appImage/x64 -O ./Cursor_orig.AppImage chmod +x ./Cursor_orig.AppImage # Extract the AppImage ./Cursor_orig.AppImage --appimage-extract rm ./Cursor_orig.AppImage # Fix it by replacing all occurrences of ",minHeight" with ",frame:false,minHeight" find squashfs-root/ -type f -name '*.js' \ -exec grep -l ,minHeight {} \; \ -exec sed -i 's/,minHeight/,frame:false,minHeight/g' {} \; # Download appimagetool wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage chmod +x ./appimagetool-x86_64.AppImage # Repackage the AppImage using appimagetool ./appimagetool-x86_64.AppImage squashfs-root/ # Cleaning Up rm ./appimagetool-x86_64.AppImage rm -rf squashfs-root/
Thanks @janka102 works perfectly here!
#!/bin/bash
Download Cursor IDE
wget https://downloader.cursor.sh/linux/appImage/x64 -O ./Cursor_orig.AppImage chmod +x ./Cursor_orig.AppImage
Extract the AppImage
./Cursor_orig.AppImage --appimage-extract rm ./Cursor_orig.AppImage
Fix it by replacing all occurrences of ",minHeight" with ",frame:false,minHeight"
TARGET_FILE="squashfs-root/resources/app/out/vs/code/electron-main/main.js" sed -i 's/,minHeight/,frame:false,minHeight/g' "$TARGET_FILE"
Download appimagetool
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage chmod +x ./appimagetool-x86_64.AppImage
Repackage the AppImage using appimagetool
./appimagetool-x86_64.AppImage squashfs-root/
Cleaning Up
rm ./appimagetool-x86_64.AppImage rm -rf squashfs-root/
This sadly does not work for a second instance started. Even worse, from then on, every instance won't have that fix anymore, even after closing everything. I'm on Arch Linux with KDE Plasma.
@damster101, сould you clarify - are you referring to launching two Cursor applications simultaneously from the same AppImage, where the second instance still has the bug?
Or do you mean that the first launch after the fix worked correctly, but all subsequent launches (regardless of whether they're running simultaneously or not) reproduced the bug?
@damster101, сould you clarify - are you referring to launching two Cursor applications simultaneously from the same AppImage, where the second instance still has the bug?
Or do you mean that the first launch after the fix worked correctly, but all subsequent launches (regardless of whether they're running simultaneously or not) reproduced the bug?
Both... If I only ever open one Cursor instance, this works absolutely fine. But once I open a further Cursor instance while another one is already running, this patch seizes to work not just for that new instance, but all further instances of Cursor I open, even if I restart the system and then open a single Cursor instance.
even if I restart the system and then open a single Cursor instance.
hmm, are you use something for manage installed appImages on system level, like "gear lever"? This changes resetting after you update cursor, so It's sounds like it somehow "updated" or "self repaired" after first launch without your permission
even if I restart the system and then open a single Cursor instance.
hmm, are you use something for manage installed appImages on system level, like "gear lever"? This changes resetting after you update cursor, so It's sounds like it somehow "updated" or "self repaired" after first launch without your permission
I use your patch through a PKGBUILD on the AUR: https://aur.archlinux.org/packages/cursor-bin-patched
However, I just noticed that this is apparently not an issue on my laptop. The relevant difference is that I use Wayland there (I need X11 for AnyDesk on the desktop). So, I assume this works perfectly fine when using Wayland at least...
@damster101 I'm on KDE Plasma on NixOS and never see the double title bar issue, making this patch unnecessary.
In any case, this is something the Cursor team should investigate and solve properly for all window managers. Customers needing to apply ad hoc patches is just silly.
Still not fixed on gnome/cinnamon. The script from @janka102 is helping, but its sad that issue is still persist.
I created a script the following script based on @janka102 answer, so that it patches an already installed cursor. This is handy if you prefer to use a package manager to install and keep cursor updated, and then use a script to remove the titlebar. It also creates an image backup, in case something goes wrong.
To make it work for you, modify APP_IMAGE variable with the path of your current installed cursor image (in my case is /opt/cursor/cursor-bin.AppImage, as I'm using cursor-bin package from AUR)
#!/bin/bash
set -ex
## Script to remove titlebar in Cursor on Gnome (based on https://github.com/getcursor/cursor/issues/837#issuecomment-2614109807)
APP_IMAGE=/opt/cursor-bin/cursor-bin.AppImage
BUILD_PATH=./patch-cursor
mkdir $BUILD_PATH
pushd $BUILD_PATH
# Extract the AppImage
cp $APP_IMAGE ./cursor.AppImage
./cursor.AppImage --appimage-extract
rm ./cursor.AppImage
# Fix it by replacing all occurrences of ",minHeight" with ",frame:false,minHeight"
find squashfs-root/ -type f -name '*.js' \
-exec grep -l ,minHeight {} \; \
-exec sed -i 's/,minHeight/,frame:false,minHeight/g' {} \;
# Download appimagetool
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool-x86_64.AppImage
chmod +x ./appimagetool-x86_64.AppImage
# Repackage the AppImage using appimagetool
./appimagetool-x86_64.AppImage squashfs-root/
# Create a backup and replace the AppImage
sudo mv $APP_IMAGE $APP_IMAGE.bck
sudo cp ./Cursor-x86_64.AppImage $APP_IMAGE
# Cleaning Up
popd
rm -rf $BUILD_PATH
Gist: https://gist.github.com/emepetres/62f809fe2636015ac53798d82bf67f3b
go to file > preferences > vs code settings > window > title bar style > change it to custom. vs code on linux also by default uses native title bar but vs code insiders uses custom by default. weird difference but 🤷🏻
@tanshkoul, its not working in case of cursor, this issue exists for a reason.
@sedyh hi, i have cursor running on 2 different laptops running Ubuntu, with that change in window options. Are you using wayland or x11? Also, are you using appimaged or appimge launcher for your appimages?
@tanshkoul, hi, I'm on Linux Mint 21.3 Cinnamon with X11. The default AppImage from the site without any mod or launcher have this issue and patches from @janka102 and @emepetres are fixing it.
@sedyh I would suggest using appimaged -- its an official appimage daemon that detects an appimage when you download it and u just drop the appimage into a folder named Applications, so similar to what macOS does. more here: link
And I think this is a classic Server Side Decoration vs Client side decoration issue. I am on Wayland on Gnome 47 and I am pretty sure since cursor tried to use custom window by default, it uses CSD which seems to work better on Wayland.
Hopefully it works out on Cinnamon with Wayland if you choose to use that in the future and happy to see that the patches work for you :)
it uses CSD which seems to work better on Wayland.
Not really, I have same issue with cursor on Fedora (gnome with wayland)
@Akiyamka Mind trying with appimaged that I linked?
@Akiyamka Mind trying with appimaged that I linked?
Thanks, I'm already using gearlever. However let me ask, how can appimaged basically help fix this problem? It's just help you manage installed appimages a bit
According to their own documentation, list of implemented features:
- Registers type-1 and type-2 AppImages
- Detects mounted and unmounted partitions by watching DBus
- Significantly lower CPU and memory usage than other implementations
- Error notifications in case applications cannot be launched for whatever reason
- If Firejail is on the $PATH, various options for running applications sandboxed via the context menu
- Updating applications via the context menu
- Opening the containing folder via the context menu
- Extracting AppImages via the context menu
- Announces itself on the local network using Zeroconf (more to come)
- Real-time notification based on PubSub when updates are available, as soon as they are uploaded
- Quality checking of AppImages and notifications in case of errors (can be extended)
- Launch Services like functionality, e.g., being able to launch the newest version of an AppImage that we know of
Which one can solve the problem of a double header?
@Akiyamka I will have to look more into this which I will over the weekend but I have tried gear lever, appimage launcher and none fixed that issue even with the Window set to Custom instead of Native.
Ended up trying appimaged and I haven't had a problem since with the window set to Custom.
I have this appimaged + Cursor + other appimages setup on 2 Laptops running Ubuntu 24.10 with gnome 47
Still happening on Fedora 41 KDE (Wayland).
Tested appimagelauncher and appimaged, the only solution was to manually patch the .AppImage file as sugested above, but an oficial solution would be very much appreciated.
still happens for me on cursor 0.47.8. using the lastest ubuntu. i installed that appimaged thing too. it says its not officially supported for ubuntu. nothing happend. windsurf ide doesnt have this problem.
I think, the app started to comparing itself checksum, starting from 0.47.8. The patches from @janka102 and @emepetres will cause this warning:
And you can't fix checksums with extension cause it will require running the app from root which is very tricky in cause of cursor.
This will be fixed in the upcoming v0.48.0 release