首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xmonad Xsession

Xmonad Xsession
EN

Ask Ubuntu用户
提问于 2013-05-15 21:07:06
回答 1查看 5.8K关注 0票数 2

我的用户级别: noob-ish,所以请容忍我。

我在跑12.04 LTS。我已经安装并在某种程度上配置了xmonad 0.10

为其创建的“自动”xsession工作正常,但当我登录时,它将不会运行我创建的启动脚本和“从”/usr/share/xsessions/xmonad.desktop调用,如果是这样的话。我已经阅读了几乎所有关于.xinitrc和.xsession的资料,我试过这样做,如果我解释得对的话,其他的“会话”就会搞砸了。必须通过$unity --reset才能让“主会话”再次工作。

无论如何,我的问题是,如何在登录到xmonad的默认Xsession后自动启动xmobar并设置桌面背景?

我试过这个脚本,开始-xmonad:

代码语言:javascript
复制
#!/bin/bash
#
#I only used one of the following each time I tried, none worked
#Also, do I really need the '&'? I know what they're for, but...
nitrogen --restore &
feh --bg-scale ~/Pictures/picture.png &

#Then I want xmobar to start, again do I need the '&'? I know it's for it to run
#in the background, but I tried removing the '&' and xmonad still launched
xmobar &

#Finally, the only thing that seems to work in this script
exec xmonad

是的,我确定我做了chomd +x ~/start-xmonad

xmonad.desktop是

代码语言:javascript
复制
[Desktop Entry]
Name=XMonad
Encoding=UTF-8
Comment=Lightweight tiling window manager
Exec=/home/myusername/start-xmonad
Icon=custom_xmonad_badge.png
Type=XSession

所以,这不管用,现在我来了。请帮助:s谢谢

EN

回答 1

Ask Ubuntu用户

发布于 2013-10-23 03:40:57

我是debian用户,但对您来说应该是相同的解决方案:

我就这样解决了:

(注意.sh结尾)

代码语言:javascript
复制
[Desktop Entry]
Name=XMonad
Encoding=UTF-8
Comment=Lightweight tiling window manager
Exec=/home/myusername/start-xmonad.sh
Icon=custom_xmonad_badge.png
Type=XSession

然后,我在主文件夹中创建了start-xmonad.sh文件。此文件中的命令应可在终端中运行。

代码语言:javascript
复制
#!/bin/bash
yourStartUpApplication &
xmobar &
xmonad

确保start-xmonad.sh具有正确的权限,使用

代码语言:javascript
复制
chmod 755 /home/myusername/start-xmonad.sh

注意:&符号用于在后面运行另一个命令。

希望这会有所帮助!

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/295935

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档