How do I make ranger start directly from my file manager, instead of first opening the terminal and then starting the application?
I have written this below code in my .desktop file:
#!/bin/bash
[Desktop Entry]
Name=Ranger
Exec=/bin/bash -c 'ranger'
Terminal=True
Type=ApplicationBut, it doesn't seem to work. How do I fix it?
I tried adding bash at the end like this:
Exec="/bin/bash -c 'ranger';bash"But, this doesn't seem to work either.
32 Answers
Remove
#!/bin/bashfrom the beginning of file.
Change the Terminal line to:
Terminal=true(lowercase true).
And
Exec=/bin/bash -c 'ranger'to
Exec=/usr/bin/rangeror whatever is the full path of the ranger command.
Another option would be to change the Exec command like this:
Exec=/usr/bin/gnome-terminal --active -- /usr/bin/rangerIf you need full screen terminal, you can try the --maximize and --full-screen options of gnome-terminal. Please, close all terminals before testing!
To find out the full path of gnome-terminal run the command:
whereis gnome-terminal 13 [Desktop Entry]
Name=Ranger
Exec=gnome-terminal -- ranger
Type=Applicationworks for me.
Credit:
3