How to create desktop shortcut passing custom arguments? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
Improve this question
I have KDE 5.20.5 and would like to create a desktop shortcut for launching Chromium passing custom command line arguments to it.
Initially, I've right-clicked on a Launcher Chromium menu entry -> Add to Desktop... and the shortcut got created. However, it's just a symlink to /usr/share/applications/chromium.desktop and I can't modify it.
Then, I've tried to copy that /usr/share/applications/chromium.desktop onto my desktop manually so I could modify the copy and not touch the original. However even before editing it, it 's unable to launch Chromium. It displays the following message box when double-clicked:
Unknown error code 100 You are not authorized to execute this file.
Please send a full bug report at https://bugs.kde.org.
I've sweated googling an answer to such the basic question: what is correct \ recommended way of creating a modifiable desktop shortcut based on a Launcher menu entry in KDE Plasma?

You need to make the copied chromium.desktop file executable. With Dolphin file manager: right-click on your .desktop file → Properties → Permissions tab → check Is executable checkbox.
Alternatively, from the folder with your .desktop file, you can run:
chmod 755 chromium.desktop
Now it should be able to launch Chromium.
To add a custom argument(-s) to the launcher - back in the Properties of your .desktop file go to the Application tab and add your argument(-s) to the Command field after the path to the executable, for example:
/usr/bin/chromium --profile-directory="Default"
While we are at the Application tab, you may want to change the Name field to something like "Chromium w/args" to help distinguish launchers later on.
As an option, you can edit the .desktop file by opening it with a text editor of your preference. To edit the launch command, navigate to the [Desktop Entry] group header, under which locate the line starting with Exec= and add custom arguments to it.
To edit the name of the launcher, under the same header locate lines starting with Name= (Name[xx_XX]=, e.g. Name[en_US]= for localized names) and alter them as you wish.
More information on Desktop Entries can be found in its specification or on ArchWiki
To add your new launcher to the application menus (for the current user) - move .desktop file to the
~/.local/share/applications/
Now your launcher will be available in Application Launcher and Krunner.
If you want the new launcher to co-exist with the original (instead of overriding it), you should rename the .desktop file to something like chromium_args.desktop.

Run this command at root directory :
ln -s $PWD ~/Desktop/

Related

How to open or switch between files in Android Studio using shortcuts [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm using android studio for developing flutter apps. I use multiple files but find it hard to locate them in the project folder every time I have to open them (again).
Is there a way to open files in android studio with a shortcut?
original post for reference:
i'm using android studio for develop flutter app
i usually , open pubspect.yaml file when I add packages.
i added yaml file at favorite folder ,
but it little bit annoying to click it to open it.
so , is there a way to solve this little problem?
i tried macro but didn't work.
====
If you see this message, then your question was automatically blocked by the server. All new questions are subjected to a "minimum quality" filter that checks for some basic indicators of a good, complete question. Check to make sure that your question has the following:
A clear title.
A reasonable explanation of what your question is. Add as much detail as you can.
Any background research you've tried but wasn't enough to solve your problem.
Correct use of English spelling and grammar to the best of your ability.
The shortcut I use to navigate is: Shift+Shift.
As shown in android studio key_maps. You can use Shift+Ctrl+N will be used to navigate through files.
If it is easy for you then, Go to Settings -> KeyMap. And, you can edit your own key shortcuts. Specifically, to your question:
You can search navigate, you will be able to see File and its corresponding shortcut key, there you can edit another shortcut key too.

Add a custom option in Nautilus right click menu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
When a user right-click on a folder in Nautilus, a menu appears. I want to add more options in that menu. I am using Gnome 3.
Is there any other way to customize that menu with command line? Actually I am making a Linux software and I want that these these options should be added when user installs the software.
This answer may be late, but it might be still useful.
No any third party package(s) needed
Write your own script and put it to: ~/.local/share/nautilus/scripts/
An example might be more clear:
If you want to add a Context Menu like Open By VSCode, you can create a file named OpenByVScode.sh with the content:
#!/bin/bash
code -n ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}
then, make it executable;
chmod 744 OpenByVScode.sh
Finally, cope/move this file to ~/.local/share/nautilus/scripts/
The Context Menu is ready to use, which will be displayed under script submenu.
Codes explanation:
First line: #!/bin/bash, to specify which language interpreter needed
Second line: code -n ${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS}
code is the VSCode default command, option -n means force to open in new window, on the contrary, it also has other option like -r, reuse the current windows, if the software is not open, this option will be the same like -n. For more, please check by code --help.
The variable NAUTILUS_SCRIPT_SELECTED_FILE_PATHS is defined by nautilus, like its name meaning, the path for the selected file or folder. It also has other three type of variables:
1. NAUTILUS_SCRIPT_SELECTED_URIS : newline-delimited URIs for selected files
2. NAUTILUS_SCRIPT_CURRENT_URI : current location
3. NAUTILUS_SCRIPT_WINDOW_GEOMETRY : position and size of current window
For more info, please refer HERE
You might want to use a Nautilus script, which doesn't require any additional installation like for Nautilus Actions.
In order to do that :
copy your script in the folder ~/.local/share/nautilus/scripts/
make sure it's executable.
It will then appear under the Scripts entry, from the right click context menu like below:
Nautilus Actions
We may define our own right-click context menu items with nautilus-actions
.
Run the Nautilus-Actions Configuration Tool either from the Dash, or from a terminal with
nautilus-actions-config-tool
In the Action tab give your action a sensible label, e.g. "Open in Terminator" and choose to display this in the selection or the context menu.
Next open the Command tab to enter the commands to run
Give in the full path to your command (/usr/bin/command_to_run) and program options.
After logging out and in again the right click context menu below will be displayed:

