How do I set logo and launchers in Jupyterlab and Jupyterhub? - jupyter-lab

I'm trying to customize Jupyterhub and Jupyterlab my goal is to remove/change Logos and Launchers.
Questions are:
For Jupyterhub I'm trying to remove the logo setting c.Jupyterhub.logo_file to none, that's an option on jupyterhub_config.py near spawner_class. Is it possible?
How do I remove Jupyterlab Launcher? I already tryed to remove this feature using jupyter labextension disable #jupyterlab/launcher-extension while building the image but it didn't worked.

For the logo, I am not sure about JupyterHub-specific solutions, but you could see how Elyra does that for their JupyterLab distribution with Elyra theme extension here (under Apache License, so it should not be pasted in here). In short they first locate the icon in the "top" area of JupyterFrontEnd.shell (which implements IShell interface) using IShell.widgets and then write their own icon into the located container.
For the replacing the initial animation, you would want to swap the #jupyterlab/apputils-extension:splash plugin, not the launcher extension. Launcher is what allows users to start new notebooks from the main area widget.

Related

HawkBit - Custom theme in docker image

I would like to create a new color scheme on the server's management UI page. According to the instructions from the help page:
I created my own theme containing color changes
I changed the configuration to make my theme work (hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/themes/HawkbitTheme.java)
Build repo and run the server
I have noticed the color changes that I made. The target configuration is to run in docker containers. In this case, I rebuilt the server locally and ran it without using a container.
I wonder if in that case I will have to rebuild the entire repository, create a docker image, and mount such a custom container on my server?
Is it possible to add a theme to the docker image downloaded by default by dockercompose, and enable this theme by adding some entry to the application.properties file? If possible, then:
What would that entry be?
Where to copy theme files to container filesystem from hawkBit?
Tried: Look for some hints in documentation. Expectations: Find out if it is possible to add a theme to the finished docker image. If it is possible, how to do it?

Access kernel environment variables from a JupyterLab extension

I have a button extension for JupyterLab.
This extension gives the option to run tools with one click.
I want to show a value from the kernel ENV, let's say 'JOB_NAME' for the opened notebook.
How can I access this ENV variable from the extension TypeScript Code?

How can I put my GTK application in the desktop menus?

I started with programming a little time ago and I created my first running application with GTK 3.0. I did not use Glade, I do not know if worth highlight it. My code is working perfectly, but now I have a doubt, how can I make my own desktop menu application? I mean, I want that my application running up without compile in a terminal with GTK 3.0 compiler, but yes with a double click.
I have been seen these examples provided by GNOME Developer Center, but I confess that did not understand it: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#ex-sample-desktop-file
The idea is to create a file containing this sequence of lines:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=application
Icon=application.png
Terminal=false
This file is my executable or it is a different file which points to my executable? If it is my executable, where can I insert it?
Thank you!
So basically this file will create a desktop entry for those configurations you provide for the corresponding directives in the file. Judging by your question, you are unable to find where to place your application executable in that directive.
Exec="/absolute/path/to/your/executable/file"
And the Name directive will hold the information of your application name. This is the one you will be querying for in your gnome applications search (which appears when you press the windows key).
This file will contain a .desktop extension. And this file itself is not executable. This will point to your application, making the gnome/ubuntu system understand that such application exists.
This will not directly create a desktop shortcut as in Windows, rather this will index your application which you can run from the application menu (ubuntu or gnome)
If you aren't sure where to place the file here's a hint from the documentation you linked.
Place this file in the /usr/share/applications directory so that it is accessible by everyone, or in ~/.local/share/applications if you only wish to make it accessible to a single user

Run Chrome Extensions using command prompt

Is it possible to run a chrome extension from command line?
I need to automate the process for my software, and my software will need to run that extension with a particular parameter.
I am using a Chrome Extension 'APK Downloader' by Yogi. The Extension works like this:-
"If a page contains any .apk file link, then when I click on the extension's icon on the address bar, it starts direct download of that .apk file"
Now, I have my software that needs some .apk file to download [The software will have the package name of the .apk file to be downloaded, which is used by the extension to generate a download link]. It will be an automatic process. So, I need to know if it is possible to pass a parameter to the extension automatically, and make the extension to work without clicking on it.
Is it possible to do so??
Unpacked extension can be loaded using the --load-extension= flag.
What I usually do is chromium --user-data-dir=/tmp/someuniquedirname --load-extension=path/to/extension --no-first-run.
The --user-data-dir= flag is used to specify a non-default user data directory, to minimize conflicts between your existing browser profile and the test directory. You can omit this flag if you want to use your default user profile.
The --no-first-runflag prevents the first run UI from showing up (e.g. the bubble that explains how to use the omnibox, and a "Getting Started" page that opens in a new tab).
You can load multiple extensions by separating the paths by commas, e.g. chromium --load-extension=path/to/one/extension,path/to/another/extension.
I have published some shell scripts and a convenience extension to speed up (manual) testing of Chrome extensions. Take a look at https://github.com/Rob--W/extension-dev-tools/tree/master/chrome.
it helps to open extension normally and after that hit F12 (dev tools) to see actual url...
having that i can, for example load "Selenium IDE" chrome extension as
(run from command prompt)
"C:\Program Files (x86)\Google\Chrome\Application\new_chrome.exe" chrome-extension://mooikfkahbdckldjjndioackbalphokd/index.html
on a mac:
osascript <<EOD
set theURL to "chrome://extensions/"
tell application "Google Chrome"
if windows = {} then
make new window
set URL of (active tab of window 1) to theURL
else
make new tab at the end of window 1 with properties {URL:theURL}
end if
activate
end tell
EOD
Question answered here:
https://superuser.com/a/979678

Can i merge icon with executable application in linux?

if you made up an application in linux you will get a blank ugly icon
but if i wanted to add an icon without going and make a desktop entry , is it possible ?
if i uploaded my portable app to the internet i would like that users see the icon merged to my portable app ! :)
Thanks
For scripts probably not, but for ELF binaries seen under Gnome (nautilus) you can try
elfres
http://www.compholio.com/elfres/
Most desktop environments on Linux follow the freedesktop.org Desktop Entry Specification for application descriptions and icons. You'll need a separate .desktop file in one of the XDG directories (specifically, applications within one of $XDG_DATA_DIRS) which will list an icon (which is an image file in another directory).

Resources