Adobe Dreamweaver CC freezing on start up [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I just installed Adobe Dreamweaver CC through Creative Cloud and everytime I open it up the program freezes and goes black. However, Photoshop opens perfectly. I'm wondering am I the only one having this problem?
Same thing happened to me after it run great for a long time. My solution was to run Dreamweaver as administrator and it loads up fine now (Windows 8.1 64bit).
I've had used MS's ProcessMonitor tool to see what's going on while Dreamweaver stuck at "Initializing Assets" screen.
And what I discovered is that DW generates millions of queries to registry key HKCU\SOFTWARE\Adobe\Dreamweaver CC 2015\Temp File List.
Over the time Dreamweaver accumulates here thousands empty entries like pathXXX and infinitely loop over them when starting.
So, removing all this entries makes DW start in 3 seconds.
And no need to remove site cache, winfilecache etc.
i've just get on this error now...
and solved it by deleting registry key
HKEY_CURRENT_USER\Software\Adobe\Dreamweaver CC 2015
you can also delete this folder just in case the problem still exist..
%USERPROFILE%\AppData\Roaming\Adobe\Dreamweaver CC 2015
n:
this steps will delete configuration and preferences..
but your sites will still there...
Okay here is my solution that worked for me, delete the Configuration folder in
C:\Users\Your Name\AppData\Roaming\Adobe
Since AppData is a hidden folder you will very likely have to hit the windows button, and type in %appdata% to access the folder. Hope this helps.
I was having a problem with Dreamweaver (CC 2017) hanging (grey screen) during loading the site cache.
After it hung I had to kill all the Dreamweaver processes in the task manager. Clicking the X to close the window didn't completely kill Dreamweaver.
I then just deleted the contents of the cache folder.
goto this directory and delete the contents, making path substitutions for your username, dreamweaver version and language.
c:\Users\username\AppData\Roaming\Adobe\Dreamweaver (your version)\en_US\Configuration\SiteCache
When I restarted Dreamweaver it reloaded the site cache and everything worked again.
Dreamweaver does this thing where it checks for changed or moved links when first starting one of your sites in the right panel. It will do this same thing when you first start the program (because you typically leave the most recent site still open) but will not give you the popup option to "stop" this process like it does when manually switching them. This is why it freezes on that gray screen. None of the other solutions will prevent it from doing this except on the first time you deleted one of the suggested files and open Dreamweaver.
My solution was to create a new site and simply call it "!NONE" pointed at a local empty folder. Then, before closing my Dreamweaver, after working, I would switch to that site. Now when I open Dreamweaver later, it opens almost instantly because it is checking a folder with nothing in it.
The same thing happened to me.
I followed the instructions at: http://forums.adobe.com/thread/494811 .
I ended up needing to rename the Configuration folder and let the program recreate the folder when starting up next time (this can take a while if you have large sites as cache needs to be recreated). It then opened with no problem.
My Dreamweaver is hanging on start up but if I turn off wifi / internet it works OK!

Can Vim/GVim Show Other Files within the Same Project while Editing a File? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
While I am editing a file in Vim, I need to see other available files to edit within the same project. Are there any project management features for Vim (GVim actually, if it makes any difference), either natively or in plugin form?
I'm not looking for anything extravagant, just something which will keep my files under one project name, and some sort of buffer which will display what files go under what project. You know what I mean, you see it in every IDE.
NERDTree with bookmarks does the job for me. It's popular and has been updated recently, whereas Project hasn't been updated in a few years.
Commands
:Bookmark proj1 " to bookmark a directory
:NERDTree proj1 " opens NERDTree with bookmarked directory set as tree root
Even has handy filesystem commands for creating/deleting files/directories etc
I have used the Project plugin for quite sometime. I've been fairly happy with it. I did make one modification to mine, so that I can generate tags over a whole project. It's fairly easy to add a new project to the Project window with the "\C" command inside the window. It will prompt you for certain parameters such as path, target directory, project name, and file types to include, then it will recurse the path to find all your files and then display them in the window. Be sure to save it!
The downside of Project plugin is that it only keeps track of files and does not track certain environment variables related per project. Not a big deal if you only have one project. The Project plugin can keep track of multiple projects in it's window by adding more, but you can't really "switch" between project environments seamlessly.
That is why I find SessionMan indispensable for project session management. Comes in handy when jumping back and forth between different code projects. I basically give each session a name similar to my project name. With each session, I map the project plugin command (:Project YourProject)) to a key where I can retrieve the project in each session. Also, it helps to keep your paths saved on a per session basis. This facilitates tag lookup for omnicomplete and tag navigation as well as the "gf" key combo for opening header files.
Those two plugins work great together.
There is a newer plugin called MyProjects, but the last I tried it had some window and buffer issues that I'm not used to. It also didn't work well with my session management plugin. It's still in early development.
EDIT: I also just found exVIM online. It looks interesting and might be up your alley. I may have to try it out myself. Note that there are multiple install options.
The exVim may fulfill your demand. It have a project window can browse a specific directory, also some useful plugin to ease the develop.
Here is the link:
http://code.google.com/p/exvim/
Found an interesting link here. It's primarily Python-focused, but I think it'll get you started.

Add icon to existing EXE file from the command line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Is there a command line tool that can add an icon to an existing executable file? It should be able to set the icon as the file's "main" icon that is shown in Explorer.
I don't have Visual Studio and cannot recompile the exe with custom resources containing the icon.
UPDATE: The best tool I have found since posting this question is by far the RCEDIT.exe utility that is included with WinRun4J.
Sorry, I haven't personally tried this one just yet, but because I am wanting this while bundling up an atom-shell app, I found it very interesting when https://github.com/atom/rcedit showed up in my first search for the RCEDIT utility mentioned in other answers.
One of its commands is:
$ rcedit "path-to-exe-or-dll" --set-icon "path-to-ico"
…so assuming this works, it is likely the solution I will use — my Windows build machine is already set up to fetch source using git and compile via gyp.
UPDATE: there's a pre-built executable available via https://github.com/atom/rcedit/releases/ and it works well for me on Win7 (from Git Bash/Msys shell although I'd be surprised if that makes a difference).
Resource Hacker is a free tool that allows you to modify resources in executables, and it can be scripted from the command line.
In my case, trying to add an icon using RCEdit.exe with either /A or /I switches resulted in a trimmed executable. I have a NSIS (NullSoft Installer System) - created setup that was originally 13 MiB, but after running RCEdit to add an icon to it, all of what remains of it is only a few kilobytes (close to the size of the icon), but yes the executable shows the icon.
Adding the icon using Resource Hacker worked for me. It doesn't even need an option to set the icon as default, being the only icon group resource. I used 103 as the name of the resource and 1033 as the language.
Have you tried ResourceTuner Console?

Resources